Page 1 of 1

Strange modCheck Error v1.5.5.1

Posted: Wed Jul 24, 2013 3:30 pm
by cwswebdesign
I just uploaded the newest 1.5.5.1 with the new amazon and paypal info included and I'm getting an error when I click the "view" order button in admin. Everything else is working fine.

This is the error:

Notice: Undefined variable: vqmod in /home/nnnnn/public_html/nnnnnn/vqmod/vqcache/vq2-system_engine_controller.php on line 76
Fatal error: Call to a member function modCheck() on a non-object in /home/nnnnn/public_html/nnnnn/vqmod/vqcache/vq2-system_engine_controller.php on line 76

I do have a lot of other vqmods installed but the rest of the site works, so I don't think it has to do with the mods but i could be wrong. I do have openstock and openbaypro running on the site.

I've searched all over the forums and Google and had no luck finding any solution to fix it.

Any thoughts / suggestions would be greatly appreciated.

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Wed Jul 24, 2013 10:19 pm
by cwswebdesign
I would advise everyone to NOT try to install the newest 1.5.5.1 download from the downloads page. I haven't figured it all out but there seems to be an issue with the coding on the system/engine/controller.php file

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 3:40 am
by walkinparts
I have a similar problem. I just upgraded to 1.5.5.1 and re-installed VQMod. I can still edit an order but when I try and view it, I get:

Code: Select all

Fatal error: Call to a member function modCheck() on a non-object in /home/mysite/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 56

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 3:42 am
by DenverCoder9
I can confirm this, I have the same error.

Yesterday I installed new 1.5.5.1 (july 22 2013, sha1:99e5b9) with newest vqmod and I just noticed I can't access order details.

Any workarounds?

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 4:50 am
by cwswebdesign
walkinparts wrote:I have a similar problem. I just upgraded to 1.5.5.1 and re-installed VQMod. I can still edit an order but when I try and view it, I get:

Code: Select all

Fatal error: Call to a member function modCheck() on a non-object in /home/mysite/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 56

That's basically the same issue I had. Can you roll your site back to an earlier version? I don't know why they've put this new version as the main download with such an issue at hand. I know the code causing the error but I ran out of time and patience to try and solve it.

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 5:32 am
by butte
Going back to the top here, it is possible that not all of the .xml are getting along together, but it's also possible that this (these) raise need just to flush the /vqmod/vacache/ and the /system/cache/ files so that OC isn't remembering anything, and for good measure also the browser's cache. The combination of cache files can raise no incident for a while and then suddenly make mincemeat of it all. Barring that, slipping the last few .xml out of the way into a setaside/ subdir in order to retry them one at a time may help to find the cause(s). (Cache files can likewise be lipped into a setaside/ subdir as self-same backups).

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 5:53 am
by cwswebdesign
butte wrote:Going back to the top here, it is possible that not all of the .xml are getting along together, but it's also possible that this (these) raise need just to flush the /vqmod/vacache/ and the /system/cache/ files so that OC isn't remembering anything, and for good measure also the browser's cache. The combination of cache files can raise no incident for a while and then suddenly make mincemeat of it all. Barring that, slipping the last few .xml out of the way into a setaside/ subdir in order to retry them one at a time may help to find the cause(s). (Cache files can likewise be lipped into a setaside/ subdir as self-same backups)
I deleted every cache file I had (browser and website) and it didn't change it. It was only causing an error for one page, but a very important page!

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 6:26 am
by cwswebdesign
I'm pretty sure this is the problem in system/engine/controller.php

protected function hasAction($child, $args = array()) {
$action = new Action($child, $args);

if (file_exists($action->getFile())) {
require_once($action->getFile());

$class = $action->getClass();

$controller = new $class($this->registry);

if(method_exists($controller, $action->getMethod())){
return true;
}else{
return false;
}
} else {
trigger_error('Error: Could not load controller ' . $child . '!');
exit();
}
}

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 6:44 am
by butte
Since it's fussing about the same line 76 over both "Undefined variable" and fatal call to function on non-object, specifically in "vqcache/vq2-system_engine_controller.php" on line 76, I'd hoped that the cache did it, but seems not and is affecting "only" view order.

SIlly as this may be, I wonder if there's a difference, in this instance, between require_once and require, or between "}else{" and "} else {" before it "Could not load controller" and stopped. If so, then seems most likely caused by "}else{" for syntax. Quick edits to lop _once and insert spaces for trial would say.

I don't see anything in (;;) or not in (;) the snippet to cause the Semicolon Monster to attack.

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 6:54 am
by cwswebdesign
butte wrote:Since it's fussing about the same line 76 over both "Undefined variable" and fatal call to function on non-object, specifically in "vqcache/vq2-system_engine_controller.php" on line 76, I'd hoped that the cache did it, but seems not and is affecting "only" view order.

