IMPORTANT MESSAGE REGARDING THE FORUM

As you may already know, the JoomlaWorks Forum is powered by Kunena (the only decent forum component for Joomla).

Unfortunately, the latest update for Kunena has seemingly broken all code snippets (old and new) in the forum.

Until this message is removed, please paste any code as regular text - in other words, don't use the [code]...[/code] tags in Kunena's post editor.

Keyword

PHP Notice: Undefined property: K2ViewLatest::$user

  • Zurito
  • Zurito's Avatar Topic Author
  • Offline
  • New Member
More
11 months 2 days ago #177251 by Zurito
Hola, al mostrar los últimos artículos, recibo los siguientes mensajes en error.log:

PHP Notice: Undefined property: K2ViewLatest::$user in /....................../components/com_k2/templates/default/latest_item.php on line 125
PHP Notice: Trying to get property 'guest' of non-object in /....................../components/com_k2/templates/default/latest_item.php on line 125

La línea 125 del fichero latest_item.php (última versión de K2), contiene:

<?php if($this->item->params->get('latestItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>

Alguna solución?

Gracias

Please Log in or Create an account to join the conversation.

More
11 months 2 days ago #177255 by Fotis
Which K2 version are you using?

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Zurito
  • Zurito's Avatar Topic Author
  • Offline
  • New Member
More
11 months 2 days ago #177260 by Zurito
K2 v2.10.3, plantilla JA Edenite II y PHP 7.4.

El fichero latest_item.php es idéntico al de k2-master y ocurre lo mismo con el de éste.

Gracias.

Please Log in or Create an account to join the conversation.

More
10 months 4 weeks ago #177282 by Fotis
Delete and re-create the menu item that you used with that K2 view. Is it resolved?

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Zurito
  • Zurito's Avatar Topic Author
  • Offline
  • New Member
More
10 months 4 weeks ago - 10 months 4 weeks ago #177304 by Zurito
Solucionado, muchas gracias.

Creo que mis problemas vienen al tratarse de actualización desde antigua versión de K2 a la última, en sitio Joomla 2.5 con foro PHPBB y JFusion, actualizado a Joomla 3.9.22 con foro PHPBB última versión e independiente, pasando de PHP 5.6 a 7.4.11.

Regenerados los menús K2, desapareció el error anterior, pero aparece otro nuevo:
PHP Notice: Trying to get property 'alias' of non-object in /..../.../.../components/com_k2/router.php on line 283

$segments[0] == getCategoryProps($segments[0])->alias &&

Por lo que creo que tendré que regenerar más apartados.

Edit: problema con error router.php on line 283 solucionado con:

Replace /components/com_k2/router.php with the one from: jmp.sh/CZ2oMKG


Muchas gracias por todo.
Last edit: 10 months 4 weeks ago by Zurito.

Please Log in or Create an account to join the conversation.

More
10 months 4 weeks ago #177314 by Fotis
Ah, yes, the menus. These can be a PITA after migrating to J3.x.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum