[英]WP on GAE Insert Image in Post: “An error occurred in the upload. Please try again later.”
I've been banging my head against a wall on this one. 我一直在用这个墙撞墙。 I'm running Wordpress on AppEngine and have everything working fine ( followed the GAE install instructions ) except I can't insert an image into a post. 我在AppEngine上运行Wordpress并且一切正常( 遵循GAE安装说明 ),除了我无法在帖子中插入图像。 I've installed the GAE WP plugin and have the cloud storage set up properly (which I know because the upload actually works and I can see the uploads when I go to Media > Library in the left nav in WP. 我已经安装了GAE WP插件,并且正确设置了云存储(我知道这是因为上传实际上有效,当我在WP的左侧导航中转到Media> Library时,我可以看到上传。
Here's the error's I have in the logs for wp-admin/async-upload.php: 这是wp-admin / async-upload.php日志中的错误:
W 2013-09-28 12:05:02.529
PHP Notice: Undefined variable: types in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:02.529
PHP Warning: array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:02.529
PHP Warning: asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2231
W 2013-09-28 12:05:02.529
PHP Warning: Invalid argument supplied for foreach() in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2232
W 2013-09-28 12:05:02.529
PHP Notice: Undefined variable: icon in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4398
And here's what I've got in the logs for wp-admin/admin-ajax.php: 这就是我在wp-admin / admin-ajax.php的日志中得到的:
W 2013-09-28 12:05:03.683
PHP Notice: Undefined variable: types in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.683
PHP Warning: array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.683
PHP Warning: asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2231
W 2013-09-28 12:05:03.683
PHP Warning: Invalid argument supplied for foreach() in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2232
W 2013-09-28 12:05:03.683
PHP Notice: Undefined variable: icon in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4398
W 2013-09-28 12:05:03.745
PHP Notice: Undefined variable: types in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.745
PHP Warning: array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.745
PHP Warning: asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2231
W 2013-09-28 12:05:03.745
PHP Warning: Invalid argument supplied for foreach() in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2232
W 2013-09-28 12:05:03.745
PHP Notice: Undefined variable: icon in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4398
W 2013-09-28 12:05:03.751
PHP Notice: Undefined variable: types in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.751
PHP Warning: array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.751
PHP Warning: asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2231
W 2013-09-28 12:05:03.751
PHP Warning: Invalid argument supplied for foreach() in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2232
W 2013-09-28 12:05:03.751
PHP Notice: Undefined variable: icon in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4398
W 2013-09-28 12:05:03.755
PHP Notice: Undefined variable: types in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.755
PHP Warning: array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4385
W 2013-09-28 12:05:03.756
PHP Warning: asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2231
W 2013-09-28 12:05:03.756
PHP Warning: Invalid argument supplied for foreach() in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 2232
W 2013-09-28 12:05:03.756
PHP Notice: Undefined variable: icon in /base/data/home/apps/s~WPONGAE/wp.0000000000000000/wordpress/wp-includes/post.php on line 4398
What am I missing here? 我在这里错过了什么? Thanks for any help. 谢谢你的帮助。
This isn't the optimal solution, but as a temporary workaround I've been able to solve the problem by suppressing errors in /includes/post.php. 这不是最佳解决方案,但作为临时解决方法,我已经能够通过抑制/includes/post.php中的错误来解决问题。 Basically the AJAX call was getting a bunch of errors with the data and didn't know what to do with it so I just stuck error_reporting(0);
基本上AJAX调用得到了一堆数据错误,并且不知道如何处理它所以我只是卡住了error_reporting(0);
at the top of the file. 在文件的顶部。
You could also get rid of the messages by adding "application_readable: true" to the following mapping in your app.yaml 您还可以通过将“application_readable:true”添加到app.yaml中的以下映射来删除消息
- url: /(.*\.(ico|jpg|png|gif))$
static_files: wordpress/\1
upload: wordpress/.*\.(ico|jpg|png|gif)$
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.