• Home
  • Get help
  • Ask a question
Last post 9 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67850
All time tickets 10486
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#90 – Error_log being created every second via sh404sef

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 16 April 2015 08:41 UTC
d311boy
 Hi

I have installed your latest version 4.4.8 and am running Joomla 2.5.28 and VirtuaMart 2.6.17

Each time I look at a product on the front end of the website it adds a line of code to the error_log within the root directory as outlined:

[16-Apr-2015 07:18:11 UTC] PHP Notice: Undefined variable: Itemid in /home/justoutdoortoys/public_html/components/com_sh404sef/sef_ext/com_virtuemart.php on line 58

I have set the Global configuration of Joomla 'Error Reporting' to 'none' but the error log is still being generated, whilst i would not normally worry about this if the issue is nothign really to worry about it is creating a massive size file on my server which I have to delete each day (around 100Gb per day!)

How can I fix this issue or is there a way to switch off the error reporting within your application please?

Many thanks

Darren
Thursday, 16 April 2015 08:59 UTC
wb_weeblr
Hi

This is not sh404SEF logging information, this is PHP loggin this notice.
If you have access to your server php.ini file, you can suppress them being logged by adding the
& ~E_NOTICE
command to the
error_reporting
setting of PHP.
This will require restarting PHP, or Apache if you use PHP as an Apache module. If you're not famliar somehow with system administratio, you probably don't want to go that route.

This error can appear depending on your Joomla menu configuration, and also on some Virtuemart URLs which lacks an Itemid. It apparently appeared on more recent versions of VM.
Next release will have a protection against that. For now, if you're ok with it, you can prevent this message to appear by inserting the following code at line 26 of /components/com_sh404sef/sef_ext/com_virtuemart.php:
$Itemid = empty($Itemid) ? 0 : $Itemid;

The final result should look like:
// ------------------  standard plugin initialize function - don't change ---------------------------
$Itemid = empty($Itemid) ? 0 : $Itemid;
if (!function_exists('shGetVmShopName'))
.....


This change will be discarded when you update to next release, but next release will include it so you don't need to worry about that.

Rgds
 
Thursday, 16 April 2015 09:28 UTC
d311boy
Many thanks for your reply, I will add the code you have suggested to line 26 and see if that stops the error log messages.

Thanks

Darren
Thursday, 16 April 2015 12:55 UTC
wb_weeblr
Thanks, please report back, that will help validate the change for next version

Rgds
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.