SIlly as this may be, I wonder if there's a difference, in this instance, between require_once and require, or between "}else{" and "} else {" before it "Could not load controller" and stopped. If so, then seems most likely caused by "}else{" for syntax. Quick edits to lop _once and insert spaces for trial would say.

I don't see anything in (;;) or not in (;) the snippet to cause the Semicolon Monster to attack.
All I know is that I'm not going to risk the update on the site again and spend all the time messing with it! I was up all night trying to figure it out (that probably didn't help because I was falling asleep).

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 7:33 am
by cwswebdesign
I thought 1.5.5.1 was pretty stable and this client really wanted to use the filters (attribute filters aren't enough). For the most part, I think it's a solid system.

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 8:41 am
by butte
I agree with that, that's why I use it, along with what remain stable 1.5.0.0 through 1.5.5.1 (don't fix what works perfectly and isn't broken). It's just the first OC 1.5.x.x that goes nuts when it goes nuts, and that seems to owe to servers, perhaps only to when it's been "in" for servers to eye each other and do some upgrades without telling. Bad servers upset all 1.5.x.x (wrong php, name it).

Re: Strange modCheck Error v1.5.5.1

Posted: Thu Jul 25, 2013 10:46 pm
by cwswebdesign
Took a look at the new 1.5.6 and they still haven't changed the controller.php file

https://github.com/opencart/opencart/bl ... roller.php

Re: Strange modCheck Error v1.5.5.1

Posted: Fri Jul 26, 2013 1:12 am
by pprmkr
New function hasAction in system/engine/controller.php missing global $vqmod;

Edit vqmod/xml/vqmod_opencart.xml

For <file name="system/engine/controller.php">
Change:

Code: Select all

<search position="before" index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>
Into:

Code: Select all

<search position="before"><![CDATA[if (file_exists($vqmod->modCheck($action->getFile()))) {]]></search>

Re: Strange modCheck Error v1.5.5.1

Posted: Fri Jul 26, 2013 1:14 am
by cwswebdesign
pprmkr wrote:New function hasAction in system/engine/controller.php missing global $vqmod;

Edit vqmod/xml/vqmod_opencart.xml

For <file name="system/engine/controller.php">
Change:

Code: Select all

<search position="before" index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>
Into:

Code: Select all

<search position="before"><![CDATA[if (file_exists($vqmod->modCheck($action->getFile()))) {]]></search>

Thanks for the insight. I wish I had this the other day but better late than never. I might attempt the upgrade again.

Thanks,

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Sat Jul 27, 2013 1:25 am
by rph
I'd wait a month or two unless it's absolutely critical that you have that functionality.

Re: Strange modCheck Error v1.5.5.1

Posted: Sat Jul 27, 2013 1:45 am
by butte
If pprmkr's solution didn't work for you while you've been quiet since, cwswebdesign, you might try backstepping to a known good 1.5.5.1 issue and to a known good vqmod issue or version. SInce you went for the very newest of both, but didn't have this excitement earlier on, reverting will presumably put you where you wanted to be.

Re: Strange modCheck Error v1.5.5.1

Posted: Sat Jul 27, 2013 2:04 am
by cwswebdesign
butte wrote:If pprmkr's solution didn't work for you while you've been quiet since, cwswebdesign, you might try backstepping to a known good 1.5.5.1 issue and to a known good vqmod issue or version. SInce you went for the very newest of both, but didn't have this excitement earlier on, reverting will presumably put you where you wanted to be.

I did go back to 1.5.5.1 for now.

DL

Re: Strange modCheck Error v1.5.5.1

Posted: Tue Oct 15, 2013 6:30 pm
by andrei.bogdan
pprmkr wrote:New function hasAction in system/engine/controller.php missing global $vqmod;

Edit vqmod/xml/vqmod_opencart.xml

For <file name="system/engine/controller.php">
Change:

Code: Select all

<search position="before" index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>
Into:

Code: Select all

<search position="before"><![CDATA[if (file_exists($vqmod->modCheck($action->getFile()))) {]]></search>
Thanks @pprmkr you saved my day!
I saw the new function 'hasAction' but didn't know this could be solved so easy, with no updates.

Thanks pprmkr Re: Strange modCheck Error v1.5.5.1

Posted: Sat Nov 16, 2013 1:30 am
by atzi
Re: Strange modCheck Error v1.5.5.1

Postby pprmkr » Thu Jul 25, 2013 12:12 pm
New function hasAction in system/engine/controller.php missing global $vqmod;

Edit vqmod/xml/vqmod_opencart.xml

For <file name="system/engine/controller.php">
Change:

Code: Select all
<search position="before" index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>


Into:

Code: Select all
<search position="before"><![CDATA[if (file_exists($vqmod->modCheck($action->getFile()))) {]]></search>