Main menu

Forum


× Help Forum English

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

  • doorknob
  • Topic Author
  • New Member
  • New Member
More
10 years 2 months ago - 10 years 2 months ago #6659 by 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
Last edit: 10 years 2 months ago by Lyr!C.

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
10 years 2 months ago #6670 by Lyr!C
Replied by Lyr!C on 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.3
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 Attachment:

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

Moderators: Lyr!C
Time to create page: 0.203 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new