Page 1 of 2

Vqmod Error?

Posted: Tue Sep 20, 2011 3:44 pm
by Ozfarmer
Hi Guys I am getting an error

2011-09-20 6:41:30 - PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '2' in /store/vqmod/vqcache/vq-catalog_controller_common_header.php on line 135

Line 134 - 136 reads: $state1 = $objDOM->getElementsByTagName("regionName");
$state = strtolower($state1->item(0)->nodeValue);
$state = ucwords($state);

Is this a Vqmod Error?

Re: Vqmod Error?

Posted: Tue Sep 20, 2011 5:22 pm
by uksitebuilder
No, it is a problem with what ever mod you have installed.

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 8:40 am
by Ozfarmer
Hi UK thanks for that, I have a lot of Mods :) so I guess it would be very hard to isolate that then?

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 8:49 am
by Xsecrets
Ozfarmer wrote:Hi UK thanks for that, I have a lot of Mods :) so I guess it would be very hard to isolate that then?
not so hard just rename then all with a _ at the end like mod.xml_ then reload the page rename the back one at a time till the error shows up and you'll know which one it is.

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 4:20 pm
by uksitebuilder
dont forget to clear your vqmod/vqcache too

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 7:03 pm
by Qphoria
uksitebuilder wrote:dont forget to clear your vqmod/vqcache too
if the xml file is removed, it will regenerate it without the mods anyway so it won't matter.

Vqmod Error?

Posted: Wed Sep 21, 2011 8:31 pm
by uksitebuilder
Is that the same if use cache is set to true?

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 9:17 pm
by Qphoria
uksitebuilder wrote:Is that the same if use cache is set to true?
In vQmod 1.x useCache requires the xml file to exist for it to use the cached version.. I assume 2.0 does this as well. If the xml file is removed... it won't even look for the cache file

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 9:49 pm
by Maansy
I am having almost the same issue.

preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '2' in /home/xxxxx/public_html/opencartstuff.com/vqmod/vqcache/vq-catalog_controller_common_header.php on line 139

this is line 139 in vq-catalog_controller_common_header.php:

Code: Select all

$user_os = strtolower($http_user_agent);
									foreach($osList as $os=>$match) {
										if (preg_match('/' . $match . '/i', $user_os)) {  // line 139
											break;
										} else {
										$os = "Not Detected";
									}
									}
any idea?

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 9:58 pm
by uksitebuilder
where is the $user_os value coming from ?

Is it empty or undefined therefore causing the error ?

Re: Vqmod Error?

Posted: Wed Sep 21, 2011 10:07 pm
by Maansy
I believe it's coming from the Who's online module but I am not sure

Re: Vqmod Error?

Posted: Fri Sep 23, 2011 10:08 am
by Ozfarmer
Thanks all, I will try that when I get a few spare hours.

Re: Vqmod Error?

Posted: Sat Sep 24, 2011 1:15 pm
by Ozfarmer
Thanks Simon and Qphoria, located the Vqmod error, was coming from the Visitor Tracking Vqmod, disabled that and all's good. Any chance I can push my luck and get some help with this? http://forum.opencart.com/viewtopic.php?f=20&t=41301 O0

Re: Vqmod Error?

Posted: Tue Sep 27, 2011 10:43 pm
by JAY6390
whoevers mod it is, the fix is pretty simple. you just need to change line 139 to

Code: Select all

                              if (preg_match('/' . preg_quote($match, '/') . '/i', $user_os)) { 
which will avoid the issue

Re: Vqmod Error?

Posted: Wed Sep 28, 2011 4:54 am
by Maansy
JAY6390 wrote:whoevers mod it is, the fix is pretty simple. you just need to change line 139 to

Code: Select all

                              if (preg_match('/' . preg_quote($match, '/') . '/i', $user_os)) { 
which will avoid the issue
I'll try and report back in a day. Thank you jay

Re: Vqmod Error?

Posted: Wed Sep 28, 2011 4:51 pm
by Ozfarmer
Hey, Jade Thanks Man! That seems to have solved my issue to. I know FA about Vqmod but should that that line be changed permanently?

Paul

Re: Vqmod Error?

Posted: Wed Sep 28, 2011 5:06 pm
by JAY6390
yes it should be changed by the developer really so all releases have the preg quote in it

Re: Vqmod Error?

Posted: Fri Sep 30, 2011 3:27 am
by Maansy

Code: Select all

2011-09-29 7:05:22 - PHP Warning:  require_once(/home/xxxx/public_html/opencartstuff.com/) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/xxxx/public_html/opencartstuff.com/vqmod/vqcache/vq2-system_engine_front.php on line 43
Any idea?

Re: Vqmod Error?

Posted: Fri Sep 30, 2011 3:29 am
by JAY6390
That was a bug in 2.0.0
Try 2.1.0 and let me know if you still get the same problem

Re: Vqmod Error?

Posted: Fri Sep 30, 2011 3:36 am
by Maansy
Thanks jay, will do that.
Do I just replace vqmod.php with the 2.1.0 one?