Keyword

PHP Notice: Undefined property: K2ViewLatest::$user

  • Zurito
  • Zurito's Avatar Topic Author
  • Offline
  • New Member
More
5 months 3 weeks 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.

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
5 months 3 weeks ago #177255 by Fotis
Which K2 version are you using?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


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
5 months 3 weeks 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.

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
5 months 2 weeks ago #177282 by Fotis
Delete and re-create the menu item that you used with that K2 view. Is it resolved?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


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
5 months 2 weeks ago - 5 months 2 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:

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


Muchas gracias por todo.
Last edit: 5 months 2 weeks ago by Zurito.

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

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
5 months 2 weeks ago #177314 by Fotis
Ah, yes, the menus. These can be a PITA after migrating to J3.x.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


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