Keyword

Broken Images in /Item directory

  • NOT_YOURS
  • NOT_YOURS's Avatar Topic Author
  • Offline
  • New Member
More
13 years 10 months ago #90516 by NOT_YOURS
Broken Images in /Item directory was created by NOT_YOURS
Hi,
Joomla 1.15
K2 v2.4.1
PHP 5.2.9
I'm not sure why this is occurring but it has only started since my using of K2 content component.

When I create an item/article and preview it on my live site.  I see that images from a custom module in my right-hand column are broken.  Not all images on the page, just those from my custom module.

Obviously this is occurring because the item pages are two-levels deep and the path to my images is broken.  But what I don't understand is that the image paths in the module are based on the base directory of the site.  So regardless of WHERE the user is on my site, it's always using the base directory path to generate the locations of my image items.

"/templates/$template/images/image.jpg"

When I enter that path directly into the browser after my domain name, the image appears, so 100% the image is there on the server (plus, my other root level pages are fine).  

Why is it not working within /home/item/page.html?

Also, one other question... is it possible to have item/article URLs published to root instead of to home/items?

Thanks,
NOT_YOURS

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90517 by Adrian Paun
Replied by Adrian Paun on topic Broken Images in /Item directory
That thing happen because K2 use a general CSS wich enter in conflict with Joomla template.css

Chech you're css and combine him with K2 css and you should be done.

Please Log in or Create an account to join the conversation.

  • NOT_YOURS
  • NOT_YOURS's Avatar Topic Author
  • Offline
  • New Member
More
13 years 10 months ago #90518 by NOT_YOURS
Replied by NOT_YOURS on topic Broken Images in /Item directory
Why would the css file break my images? They are not being served up via css... but my a straight img tag. How do I combine my css with k2 css?

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #90519 by Adrian Paun
Replied by Adrian Paun on topic Broken Images in /Item directory
I'm not saying your images are served up via a css file, but thy are part of your page, and your page have the standart template.css file stored in templates/template_name/css/template.css

K2 use a permanent css load file stored in components/k2/css/k2.css

You should chech if your image use now some of k2 classes or div's after install, because that css file it will be loaded by your index page everi time, even if your index page it's not using k2 component.

Install firefox and firebug and then see if that image have some css style added now, etc. if you need more detail, you could give me your website link to take a closer look and see if I can help you out.

Please Log in or Create an account to join the conversation.

  • NOT_YOURS
  • NOT_YOURS's Avatar Topic Author
  • Offline
  • New Member
More
13 years 10 months ago #90520 by NOT_YOURS
Replied by NOT_YOURS on topic Broken Images in /Item directory
Update: I had to do some learning on the template structure of K2 and how it interacts with Joomla as you instructed. I have successfully created my custom template and uploaded it to the template folder. I'm confident the css issue is fixed that you pointed out, however, some of the images from my modules are still broken.

Another thing I noticed too is that when I am editing an item, and I try and insert an image into the body of the item, the images are broken in the body of the article too.

Again, I believe this is 100% correlated to the fact that my item is located at domain.com/home/item/item.html and the paths to these images are breaking.

Please Log in or Create an account to join the conversation.

  • NOT_YOURS
  • NOT_YOURS's Avatar Topic Author
  • Offline
  • New Member
More
13 years 10 months ago #90521 by NOT_YOURS
Replied by NOT_YOURS on topic Broken Images in /Item directory
I forgot to mention that my paths do not have classes, so there is no conflict with the K2 base css file. Thanks for your help!

Please Log in or Create an account to join the conversation.

  • NOT_YOURS
  • NOT_YOURS's Avatar Topic Author
  • Offline
  • New Member
More
13 years 10 months ago #90522 by NOT_YOURS
Replied by NOT_YOURS on topic Broken Images in /Item directory
I was able to fix the issue. I uninstalled JCE, then re-installed it... set paths to absolute and that fixed the issue. So in the end, it had nothing to do with K2. Thanks for your support!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum