Comments (4)
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:
- User logs in and gets a token as part of their cookie (call it "abcd")
- User goes to upload form and gets a nonce that allows them to upload. This nonce only works for the cookie with the "abcd" token.
- User sends upload to the wrapped URL.
- Upload completes, and the wrapped URL then calls the original URL. We then get into the area @jgrasser2 mentioned: (full output of
print_r(debug_backtrace(), true)
here:
google\appengine\WordPress\Uploads\Uploads::set_fake_cookies(USER_ID)
google\appengine\WordPress\Uploads\Uploads::authenticate()
google\appengine\WordPress\Uploads\Uploads::preauthenticate()
/base/data/home/apps/app-name/instance-name.1234/src/wp-settings.php::do_action('plugins_loaded')
/base/data/home/apps/app-name/instance-name.1234/src/wp-config.php
/base/data/home/apps/app-name/instance-name.1234/src/wp-load.php
/base/data/home/apps/app-name/instance-name.1234/src/wp-admin/async-upload.php
- This overwrites the cookie token with a fresh one
- This causes wp_verify_nonce to fail in async_upload.php -> wp_ajax_upload_attachment -> check_ajax_referer( 'media-form' ) since the token is different.
- This causes the script to die.
@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.
from wordpress-plugins.
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?
from wordpress-plugins.
@DejaAugustine
I'm not sure what you're missing: all I can do is offer some general advice I guess...
- If you're getting the HTTP Error message, try viewing the network requests in the debug console. Perhaps that might give you some more information.
- Check the App-engine logs obviously for any errors (or requests that aren't giving 200 OK responses)
- If all else fails, you can do what I did: Put a whole lot of
syslog()
calls throughoutasync-upload.php
to figure out exactly where it fails.
Hope that helps, sorry I can't offer any advice you probably haven't already tried.
from wordpress-plugins.
@Craxic
I wonder if it was a problem on the Google API side. Without making any changes or deployments, I tried it a couple hours later and it worked.
from wordpress-plugins.
Related Issues (20)
- Locally uploaded images does not have thumbnails in Media libraries HOT 2
- How to use Google Cloud Storage plugin only for uploading? Not reading tasks
- this plugin doesnt work with latest version of wordpress
- Asset path without get_current_blog_id
- Notice: Project ID not given and Warning: Authenticated using end user credentials from Google HOT 1
- For those of your having issues with activating the plugin... HOT 2
- No Option to override the default Cache-Control value
- Is it possible to use the plugin with permissions? HOT 1
- Storage URL has another digit and image does not load HOT 1
- Mail plugin not working
- [gcs-media-plugin] Unable to upload files when updating plugin to v0.1.5 HOT 13
- thumbnailing / image rescaling broken
- Domain-named bucket [GCS plugin]
- Google\Cloud\Storage\StreamWrapper::stream_metadata is not implemented HOT 2
- PHP Fatal error: Uncaught Google\Cloud\Core\Exception\ServiceException: cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection HOT 2
- GCS plugin is very slow in admin media grid mode HOT 1
- iP
- Found a possible security concern
- I'm
- Q
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-plugins.