Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

coding problem?

Options
  • 24-04-2007 1:17am
    #1
    Moderators, Society & Culture Moderators Posts: 10,247 Mod ✭✭✭✭


    I tried to install a plugin on wordpress 2.1.3 the other day, but it seems to have caused a few troubles... now whenever I view individual posts on my site all images (bar those in the right sidebar and footer) disappear - including the header images.

    Can anyone tell me what could be causing this? I've trawled through the code but can't find anything obvious - the plugin is deactivated at deleted but the problem persists.

    The site is linked in my sig - adammaguire.com

    Thanks


Comments

  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    The images themselves seem to be missing.

    On the front page it's finding the image at :
    http://www.adammaguire.com/images/logo.jpg

    But from an individual post, it's looking for the same image here :
    http://www.adammaguire.com/blog/2007/04/images/logo.jpg


    I'd guess it's either a problem with your theme, or the SEO friendly links.


    //edit
    try putting a '/' before stating the image location in your theme header file (ie. <img src="/images/logo.jpg" />, instead of <img src="../images/logo.jpg" />)


  • Moderators, Society & Culture Moderators Posts: 10,247 Mod ✭✭✭✭flogen


    Thanks Goodshape - Just dropped a '/' in front of every image that wasn't showing up (always the ones I'm hosting myself) and it seems to be solved - didn't even remove the '..'.

    Any reason why that happened? Seems like a tiny change to solve the problem


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    You should probably get rid of the '..' too -- it won't make a visual difference at this stage, but including the forward slash means it will start looking from the root directory, so the '..' is redundant as there is no parent folder to access.

    Don't know why it happened all of a sudden, and can't see how the plug-in could have changed things, but your image code :

    <img src="../images/logo.jpg" />

    was basically requesting an image from '<parent directory>/images/logo.jpg'. For your homepage this was fine, the parent directory of '/blog/' is '/', but from a single post located at '/blog/2007/04/23/time-for-the-world-to-deal-with-a-real-danger/', the parent directory is '/blog/2007/04/23/' -- and there's no images in '/blog/2007/04/23/images/'.

    Using '/images/' instead of '../images/' makes it start looking from the root directory, rather than the parent.


Advertisement