Upload Photos MAJOR error
-
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?
-
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?
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.
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
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.
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:
https://www.spfarm.com/wp/wp-admin/upload.php?style=inline&tab=browse&post_id=16
what is ctually being generated is:
https://www.spfarm.com/wp/wp-admin/?style=inline&tab=browse&post_id=16Therefore, 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… ??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.
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);
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.
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?
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.
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.
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>";
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.
Awesome! This fixed my problems.
Thank you!No so awesome. That’s not all you have to add to these files. In wp-admin/includes/upload.php just before line:
$r .= “\n”;
you have to add another
$href = str_replace(“?”,”upload.php?”,$href);
However, this is not the good correction – href is empty and the solution is to find where href starts and fill it for good with ‘upload.php’ (that was quite stupid idea to create so ‘sophisticated’ code where name of file is another variable…)
Looks like programmer did code that was out of his control.
Another ‘briliant’ idea is to use database only to keep posts and pages. Perfect way to loose all work (I will always stay with files).
- The topic ‘Upload Photos MAJOR error’ is closed to new replies.