Hi,
I did a manual upgrade by using the Extensions Manager in Joomla 2.5.13 because the Virtuemart updater didn't work. So here's the error I'm getting:
Warning: preg_replace() [function.preg-replace]: Unknown modifier ']' in /home/mysite/public_html/administrator/components/com_virtuemart/helpers/config.php on line 959
I installed the same version again, thinking that something might have gone wrong but I'm getting the same error on the second install. Not sure where to go from here.
Any help appreciated
Disculpa que responda en español, pero pude dar solución a ese error de la siguiente forma (me registre exclusivamente para dejar plasmada mi solución acá y ver si podía ayudarte)
Warning: preg_replace() [function.preg-replace]: Unknown modifier ']' in /home/mysite/public_html/administrator/components/com_virtuemart/helpers/config.php on line 959
Buscamos el archivo config.php en la ruta /administrator/components/com_virtuemart/helpers/config.php
En la lina 959 encontraremos el siguiente codigo return preg_replace('/[^\w'.preg_quote($custom).']/', '', $source);
y reemplazamos por return preg_replace('[^\w'.preg_quote($custom).']', '', $source);
Espero que esta solución pudiera ayudarlos al igual que me funciono a mi
Saludos y bendiciones
Which php version do you use?
I just installed a new site with Virtuemart 2.0.22a had the exact same error message. I then upgraded to 22b and the error still appears.
HP Built On Linux aboveweb.hostboxer.com 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64
Database Version 5.1.70-cll
Database Collation utf8_general_ci
PHP Version 5.3.24
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 2.5.14 Stable [ Ember ] 01-August-2013 14:00 GMT
PHP 5.4.18
Joomla! 2.5.14
VM 2.0.22b
I had the same error.
The solution from Bufon53 fixed it for me.
Thanks, @Bufon53
Better try
return preg_replace('/([^\w'.preg_quote($custom).'])/', '', $source);
or
return preg_replace('@[^\w'.preg_quote($custom).']@', '', $source);
contributed by Robert from Russian VM community.
I chose the first solution, thx.
Looks like it is not done yet.
I found this
//return preg_replace('/[^\w'.preg_quote($custom).']/', '', $source); //creates error Warning: preg_replace(): Unknown modifier ']'
//return preg_replace('/([^\w'.preg_quote($custom).'])/', '', $source); //Warning: preg_replace(): Unknown modifier ']'
return preg_replace("[^\w".preg_quote($custom)."]", '', $source); //This seems to work even there is no seperator, the change is just the use of " instead '
But the php manual says here http://www.php.net/manual/en/regexp.reference.delimiters.php, that delimiters should be used. But I dont get it running with a delimiter. Hmmm
Hmm, I found this
return preg_replace("~[^\w".preg_quote($custom,'~')."]~", '', $source);
Thank you, Milbo. I will give this a try.
I guess VM 2 is not bug free?
Quote from: toad78 on September 09, 2013, 02:22:19 AM
I guess VM 2 is not bug free?
Answer is in my signature and around my avatar.
Yes, I noticed that prior to my comment.
Thanx for that. This is my work.
Greetings to the participants and the developer!
It looks like it has a continuation?!
Warning: preg_replace() [function.preg-replace]: Unknown modifier ']' in /home/troyandy/public_html/administrator/components/com_virtuemart/helpers/config.php on line 991
VM: 2.0.22c
PHP: 5.2.17
In the version of the problem?
And in the current version, 2.0.22d ?
Oh! Already there is a new version! :) Thanks for the info!
It turned out that the server host was at fault and have lost some php settings!
Fixed and it worked!
After changing the settings on the php frontend error disappeared. And in the backend remains. But after updating to 2.0.22d - gone! Thank you!