Main menu

Forum


× Help Forum English

[FIXED 3.3.0] Problem caused by an out of date bookmark

  • doorknob
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 10 ans 10 mois - il y a 10 ans 10 mois #6659 par doorknob
Hi Cyril,
I came across a couple of issues in components/com_icagenda/helpers/icmodel.php (v3.2.13).
The problem was caused by an out of date bookmark (actually, I just refreshed the browser after a site update but it amounts to the same thing). The invalid URL triggered a couple of php errors in different parts of the same file. The first was at line 839 where there is an assumption that $app->getMenu()->getActive() will always return an object.

PHP Notice: Trying to get property of non-object in /components/com_icagenda/helpers/icmodel.php on line 839
PHP Fatal error: Call to a member function get() on a non-object in /components/com_icagenda/helpers/icmodel.php on line 839

I fixed it by changing
if ($menuItem->params->get('show_page_heading', 1)) {
to
if (is_object($menuItem) && $menuItem->params->get('show_page_heading', 1)) {

The second problem was at line 1365 when the template name had not been set.

PHP Notice: Undefined index: template in /components/com_icagenda/helpers/icmodel.php on line 1365

I changed
protected function template (){return $this->options['template'];}
to
protected function template (){return isset($this->options['template']) ? $this->options['template'] : '';}

Regards
Phil
Dernière édition: il y a 10 ans 10 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 10 mois #6670 par Lyr!C
Réponse de Lyr!C sur le sujet Problem caused by an out of date bookmark
Hi Phil,

You're right, a control is_object is needed to prevent alert message.
Since JParameter deprecated in Joomla, not yet know what the best way to call active menu params...

But i wasn't able to reproduce this issue...
In all cases, will add this change in the code.

About function template, in fact, this function is no more needed (i will remove it in next release 3.3.0, and remove template from container array in models/list.php)
Template is loaded from view.html.php ;-)

PS: will send you my pre-release version, and with some little changes about the new media css function you have implented! ;-)

Thank you for all your contribution in the code, and helping in improvement of iCagenda!

Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.063 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new