Page 1 of 1

Help with v2.1.0.2 errors in the Error Log

Posted: Wed Apr 13, 2016 1:57 am
by _YJ_
Two error log entries appeared in my log today. I found the files but for the life of me I couldn't find the contents of the first one below. On the second one I found that one but did not know just where that variable would be defined at.
I am very very limited in my experience with .php and .tpl but a lot of what I've seen is very simular to the Turbo Pascal programing I did years ago.

Is there anyone that can help me repair what ever is broken here. I'd really appreciate it. I'm in Version 2.1.0.2.
The only mods I currently have are vqmod_opencart.xml and footer_notifications.xml

2016-04-12 16:18:36 - PHP Warning: Invalid argument supplied for foreach() in /xxxxx/xxxxx/public_html/admin/controller/module/featured.php on line 124

2016-04-12 17:22:39 - PHP Notice: Undefined variable: entry_export in /xxxxx/xxxxx/public_html/admin/view/template/tool/backup.tpl on line 43


On a side note, I have been trying to find the mod to be able to run the "ocmod" scripts. Can someone please direct me to it. Thanks in advance for your help and time.
YJ

Re: Help with v2.1.0.2 errors in the Error Log

Posted: Wed Apr 13, 2016 6:10 am
by oc-extensions
Hi,

If featured module before that line you have

Code: Select all

if (isset($this->request->post['product'])) {
	$products = $this->request->post['product'];
} elseif (!empty($module_info)) {
	$products = $module_info['product'];
} else {
	$products = array();
}
So, every time line that cause you problems has $products defined:

Code: Select all

foreach ($products as $product_id) {
Uninstall and install again featured module and sure will solve your problem (IF you don't changed original files)
--------------

For second message:
open admin/controller/tool/backup.php

find line:

Code: Select all

$data['entry_backup'] = $this->language->get('entry_backup');
and after this line add

Code: Select all

$data['entry_export'] = $this->language->get('entry_export');
Good luck ! ;)

Re: Help with v2.1.0.2 errors in the Error Log

Posted: Wed Apr 13, 2016 6:51 am
by _YJ_
Thank you so much.. I'll go hunting here in just a few minutes.. I haven't changed any code so far.
YJ

Re: Help with v2.1.0.2 errors in the Error Log

Posted: Wed Apr 13, 2016 6:55 am
by oc-extensions
Hi,

After you add this changes don't forget to clear error logs