Support » Fixing WordPress » “Insert Into Post” Not Working Properly for PDF links on HOME PAGE

  • Hi Everyone:

    I’m encountering a rather strange problem. I’ve never seen an issue like this with WordPress, so hopefully one of you can help!

    Here’s the issue:

    When editing the home page of the website, I’m having trouble uploading & linking to pdfs. Basically, if I click the “Add Media” button and upload a pdf, it uploads properly. Then I select “File URL” in the “link to” section and click “Insert Into Post” to place the link onto the page … this works properly too.

    HOWEVER, when I save the changes to the page, something happens! It changes the link, that originally pointed to the pdf file, into a link that points to the pdf post.

    So for example…

    I upload a pdf and link to it at using the “Insert Into Post” button.

    However, once I save the page, the link is automatically changed to

    Here’s the REALLY WEIRD part … this is only happening on the home page. We can upload and link to pdfs properly from any other page on the website. I even created a new home page and deleted the old one, and I’m still having the same problem.

    I’ve also noticed that if I remove the “rel” tag from the link, the problem goes away. However, I need to get this fixed so that the “rel” attribute doesn’t have to be removed.

    I’ve searched for other people having the same problem, and the only person I’ve found that had a similar issue was someone that was beta testing version 2.5. Here’s a link to that issue. (this guy also reported that the “rel” attribute seemed to be the problem.)

    I’m not sure what other information you might need, so I’ll try to give you some random additional information that may or may not be useful.

    1. Permalink structure is set to /%postname%/ ….. I tried changing the permalink structure back to the default, but the problem still existed.

    2. Active plugins: SEO Title Tag, Dashboard Editor

    3. url of the website that’s having trouble is:

    Please let me know if you have any questions.

    Thanks in advance for your help.


Viewing 8 replies - 1 through 8 (of 8 total)
  • *bump*

    Sorry for the bump … I’ve spent many hours looking for a solution to this and can’t find anything. Any assistance would be GREATLY appreciated!








    Hey JB,

    Having exactly the same problem, shame no-one else is interested! I am a WordPress newbie, so can’t really offer any advice, only more input & some sympathy!

    I’m running 2.6.3

    I’m using a different page template for the home page, but I don’t know if that is affecting it? Are you doing the same?

    I am also using permalinks, but the default: /%year%/%monthnum%/%day%/%postname%/

    I have NO plugins as it is just a rebuild of a very simple 6 page site that I moved to a new server (for some reason it wouldn’t import the xml file from the other site. as it is so basic I just pasted across the page content). This didn’t happen on the other version. What gives?!

    Did you ever get this sorted? I am about to hand this over as a basic CMS install for a client & am reluctant to have to give them troublesome workarounds to use.

    Cheerio for now!


    I work off of several WP blogs with different versions.

    In older versions, I could simply upload the attachement like a photo and then it would create the link.

    Now on 2.7.1 I find that I need to upload it using the MEDIA—NEW and then VIEW it to get the link location. Copy the link and then create it back in the post.

    Hello again. I actually came across this bug again, when I came to upgrade to 2.7 for this client & hoped the upgrade might sort it. Sadly no & it still will not let me insert a pdf on a static home page using the normal visual mode workflow.

    This is a real pain because I am using this in a few applications where the clients really aren’t capable of going in and editing the html themselves. @jfrenaye, thanks for the help & that is what I have had to resort to doing myself to upload their files for them, but it just defeats the whole objects of setting them up a CMS.

    I did actually find another thread on this :

    which has a workaround where you strip out the ‘rel’ attributes from the link, which seems to be what is messing things up. There is also talk in this thread of it being logged as a bug, so hopefully it will be sorted soon.

    I came across what I think is the same problem, and here is how I am able to insert a PDF.

    1) Click on the Insert (Add an Image) icon, and select the PDF you want to upload from your computer.

    2) The PDF will be added to your Gallery. There, click on the link “Show”.

    3) This will then expand to allow you to edit Title, Caption, Description and Link URL. Under Link URL you will see buttons for “None”, “File URL”, and “Post URL”.

    4) Click on “File URL”. This is IMPORTANT as it is what will add the “link” portion of the file to your post. Otherwise, the text will simply appear in the post but with no link.

    5) Click on “Insert into Post”.

    Hope that helps!


    I am having a similar issue except instead of a bad link it ALWAYS uses the post link.

    1. On the home page.
    2. Upload media into library
    3. Click “show” on desired file in library
    4. Click on File URL for PDF in question
    5. Click on “insert into post” button.
    6. update or save page
    7. check the page link
    8. link now magically uses the post link and not the file link.

    This is on an upgraded WPMU 2.8.1 with PHP 5.1.2 on Apache2 with the Suhosin patch (0.9.6)..

    My friends i extracted all files related to WP html editor bcoz i only want to use this editor on my web site and it work on my Y the problem of insert into post ..I am also being crazy.
    This is strange that no one suggest the technical solution/problem. I am confuse if any domain related problem and mix url problem exist (from admin Setting/general ) etc etc.
    The problem comes from two files media-upload.php (belongs to wp-admin\media-upload.php) and media-upload.js(wp-admin/js/medail-upload.js)
    This code win.send_to_editor(‘<?php echo addslashes($html); ?>’); in file media-upload.php does not call javascrip function send_to_editor(b) from media-upload.js(wp-admin/js/medail-upload.js).
    the main work to assign image from image uploader panel to textarea goes to a.execCommand(“mceInsertContent”,false,b) from media-upload.js. But i am still in problem y sometime it does not invoke. Well i wll mail the exact solution of it soon ..just now i am using 2.8.4 and looking if this too give same problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘“Insert Into Post” Not Working Properly for PDF links on HOME PAGE’ is closed to new replies.