WordPress.org

Ready to get started?Download WordPress

Forums

Incorrect File URL's using http://ywcalancaster.org/wordpress?getfile=xxx (5 posts)

  1. darrennye
    Member
    Posted 4 years ago #

    Initially I had wordpress installed in a subdirectory at http://www.ywcalancaster.org/wordpress/

    And we launched today, pointing a different directory on the web host (where wordpress was installed), to http://ywcalancaster.org

    I had inserted a bunch of images into Pages, while logged in as "admin" and while the site was pointing to http://www.ywcalancaster.org/wordperss/ - and my client was logging in with a user ID of his own, which I had set to "administrator" in "Users" but didn't touch User Access Manager.

    My client would see the infamous "Red X" in the posts, after inserting the image into the post and attempting to Update. He was never able to see his images in the actual page either.

    I was able to upload images as "admin" and insert them into pages, without any problem.I had User Access Manager installed after I installed WordPress, but wasn't really using it's functionality, and I think UAM may have caused the problem I'm describing below:

    Tonight after launching, neither I or my client could see any images on the Web site, that were uploaded as part of a Page/Post.

    I narrowed this down to one thing. Logged in as Admin to the wp-admin, in the "Media" section I can still see the images listed, and looking at the File URL of each image, it displays something like http://ywcalancaster.org/wp-content/uploads/2010/05/imagename.jpg - which appears to be the true path of the image.

    However on each page in the HTML, the images are referenced as http://ywcalancaster.org/wordpress?getfile=xxx

    I have disabled all plugins including User Access Monitor, but to no avail. The HTML remains the same.

    Is there some easy way to revise all the HTML Pages to show the image from the true path? I don't know what image names were actually on which pages!

    I did try adding a new image after disabling UAM and the image displayed normally in both the Media section and on the actual page.

    Please help!

  2. @DiegoVLG
    Member
    Posted 4 years ago #

    Hi,
    I would like to know if you solve it?
    I made an upgrade to wordpress 3 and all my images don't see.
    I visit your site and looks like you solve it.

  3. jomccartin
    Member
    Posted 3 years ago #

    I want to bump this. We were using User Access Manager http://wordpress.org/extend/plugins/user-access-manager/, but we can't turn off safe mode on our server. All links to our files have changed to the yourdomain.com/?getfile=XXXX format, which breaks the site. (Interestingly, this only happened when we updated the site to WP 3.0.4.) We don't mind getting rid of UAM, but want exactly what darrennye wants:

    Is there some easy way to revise all the HTML Pages to show the image from the true path? I don't know what image names were actually on which pages!

    Thanks in advance!!

  4. netagence
    Member
    Posted 3 years ago #

    It seems we are facing the same issue since the upgrade to WP 3.0.4, even though we run dedicated servers and PHP safe mode if off for that site.
    From what I see the plugin UAM creates hard-coded image paths into the published articles, hence when the plugin stops working or when you wish to stop using it, you face that issue of images not appearing anymore. We are currently working on a global path update script in order to get rid of those "getfile" URLs, found many times in hundreds of posts on this site. It seems to me the best way to start again without relying on UAM which we don't need anymore for that site.

  5. Baynard
    Member
    Posted 3 years ago #

    Haven't tried this yet but look forward to getting to it later today. My buddy suggested this code to search and replace link broken by UAM:

    UPDATE wp_posts SET post_excerpt=guid WHERE EXISTS (SELECT *  FROM wp_posts WHERE post_content LIKE '%getfile%' )

    This selects all the post_content rows that contain the word "getfile" and replaces the entire post_content field with the entire guid field. 

    I notice that there are syntax differences between the two fields, but rather than assume you wanted one over the other, the syntax above just moves the guid into post_content - if you want additional html, for example the <a href=" and ">Link Description</a>,  you can add them to the SET statement, for example:

    UPDATE wp_posts SET post_excerpt=<a href="+guid+">Link Description</a> WHERE EXISTS ...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.