Error after update to 3.8

Status
Not open for further replies.
(And remind me of any test constraints ... like I think there's a specific customer to submit with so no live users get notifications)
 
Thanks. I'll take a look. When is a good time (expressed in GMT) for me to work on the site? I may have to put it in debug mode, or make the forms unusable while I track any issues.

-- hugh
Hello Hugh. Anytime after 15:00 GMT will be good. I am on Skype if you need anything. I appreciate it Hugh. Everything works, it is just that that message pops up when doing a Service Report, and it happens when the results are displayed.
 
I'm not sure where the "Service Report" link is, so I can't test my fix, but the issue was that your 'favouritedark' template was assuming that there is always a Itemid on the page, to get the page class suffix from the associated menu. I've add a test in the code to skip that part if no Itemid. I suspect this has always been an issue, but you've never had PHP error reporting turned on (I turned it on when testing the other issue, and forgot to turn it off).

Should be OK now. In ./templates/favouritedark/index.php, I changed this ...

Code:
// Add page class suffix
$itemid = JRequest::getVar('Itemid');
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getItem($itemid);
$params = $menu->getParams( $active->id );
$pageclass = $params->get( 'pageclass_sfx' );

... where that fourth line was throwing the warning because $active was null, to this ...

Code:
// Add page class suffix
$itemid = JRequest::getVar('Itemid', '');
if (!empty($itemid)) {
    $menu = JFactory::getApplication()->getMenu();
    $active = $menu->getItem($itemid);
    $params = $menu->getParams( $active->id );
    $pageclass = $params->get( 'pageclass_sfx' );
}
else {
    $pageclass = '';
}

-- hugh
 
Also note that JRequest was deprecated quite a long time ago, and may well stop working entirely soon. You might want to see if there's a new version of that template available.

-- hugh
 
Hello Hugh. Many thanks. I appreciate it. I have noticed there is a new version of the template, but I am concerned that there is some custom code that was created when we did the system, so I am a little worried about messing things up when I update the template. So I have been thinking of redoing the site content and simplifying the site, but I would prefer if the F system we did took on the look and feel of the new template. Will this be the case? Taking into account the status colours for the different jobs?
 
Hello Hugh. Many thanks. I appreciate it. I have noticed there is a new version of the template, but I am concerned that there is some custom code that was created when we did the system, so I am a little worried about messing things up when I update the template. So I have been thinking of redoing the site content and simplifying the site, but I would prefer if the F system we did took on the look and feel of the new template. Will this be the case? Taking into account the status colours for the different jobs?
Might need a few tweaks to any nice with a new site template, but nothing major.

Sent from my HTC6545LVW using Tapatalk
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top