bigbob2 Posted September 13, 2012 Share Posted September 13, 2012 Yesterday we noticed that some product images would only show in the thumbnail, not on the product page. I tracked it down to having an apostrophe in the title e.g. men's makes the image not show. If I remove the apostrophe it shows up again. This seems to be a new thing as it has never had this problem before. Any ideas? Cheers Kev Link to comment Share on other sites More sharing options...
britchops Posted September 13, 2012 Share Posted September 13, 2012 I believe you need to add a / with any ' in php script. Sorry i cant be any more helpful, just a beginner myself! britchops Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2012 Share Posted September 13, 2012 @@bigbob2 The product title should be exempt from the /' exception. Check the html output string to ensure it is set properly. Chris Link to comment Share on other sites More sharing options...
bigbob2 Posted September 13, 2012 Author Share Posted September 13, 2012 Hi Chris, I'm sorry, could you please elaborate on "Check the html output string to ensure it is set properly", I'm not sure what it means. Cheers Kev Link to comment Share on other sites More sharing options...
MrPhil Posted September 14, 2012 Share Posted September 14, 2012 Do a View > Page Source to see the HTML sent to the browser. Go to the image in question (<img> tag). What does its code look like? I'm not clear on whether the image file name has a ' in it, or the title= or alt= attribute strings have a ' or are not being sent over correctly because a ' ends the PHP string or cuts off a database field. For the file name, ' may or may not be legal as a file name, depending on what your server is running on. What shows up in the HTML for a file name, and can you manually load that image using that exact name? You might have to rename the file to drop the '. For the title or alt text, how is it coming over in the HTML? Is the attribute string delimited by ' or "? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.