WordPress.org

Ready to get started?Download WordPress

Forums

Upload Photos MAJOR error (24 posts)

  1. melanierod
    Member
    Posted 6 years ago #

    I upgraded my version of wordpress and everything was working fine until yesterday. If I try to upload a photo or browse all photos, instead of the usual popping up, the dashboard loads in the image space. Any ideas?

  2. melanierod
    Member
    Posted 6 years ago #

    This is still not working. I can now upload to the server (still cannot browse) but now the box is filled with an error message that i cannot quite read and when I try to send the file to the editor, it will only send a link. No Photo. Has anyone else had this problem?

  3. jervolpe
    Member
    Posted 6 years ago #

    I am receiving errors relating to WP (2.3) not being about to create Thumbnails when importing graphics due my exceeding memory limits (some number mentioned over 22MB limit). I am trying to upload very small jpg images too (less than 20k). The server has over 1 GB or ram and dedicated to this website.

  4. mparkes
    Member
    Posted 6 years ago #

    I am getting the same error - when I click the browse all tab, i get a preview of the admin site. If I click on the Manage > Uploads, I see all of my thumbnails, but if I click on one of them to edit the page just loads the admin site. Is this just a problem with the latet build of WP? Can I try an earlier build and see if that fixes the issue? As a workaround I am trying the flickr photo plugin, but I would like to get the basic upload function working first! thanks

  5. mparkes
    Member
    Posted 6 years ago #

    I was able to successfully install the flickr plugin from tantannoodles, and finally got it working (at least my flickr galleries are showing up on the options page for the flickr plugin) - but when editing a post, if I try to click on ANY of the photo upload tabs (Upload, Browse, Browse all, Photos , Albums) it just loads the default admin page.

  6. mparkes
    Member
    Posted 6 years ago #

    In my continued effort to track down what is causing dashboard to load in the image gallery space, it seems that "upload.php' is being stripped out of the url for each of the tab links, so that when you click on "Browse", instead of the url being:

    http://www.spfarm.com/wp/wp-admin/upload.php?style=inline&tab=browse&post_id=16

    what is ctually being generated is:
    http://www.spfarm.com/wp/wp-admin/?style=inline&tab=browse&post_id=16

    Therefore, this link is seen as a call to the default admin page, ignoring all of the querystring values.
    So that explains what is happening... but it doesn't explain WHY its happening.
    I have dug around in the code for 'wp-admin/upload.php' and can see that the url string is being created as part of an array (?) but not being a php coder, I am somewhat at a loss to troubleshoot.

    Or... if someone could offer a fix to force the addition of 'upload.php' into the string...
    thanks for any help!
    BTW I am running WP 2.3 on a windows server.. and all other functionality of the site is working fine as far as I can tell... photo uploads are working fine... just this gallery pane seems broken... :(

  7. mparkes
    Member
    Posted 6 years ago #

    Okay, until someone a lot smarter than me can correct the real problem on this issue, here is a solution that works:

    Open 'upload.php' in the 'wp-admin' directory

    Find the line '$_href = clean_url( $href);'

    Immediately after this line, add the following:

    $_href = str_replace("?","upload.php?",$_href);

    this adds the missing reference to 'upload.php' into the url string. Now the tabs for Browse, Browse all, for your photos should work.

  8. mparkes
    Member
    Posted 6 years ago #

    I also ended up needing to edit
    /wp-admin/include/upload.php
    to allow the indovidual editing of each image appearing on the 'Manage>Uploads' page...

    added the following around line 312
    ...after the code that reads:

    echo "<ul id='upload-files'>\n";
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $href = wp_specialchars( add_query_arg( array(
    'action' => 'inline' == $style ? 'view' : 'edit',
    'ID' => get_the_ID())
    ), 1 );

    ...add

    $href=str_replace("?","upload.php?",$href);

  9. melanierod
    Member
    Posted 6 years ago #

    Mparkes... that's awesome. But I still can't get a thumbnail to show up or even an option to send image to editor. That's not a problem for me, but I have people who post on my site that do not know how to change the code.

  10. mparkes
    Member
    Posted 6 years ago #

    Melanierod, did you try the edits that I suggested? And it still doesn't work? What kind of server are you on, is it Windows by chance? I think that's what is causing my problems - the fact that I am on a windows host. But that is just a guess.

    Anyway, I came across another error related to this issue, that has to do with editing your older blog entries on the admin section, if you go to "manage > posts" down at the bottom of the page there is a link for "Previous Entries"... well when I click that it kicks me right back to the admin start page, just like the photo gallery links were doing.

    I'll try and patch that too and post back here with a fix. Are you experiencing the same thing?

  11. melanierod
    Member
    Posted 6 years ago #

    Actually, mparkes... now that I go back, it is doing that. And I actually had one of my contributers call me yesterday because the upload box is still kicking him back to the admin page after the fix.

    I'm not sure what's going on with the server, its a company server (shared) and i'm almost positive its a windows server. I've found that the server is the root of a lot of issues for this site.

  12. bob291
    Member
    Posted 6 years ago #

    Same happening with my new install, done by the hosting company on a remote windows 2003 server computer. I'm not sure what version WP they have installed (is there a way to check this?). Admin/manage/uploads only shows the thumbnails and clicking on one brings up the admin dashboard. Same happens if in writing a post I click the 'browse all' button.

    It seems a patch is in order.

  13. bozley
    Member
    Posted 6 years ago #

    Same thing happened for me - windows Wp install. Thanks to mparkes solution it's ok, however I had to also edit wp-admin/upload.php line 113.

    Changed:
    $page_links = "<span id='current-tab-nav'>:$page_links</span>";
    to:
    $page_links = "<span id='current-tab-nav'>:".str_replace("?","upload.php?",$page_links)."</span>";

  14. bozley
    Member
    Posted 6 years ago #

    oops - I forgot to close the bracket:
    $page_links = "<span id='current-tab-nav'>:".str_replace("?","upload.php?",$page_links)."</span>";

    It rewrites the links for the page links in the 'browse all' menu.

  15. johnny9k
    Member
    Posted 6 years ago #

    Awesome! This fixed my problems.
    Thank you!

  16. gosforth
    Member
    Posted 6 years ago #

  17. MytyMyky
    Member
    Posted 6 years ago #

    I had this problem, and a similar one with an upload plugin called flexible upload. (also using WordPress on a Windows server as some of the posters above).

    I eventually found the problem in a sevrer variable:
    $_SERVER['REQUEST_URI']
    which created the path, but left out the script's filename.
    Changing it to $_SERVER['PHPSELF'] resolved the problem.

    Unfortunately, in this case, I was unable to find a similar variable in the upload.php file (clean_url() comes from which file?).

    Anyway, the workaround mention above worked for me, too.

  18. scolen2
    Member
    Posted 6 years ago #

    mparkes and bozley are right on the money. My problem is solved!

    Not sure what you meant gosforth, I could never find that line.

    BTW, I'm NOT on a windows server. So, it appears to occur on unix as well.

  19. Gerard70
    Member
    Posted 6 years ago #

    mparkes and bozely were bang on the money for me too, running 2.3.3 with a Windoze box

  20. potterm
    Member
    Posted 6 years ago #

    Just updated to Version 2.3.3 on windows server thinking the problem would be corrected...but no joy. Now marvelously corrected thanks to mparkes and bozely.

  21. glrss
    Member
    Posted 6 years ago #

    Thanks for the fix mparkes and bozely AND gosforth; I had to add
    $href=str_replace("?","upload.php?",$href);
    immediately after
    $r = '';
    in wp-admin/includes/upload.php

  22. dlopshire
    Member
    Posted 6 years ago #

    I applied the changes suggested by mparkes and it worked like a dream! Thanks so much!

  23. Anonymous
    Unregistered
    Posted 6 years ago #

    Thank you so much mparkes. I made the changes to the two different upload.php files you suggested and things appear to be working properly now.

    Since things seem to be okay, I haven't done the change that bozley suggested yet. But I have bookmarked this page for future reference!

    FYI- I'm running WP.org version 2.3.2 on a Windows server.

    Once again... Thanks to everyone and especially mparkes! I have no previous experience with php, so your help was indispensable.

    Happy Blogging!!

  24. Anonymous
    Unregistered
    Posted 5 years ago #

    I did have to make Bozley's change also. I thought everything was okay but when I tried to go to page 2 of uploads I got the dashboard (both on the "Write" page and the "Manage/Uploads). Bozley's recommendation fixed that.

    Thank You Bozley!

Topic Closed

This topic has been closed to new replies.

About this Topic