FoodAssets Posted March 3, 2016 Share Posted March 3, 2016 (edited) Hi all,Using PrestaShop Version 1.6.1.2Strange issue here with trying to change the header image (logo) on my website. Sometime last year we had changed domain names from 'http://survivalacres.com' to 'http://foodassets.com'. The site was transitioned over from an older version of Presta 1.5 to 1.6 by DesignHaus, but left badly broken and required a great deal of intervention to fix. So far most of the bugs have been worked out...... except the following issue:1) The name of the logo image I am trying to upload is: food_assets_logo.png.2) Uploading the image is successful through preferences>themes>logo (it will appear on the website).3) However, clicking the image properties in a browser window (or view source code) shows this image has been renamed to: 'http://foodassets.com/img/survival-acres-logo-1457027282.jpg'I have tried several things now:1) Physically deleting the 'renamed' image through FTP.2) Clearing the cache on both browser and Prestashop.3) Verified that this isn't an issue with the browser I am using (it does this on Chrome, Firefox, Safari, Opera, IE.)4) Renaming the image in FTP (this breaks the image on the site). Subsequently, uploading the logo again works, but it gets 'renamed' by Prestashop to 'http://foodassets.com/img/survival-acres-logo-1457027282.jpg'.It's also renaming the images for email and invoices headers too in the same fashion, always inserting "survival-acres-logo" into the image names.We suspect there is some sort of configuration setting, or even hard-coded value somewhere that is causing this. We really need some help on where to look for this and how these images are having this "survival-acres-logo" inserted into their names. Edited March 3, 2016 by FoodAssets (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted March 4, 2016 Share Posted March 4, 2016 This is most likely due the the fact that logo.jpg already exist in the img folder have you deleted all files from here starting with logo. To get this to be just logo.jpg you may even need to edit the configuration table in the database the logos are registered here and is why just renaming does not work. For the survival addition not sure as this is the first time I have seen adding teat before the logo mail logo should just be logomail.jpg. Link to comment Share on other sites More sharing options...
FoodAssets Posted March 4, 2016 Author Share Posted March 4, 2016 Yes, deleted the files in the img folder. This didn't help, as PS continued to assign the survival-acres to the image name when logo image was re-uploaded through the back office. I found a fix and will share. I've not re-uploaded the logo image to test this fix below to see if PS still appends the survival-acres string to the image name (it might, just don't know yet), just fixed the stored reference data to the image in the ps_xxx tables. Since I discovered a lot of bad references in the steps below, I'm assuming re-uploading the image will NOT try to insert survival-acres to the image name like it was doing before. In MySql, select all the tables in the database and search for all the strings (one by one) that aren't supposed to be there if you've moved your site to a new domain. You could also do this to search for anything else that should or should not be in your tables. I searched for all of these: survivalacres, survival acres, survival-acres, /shop, etc. The search found hundreds of references in about a dozen tables that were still incorrect (this is where we had problems with the clown we hired). Even the ps_shop table still had 'survivalacres' in it, the ps_configuration also had a bad reference in it. Most of the ps_lang_xx tables did too. In other words, they left our site broken for months. Edit the ps_xxx table that has the errors. You can issue a SQL command (back up your table first!) to update the column values if needed, this will change all rows in the table all at once (so be careful). I only wanted to change the substring, not the entire thing, so this is what I used: Example: UPDATE `ps_product_lang` SET `description` = REPLACE( `description` , 'https://survivalacres.com/shop', 'http://foodassets.com' ); Some tables should be left alone. I updated the ps_lang tables mostly. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now