WordPress.org

Ready to get started?Download WordPress

Forums

Upload.php href not including script name on IIS (13 posts)

  1. blank22
    Member
    Posted 6 years ago #

    I have a server with several different versions of WP running on it. All of the standard WordPress files are intact.

    Basically, the problem I am experiencing is that all of the links within the upload.php do not reference the file upload.php. They all end up as "/wp-admin/?query=string&for=upload&is=here". This is not happening on other installations, including WP 2.2.

    Could it be that something introduced between 2.2 and 2.3 would have caused this?

    This is not a permissions problem. I have no problem uploading diles. I just have trouble doing things with them because I cannot get beyond the initial upload.php page (everything else goes to the admin index).

    SERVER: Windows 2003/IIS 6

  2. blank22
    Member
    Posted 6 years ago #

    Alright... it's been a week, so I figure that if I'm ever to get a response, I should let a fresh pair of eyes take a look.

    bump.

  3. blank22
    Member
    Posted 6 years ago #

    Alright, the problem is still present in WP 2.3.1 and nobody has responded to this post.

    Is there some additional information needed? This is a pretty mission critical problem as I cannot adequately manage uploads.

    Did I post in the wrong place? Someone at least reply!

  4. Sjroep
    Member
    Posted 6 years ago #

    Basically I can't get my head around your problem. But I'm not very experienced so that might be it.

  5. blank22
    Member
    Posted 6 years ago #

    Latest WordPress version. I did not (and do not) have this problem with WordPress 2.2 on the same server.

    On /wp-admin/upload.php, there is no reference to upload.php in any link on the page.

    Incorrect behavior (what I am seeing):
    <a href="http://domain/wp-admin/?action=edit&ID=13">

    Correct behavior:
    <a href="http://domain/wp-admin/upload.php?action=edit&ID=13">

  6. lifthere
    Member
    Posted 6 years ago #

    upload.php is has a function called clean_url() that is not returning the correct prefix for the url string of upload.php.

  7. lifthere
    Member
    Posted 6 years ago #

    its not the clean_url I just commented it out "$_href = clean_url( $href);" in the upload.php file and was able to see the link with the correct url, but when clicked nothing happens. Interestingly enough if I open the page for example "upload.php?style=inline&tab=browse-all&post_id=2&_wpnonce=bac8d5d2fc&ID&action&paged" browse content comes up fine. I found another post saying that you had to make a default doc of upload.php be at a higher position than index.php, but that just renders the dashboard on entrance useless.

  8. benji69
    Member
    Posted 6 years ago #

    I replaced the clean_url line and replaced with the following:
    //$_href = clean_url( $href ); // <-- This does not work on Windows
    //$BH_temp = explode("?", clean_url( $href ));
    //$href = 'upload.php?' . $BH_temp[1];
    $_href = $href;

    That works far enough to display the first page of uploads but when you want to browse to a second page the string "uploads.php" has once again disapered from the href.

  9. benji69
    Member
    Posted 6 years ago #

    Sorry the code should be:

    //$_href = clean_url( $href ); // <-- This does not work on Windows
    $BH_temp = explode("?", clean_url( $href ));
    $href = 'upload.php?' . $BH_temp[1];
    $_href = $href;

  10. benji69
    Member
    Posted 6 years ago #

    I now got the paginating to work with a realy ugly hack:

    $page_links = paginate_links( array(
    //'base' => add_query_arg( 'paged', '%#%' ), // <-- This does not work on Windows
    'base' => 'upload.php?style=inline&tab=browse-all&paged=%#%',

    The only problem with this one is that when you browse to, for example, page 2 of the uploads the tab "Upload file" dissapears.

    If there's someone who have greater knowledge of WP and how it's build up this bug shouldn't be to hard to fix. Alla that happens is that it doesn't write out the part of the string that is most fundamental "upload.php".

  11. Loughlin
    Member
    Posted 6 years ago #

    I have posted a hacky fix for WP 2.3.3 here:

    http://wordpress.org/support/topic/152182

    that fixes the upload bug that causes the wordpress admin page to open in the frame that should contain the upload window.

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    It's not an upload bug, it's an IIS bug. You would not see this problem on Apache.

    Anyway, the true fix is here:
    http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/

    That will not only fix this issue, but issues with any script using the REQUEST_URI field.

  13. Loughlin
    Member
    Posted 6 years ago #

    Thanks for that. I ment it was a bug to do with upload.php not being properly referenced by IIS.

Topic Closed

This topic has been closed to new replies.

About this Topic