[BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Forum rules
Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
Peter Clements
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Tue Nov 08, 2005 12:58 pm
Location: Kent, England, UK
Contact:

[BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by Peter Clements » Sun Sep 07, 2008 10:08 am

Using Joomla! 1.5.6, image paths break when cache is enabled. I also have SEF turned on (all three options enabled).

I initially thought it was something to do with DNS issues when we switched across a new site on a new server but I've just tried turning cache on again and get broken image paths all over the place.

Example:

Paths that SHOULD be:

Code: Select all

/articles/images/overseas-reviews/2008/review-name/image-name-01.jpg
Where this is the correct directory structure on the server where the image is located but with cache on, this is being rendered as:

Code: Select all

/overseas-reviews/2008/articles/images/overseas-reviews/2008/review-name/image-name-01.jpg
"overseas-reviews" and "2008" are also the section and category names in the database, of where the article is located, so perhaps it is this that is being added to the URL in error?

User avatar
Peter Clements
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Tue Nov 08, 2005 12:58 pm
Location: Kent, England, UK
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by Peter Clements » Sat Sep 13, 2008 8:56 pm

I've just done a test, something someone said in another post made me think.

When entering an image using the XStandard editor, there is no leading slash, so image source URLs are something like:

Code: Select all

src="articles/images/uk-reviews/2005/review-name/thumbnails/image-name-01.jpg"
...but when Joomla! renders this page as an Article a leading slash is automatically added (somehow), e.g. like the following:

Code: Select all

src="/articles/images/uk-reviews/2005/review-name/thumbnails/image-name-01.jpg"
This is fine when system cache is off and the first time you visit a page (or rather the first time that page is visited) but once this has been cached and you reload the page, all images are broken.

I've just gone into an Article and manually added leading slashes to 6 image source URLs and then turned system cache on. After visiting the page and then refreshing, would you believe it, those 6 images load fine but the other 30 odd do not.

As this is the default action from the XStandard editor, you can't expect people to have to manually change their code every time they insert an image, so would suggest that this is a bug that needs fixing. I guess it has something to do with the "base" value of each page?

Correction to my first post: I was muddling up links and image paths in my first post. It looks like this bug is also breaking links without a leading slash and it is in fact these that are getting the section and category automatically added to them. This is weird because the links are actually to images, so the section and category that is getting put into the link URL is that of the Article you are viewing.

Surely other people have experienced this? It can't just be me doing something wrong!

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by ircmaxell » Sun Sep 14, 2008 1:47 am

The system SEF plugin NEEDS to come before the cache plugin... It's like this in the default install... You should make sure that it's before...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

User avatar
Peter Clements
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Tue Nov 08, 2005 12:58 pm
Location: Kent, England, UK
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by Peter Clements » Sun Sep 14, 2008 9:45 am

ARGH! >:( >:( >:( I can't believe it was something so simple! >:(

I haven't been changing the order of Plugins so Joomla! must faff with the ordering itself if you mass Disable and/or Enable them, how ridiculous. What's the point in even beling allowed to re-order plugins if it has such a drastic effect on the operation of your Joomla! website? It should at least flag it up with a warning or something.

Anyway, many, many thanks Anthony for the tip, I think this has solved the problem! :) ;D

User avatar
Paddy Landau
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 105
Joined: Mon Apr 10, 2006 7:57 pm
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by Paddy Landau » Sun Sep 14, 2008 2:58 pm

Anthony, thank you for posting the solution. :)

(For me, it only started working after I cleared my browser's cache, restarted the browser, and cleaned the cache, in that order! But it's working now, which is great.)

Peter, thanks for following this up.

Question: Are there any other Plugin modules that need to appear in a specific order? Is this documented anywhere?

I want to make sure I understand something about the cache settings:
  • The cache settings in the Global Configuration refer to the modules and menus.
  • The cache settings in the Plugin Manager refer to the article content.
Have I understood correctly?

This would mean, ideally, enabling both of the caches.

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by ircmaxell » Sun Sep 14, 2008 3:42 pm

Paddy Landau wrote:Anthony, thank you for posting the solution. :)

(For me, it only started working after I cleared my browser's cache, restarted the browser, and cleaned the cache, in that order! But it's working now, which is great.)

Peter, thanks for following this up.

Question: Are there any other Plugin modules that need to appear in a specific order? Is this documented anywhere?
Nope... That's the only one
  • The cache settings in the Global Configuration refer to the modules and menus.
  • The cache settings in the Plugin Manager refer to the article content.
Have I understood correctly?
No...
The cache plugin deals with caching of entire rendered pages ONLY. It has nothing to do with caching article content. The global config deals with everything else BUT the page (aka segments of the page)... You want both enabled...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

User avatar
Paddy Landau
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 105
Joined: Mon Apr 10, 2006 7:57 pm
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.5.6)

Post by Paddy Landau » Sun Sep 14, 2008 6:18 pm

ircmaxell wrote:The cache plugin deals with caching of entire rendered pages ONLY. It has nothing to do with caching article content. The global config deals with everything else BUT the page (aka segments of the page)... You want both enabled...
Thanks for the clarification, Anthony.

kairey
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Mon Apr 10, 2006 11:12 am

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.

Post by kairey » Sat Mar 19, 2011 5:19 pm

Old post I know but this just saved my life on a 1.6 install!

SEF plugin was last on the list, reordered and working great!!!!
Thanks
KEVIN

gorma
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Nov 28, 2007 8:22 pm

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.

Post by gorma » Thu May 05, 2011 8:15 am

Yes, thanks, the Ordering of the SEF/Cache plugin just worked for me too... the default install had this the wrong way around.

You have just saved me tearing out the rest of my hair, many thanks!

aadjeh
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 01, 2006 10:02 pm

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.

Post by aadjeh » Thu Sep 22, 2011 11:07 am

Even in J1.7 this issue appears....
Would have found this topic sooner. Costs me a lot of time!

DutchPeer
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 26, 2010 9:41 pm

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.

Post by DutchPeer » Sun Feb 05, 2012 3:06 pm

A bit late maybe, but I'm experiencing this just as Peter said before, it looks like Joomla turned this trick all by itself. For some reason "out of the blue" I got these issues on SEF and CACHE being "swapped" in order (1.5.25)

Thanks though for the explanation!

User avatar
JohnDevise
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Mon Sep 24, 2012 9:34 am
Location: USA
Contact:

Re: [BUG] System Cache Breaks Image Paths In Articles (J! 1.

Post by JohnDevise » Fri Oct 12, 2012 9:09 am

Hi everyone , I offer another way for solution of this problem - http://forum.joomla.org/viewtopic.php?f ... 0#p2917057 .


Locked

Return to “Joomla! 1.5 Bug Reporting”