File path issue after building in subdirectory and then going live
Permalink 1 user found helpful
I recently went live with the following websitehttp://www.forlocksky.com. I built it as a subdirectory underhttp://www.barkingtuna.com/fortlocks.... Long story short, when using the design customize area of the page settings, any time I add an image, it tries to pull it from the old production path and not the live website. Example... go tohttp://www.fortlocksky.com/self-storage-locations/fort-locks-dixie-... . You will see a green garage door background image in the header area. It wasn't showing up and I noticed that it was attempting to following (barkingtuna.com/)fortlocks/application/files/9114/4129/6299/door.jpg to get to the file... the old production site path. I got around that adding the following CSS:
.ccm-page .c5h-page-meta-wrap {
background-image: url('/application/files/9114/4129/6299/door.jpg');
}
I have the Canonical URL set tohttp://www.fortlocksky.com AND added a 301 Redirect in the .htaccess file as such: RedirectMatch 301 /fortlocks/(.*)http://www.fortlocksky.com/$1
Now, all traffic tohttp://www.barkingtuna.com/fortlocks... goes tohttp://www.fortlocksky.com as intended, but the theme customizer is still trying to reference the old path. I've refreshed cache, disabled all caching, refreshed again and nothing.
Why does the Theme want to hold onto this path when everything else is fine?
.ccm-page .c5h-page-meta-wrap {
background-image: url('/application/files/9114/4129/6299/door.jpg');
}
I have the Canonical URL set tohttp://www.fortlocksky.com AND added a 301 Redirect in the .htaccess file as such: RedirectMatch 301 /fortlocks/(.*)http://www.fortlocksky.com/$1
Now, all traffic tohttp://www.barkingtuna.com/fortlocks... goes tohttp://www.fortlocksky.com as intended, but the theme customizer is still trying to reference the old path. I've refreshed cache, disabled all caching, refreshed again and nothing.
Why does the Theme want to hold onto this path when everything else is fine?
If you have cleared the cache, you might try the brute force approach: deleting everything in application/files/cache - that really will ensure the cache is cleared.
Wish it were that easy... Been there, done that multiple times. Not the issue. Turned off all caching, refreshed cache, logged in and out, danced at my desk, saged my office etc. Nothing... :)
OK, you've piqued my interest. I did an install into a subfolder, fiddled with a few styles and then moved it, cleared cache and sure enough, the subfolder is being referenced. Nothing in files under application, so it has to be the database. Dumped the database and searched for the subfolder name. I found it popping up in three tables:
FeatureAssignments
PageTypeComposerFormLayoutSetControls
StyleCustomizerValues
Seems a bug has been reported:
https://www.concrete5.org/developers/bugs/5-7-4-2/style-customiser-d...
Those tables appear to container serialised object data, so it's likely unwise to fiddle with the contents.
Maybe the way round this is to reset your styles and start again. Not the answer you're looking for, but not a lot else you can do, other than the mod_rewrite you're already done.
FeatureAssignments
PageTypeComposerFormLayoutSetControls
StyleCustomizerValues
Seems a bug has been reported:
https://www.concrete5.org/developers/bugs/5-7-4-2/style-customiser-d...
Those tables appear to container serialised object data, so it's likely unwise to fiddle with the contents.
Maybe the way round this is to reset your styles and start again. Not the answer you're looking for, but not a lot else you can do, other than the mod_rewrite you're already done.
Thanks for taking the time to verify that this isn't unique to me. I was away all weekend at a Boy Scout campout with my son or I would have responded earlier.