-
Notifications
You must be signed in to change notification settings - Fork 69
Google App Engine Plugin Uploads to Cloud Storage do not work in WP 4.0 #16
Comments
I'm also getting this problem (but without the HTTP Error.) Instead, the server just dies and the user sees "An error occurred in the upload. Please try again later.". To shed some more light on the issue, here is why it's failing for me:
@jgrasser2's solution works great, thanks! (although there's clearly a reason this code is in here, and I'm a bit worried that we're basically just removing it... Perhaps it was only important in the earlier versions of WordPress/GAE.) Also, another strange thing: The project I'm working on runs two apps: one for development and one for production. The production server does not experience any issue with this specific problem (although it gets strange "time-out" issues... But that's probably unrelated.), but the development server does. I'll be back with more information if I can run some logging on the production server. |
When I first tried to run Wordpress 4.0 on Google Apps Engine, the isset() fix that was patched in worked fine. However, today even with the isset() fix, I'm back to getting the "HTTP error" and "Are you sure?" messages on Wordpress 4.0, even using version 1.5 of the Google App Engine plugin. The files are being uploaded (I can browse them on Google Storage) so I don't think it's a permissions issue on the bucket, but it looks like the metadata is missing and obviously the files aren't showing up in the Wordpress backend. Any ideas what I might be missing? |
@DejaAugustine
Hope that helps, sorry I can't offer any advice you probably haven't already tried. |
@Craxic |
We get "Http Error" when uploading media from WordPress to GCS. To be clear, media does get uploaded, but we still receive a 500 status code from the server.
Http response from har File.
"name": "status",
"value": "500 Internal Server Error"
WordPress Version 4.0
Production GAE. Did not test in dev.
The lines that appear to be causing the issue are in /modules/uploads.php, 195-196
$_COOKIE[$auth_cookie_name] = $auth_cookie;
$_COOKIE[LOGGED_IN_COOKIE] = $logged_in_cookie;
If these are changed to the following code, the upload works
if ( !isset($_COOKIE[$auth_cookie_name]) ) $_COOKIE[$auth_cookie_name] = $auth_cookie;
if ( !isset($_COOKIE[LOGGED_IN_COOKIE]) ) $_COOKIE[LOGGED_IN_COOKIE] = $logged_in_cookie;
The text was updated successfully, but these errors were encountered: