Jump to content

4.0.5 - I thought images were going to be relative paths after rebuild?


AutoItScript

Recommended Posts

Just trying a 4.0.4 to 4.0.5 upgrade on a test site, and it doesn't seem to be doing what I thought was the main reason for 4.0.5...

4.0.4 Config - Default install

base_url: https://www.autoitscript.com/ips4clean

Storage Settings for File System (protocol relative): //www.autoitscript.com/ips4clean/uploads

Emoticons and attached images appeared as: src="//www.autoitscript.com/ips4clean/uploads/...."

 

4.0.5 Config After Upgrade and no background tasks pending

Storage Settings for File System: Automatic

Emoticons and attached images appeared as: src="https://www.autoitscript.com/ips4clean/uploads/...."

 

From what I read, I was expecting these to appear as src="/ips4clean/uploads/..." to make URL/CDN changes easier.  If anything, the URLs are now less relative than before.  Or have I just completely misunderstood?

Link to comment
Share on other sites

It can be repoed on a clean 4.0.4 install followed by a 4.0.5 upgrade. It's not going anywhere near my live data yet :)

I'm assuming a https base url for this, not tried with a http one.

If I create a test post (manually editing the DB) to show 3 emoticons having the 3 different possible combinations of URL depending on if it was a 3.4 upgrade or a clean 4 install you have a post like this in the DB:

<p><img src="//www.autoitscript.com/ips4clean/uploads/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>
<p><img src="http://www.autoitscript.com/ips4clean/uploads/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>
<p><img src="https://www.autoitscript.com/ips4clean/uploads/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>

If you then force another post rebuild you end up with this:

<p><img src="//www.autoitscript.com/ips4clean/uploads/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>
<p><img src="https://www.autoitscript.com/ips4clean/uploads/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>
<p><img src="/monthly_2015_05/smile.png.aa9346d7ae24715b2781c1504d6ac230.png" alt=":)" title=":)"> </p>
Link to comment
Share on other sites

The full URLs are still inserted at run time but are not stored in the database that way.

​How is that run time change done?
I used to output Pages uploads fields in the view templates, but the images are now broken since they don’t use the full URL. Is there some base URL variable I need to put in from of it?

Link to comment
Share on other sites

I would assume based on this format specifically that you would use:

In Pages database templates to have the correct file storage configuration used. As existing templates are specifically not upgraded for Pages, this change would need to be made manually for those upgrading that are manually outputting the field data in custom ways.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...