Page 1 of 1
[SOLVED]No images in news articles
Posted: Tue Oct 05, 2010 11:39 am
by dado
Hi,
I am having troubles with CMSms on my local host.
I can insert image into an news article, but when I try to view the article on the website there is no image, only white space with same dimensions as the image, but no image.
In the Page Source, I can see the valid img tag with the correct image link: uploads/images/logo.gif.
I also checked which image types are allowed to be uploaded in the options of the news module, and everything is fine.
I have no problems viewing images on Pages (Home, About, Services etc.), just in news articles.
Re: No images in news articles
Posted: Tue Oct 05, 2010 12:18 pm
by Peciura
Post link to your site and News template (the one you do not see images).
Here you might find some useful info on CMSms debugging
http://wiki.cmsmadesimple.org/index.php ... ode.2Fsite
Re: No images in news articles
Posted: Tue Oct 05, 2010 1:30 pm
by dado
I can't post a link, the site is on my local computer.
I noticed that this happens only in
Detail view of a article. In the
Summary view there is no problem, I can see the images.
When I
View Image Info (this is a tool integrated into Firefox), it show me all links to the images, including those beloging to the website layout, this are the image links:
http://localhost/cms/uploads/CleanPortf ... ground.jpg
http://localhost/cms/uploads/CleanPortfolio/logo.png
http://localhost/cms/news/5/61/uploads/images/logo1.gif
http://localhost/cms/news/5/61/uploads/ ... ertise.jpg
http://localhost/cms/uploads/CleanPortfolio/footer2.jpg
http://localhost/cms/uploads/CleanPortf ... cebook.png
http://localhost/cms/uploads/CleanPortfolio/Twitter.png
http://localhost/cms/uploads/CleanPortf ... icious.png
http://localhost/cms/uploads/CleanPortfolio/footer.jpg
This bolded images are missing. You can see that the links to this two images are different, I don't know why.
The
advertise.jpg image is hardcoded into the site template. This image is visible on all pages, the image link on this pages looks like this
http://localhost/cms/uploads/CleanPortf ... ertise.jpg. But when I click on
Read more link, to read the article, the link to this image change into
http://localhost/cms/news/5/61/uploads/ ... ertise.jpg and the image bacame invisible.
This happens with the images in the news articles too. They are visible in the
Summary view, but disappear in the
Detail view. The link changes too, from
http://localhost/cms/uploads/images/logo1.gif[b] to http://localhost/cms/news/5/61/uploads/ ... ogo1.gif[b].
Help.
Re: No images in news articles
Posted: Tue Oct 05, 2010 4:47 pm
by Peciura
Obviously it happens due to pretty url and relative path to image and incorrect url base. Try adding this to "Global Metadata:" or atleast to "Page Specific Metadata:"
or call metadata tag with parameter showbase='true'
or set use_hierarchy true
They all should end up with
Code: Select all
<base href="http://localhost/cms/"/>
in section.
Re: No images in news articles
Posted: Tue Oct 05, 2010 5:09 pm
by dado