Jump to content
Latest News: (loading..)

Recommended Posts

Although spaces in file names are considered a bad thing on the internet, osc allows you to upload an image whose name contains spaces and uses that name for the online version, without any apparent problems.

However I have noticed that recently they have started throwing up errors in google webmaster tools. g has said for a long time that they consider image names containing spaces to be invalid and that it could prevent products showing in g shopping results. The actual error thrown up is weird - it reports as a redirect error, and shows the problem url as the image name up to the first space.

Fortunately the fix is simple - you just need to edit the tep_image function in catalog/includes/functions/html_output.php to make sure that any spaces are converted to %20:

strtr(tep_output_string($src),array(' ' => '%20'))

instead of

tep_output_string($src)

Of course, avoiding spaces in the names in the first place is a good idea too.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×