• Updated a dev site to 3.9. Tried adding an image to a page via the media library and the resulting syntax has a leading slash that results in a broken link. Same behavior with other types of media (text files, etc.)

    Also, before this release, adding an attachment would result in the full path getting added, now it’s just a relative path (with the incorrect forward slash).

    Is anyone else having this problem?

    Example (I can’t include a link to the site because it contains proprietary customer data):

    Here’s what the code looks like when I insert it into the page (Attachment Display Settings set to Link to NONE):

    <img class="alignleft size-full wp-image-11082" src="/wp-content/uploads/questionmark.png" alt="questionmark" width="300" height="300" />

    If I manually delete the first slash so that the code looks like this, the image displays fine:

    <img class="alignleft size-full wp-image-11082" src="wp-content/uploads/questionmark.png" alt="questionmark" width="300" height="300" />

    Here’s how it looked before I upgrade to 3.9:

    <img class="alignleft size-full wp-image-11082" src="https://www.myserver.com/sitename/wp-content/uploads/questionmark.png" alt="questionmark" width="300" height="300" />

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – re-uploading all files & folders – except the wp-content folder and wp-config.php & root .htaccess files – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    Thread Starter mikebaron

    (@mikebaron)

    Thanks esmi, working through this now.

    I don’t understand how re-uploading a file would help here though because I can get it to work by changing the link syntax. So the file is there and WP recognizes it with this tweak.

    I don’t understand how re-uploading a file would help here though because I can get it to work by changing the link syntax.

    You shouldn’t have to change anything. Something has gone wrong in your installation. The above steps are intended to locate the problem and/or fix it. The fresh upload addresses core file damage during the upgrade.

    My mistake! Plugin incompatibility: https://www.ads-software.com/plugins/abt-relative-urls/

    Deactivated and now complete URL gets inserted properly.

    Problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Media Library, broken links’ is closed to new replies.