The content of my site often has images along with text. I use the backend admin tool to load content, and upload images to the fileserver with the Media Manager. I use the Image button below the WYSIWYG editor to insert into my content a reference to an uploaded image. I use the same method when creating an article as well as in the description field of a section or category.
My section and category links are blog layouts that have Show Description set to yes, and no article or article links pulled in. So all content for the section and category pages are placed in the description field of the section or category. My article links are plain old article layouts.
On the section blog pages and article layout pages, any images I inserted into the text/description properly show up on the front end. But on category blog pages, it does not.
I looked into this and I think I discovered the cause: when using the in-editor Media Manager via the Image link below the WYSIWYG editor to insert an image into an article, category, or section, it inserts it without a leading slash, such as
Code: Select all
<img src="images/content/image2.jpg" border="0" />
However, somewhere in the Joomla code it seems to add a leading slash to that img tag, as when I view the source on an article or section page on the front end, the code is
Code: Select all
<img src="/images/content/image2.jpg" border="0" />
However, for category blog pages, that leading slash is not inserted, and hence the image cannot be found as it looks for the images folder to be relevant to the current URL, which it is not - it is relative to the main domain. Not sure where in the code those leading slashes are added, though.
Interestingly, if you set the category blog link to show description but also put in articles, any images in the category description are missing the leading slash before images/ and therefore cannot be found, but any images in the articles that are displayed there do have the leading slash and do appear, just like if you have one article by itself on an article layout page. So this seems to be done at whatever level pulls in the contents of an article or category, not at the view level.
Joomla version: RC3 with SEF URLs and mod_rewrite turned on
System info: PHP 5.1.6
Steps to replicate:
1. Create a new category
2. Put some text in the category description field, and use the Media Manager via the Image button-initiated's in-editor popup to insert an image into the description field.
3. Save the category, then create a menu link to the category, of type Category Blog Layout. Set Show Description to yes.
4. Check out that category page on your front end. The text from the description field will appear, but not the image (not there at all in Firefox, red x in place of image in IE 6).
Proposed fix(es): See last 2 paragraphs under "Description of bug".