Aha ... that makes sense ... the preg_match would croak on having a + symbol ... because Regular Expressions use + as a special parameter for pattern matching ... and Zen Cart isn't expecting to have + symbols in filenames ...
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I'm having this same issue. I made the two changes suggested in the thread and now get a zillion of these on the page:
Warning: preg_match(): Unknown modifier 'b' in /Applications/xampp/htdocs/includes/modules/additional_images.php on line 47
When I uncomment this line (46)
if(preg_match("/" . $products_image_match . "/i", $file) == '1') {
I get just one error:
Parse error: parse error, unexpected $ in /Applications/xampp/htdocs/includes/modules/additional_images.php on line 114
Only I can't figure out where anything is missing. I should say I'm a novice at PHP but a quick learner!
Any ideas!? When i uncommented that line did I need to add something elsewhere? Thanks so much.
Thanks-
Amy
check your image filenames - l got this error in one category only, and upon checking the image names, found that they contained spaces, and lots of symbols ( ) ; - etc - once l renamed them all to something 'clean', the problem disappeared alltogether :-)
I've done all the updates - also changed all 290 images in the store to a clean name but still get the error Warning: preg_match() [function.preg-match]: Unknown modifier '3' in /home/cq2730/public_html/store/includes/modules/additional_images.php on line 47. Can someone help me?
www.eventboutique.ca/store
Did you make the changes suggested in posts 2 & 4 above? You should not need to, as those lines did not cause the reported problem, and the post 4 change would actually cause a different error in some conditions.
Don't use [ and ] in the image names.
More info How do I add multiple images to a product?
zensational
There was only one of the updates that I changed. As for the images - there are only a couple with [ ] in them. There are still images like the engraved beer mug which doesn't have the brackets and the error is still there. The only brackets are shown in the toolbar as the listed model number.
Your engraved beermug is available under:
Products_id=233 and the image is placed under:images/30008-L[1].jpg --> [] in the filename
and
Products_id=159 and the image translated under path :images//30008-L.jpg --> double // is because of wrong filename or incorrect images directory -> no picture shown.
Image available is under images/30008L.jpg
zensational
Thank you everyone for your help. I had duplicate products (and didn't have each image updated). I have changed all of the image files - thank you guys for your help!
Bookmarks