Main menu

Forum


× Help Forum English

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

  • doorknob
  • Autore della discussione
  • New Member
  • New Member
Di più
10 Anni 10 Mesi fa - 10 Anni 10 Mesi fa #6659 da 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
Ultima Modifica 10 Anni 10 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 10 Mesi fa #6670 da Lyr!C
Risposta da Lyr!C al topic 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) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.143 secondi

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new