Hi
I'm using BD 1.31 with CKEditor and have a bunch of embedded pictures in nodes - all included with the CKEditor. So far so good.
When I moved my site from the local webserver to the productive hosting, I realized that all the links of the embedded pictures no longer work.
A short analysis showed that the original links in the src html statement looks like: public_html/installation_directory/files/embedded-pictures/mypicture.jpg
After migration it looks: public_html/files/embedded-pictures/mypicture.jpg - the installation_directory is gone.
My public directory points to "files" and works correctly for image fields. Tokens like [site:url] seem not to work; public:// as a placeholder does not work.
Does anybody know about this issue and why it is implemented like that?
BTW: I just corrected it by a mass update of the body fields, correcting the missing piece in the link.
Thanks for all your support.
Cheers, Rolf
Comments
Hi Rolf, are there some differences between your local server and the productive hosting, e.g. different base URLs like mysite.local/backdrop vs. mysite.com? You could experiment with RewriteBase in .htaccess and Base URL in settings.php to fix the issue.
Hi Olavski
Thanks for your reply. Sure, there are differences in terms of versions of PHP and MySQL but imo nothing what matters.
And, I moved the entire BD installation in the same hosting environment and observed the same problem with loosing the image links.
Cheers, Rolf
That usually happens if the image paths in your content are still pointing to the old location. double-check the file system settings in backdrop and make sure the public files path matches your new setup. If the files themselves copied over fine, it might just be a matter of updating the URLs in the database or clearing caches so backdrop can pick up the right links.
Hi Rolf,
This happens because CKEditor saves absolute or semi-absolute paths in the HTML instead of using Backdrop’s file stream wrappers (like public://). When you move your site to a different directory, those hardcoded paths break.
To prevent this in the future:
Use the File (managed) embedding method in CKEditor, not direct uploads.
Check your “Public file system path” under Admin → Configuration → File system to ensure it matches your new environment.
If needed, run a search-and-replace in the database to fix old links.
Your mass update was the right fix — this issue is known when migrating Backdrop installs with embedded images.