我一直在用这个墙撞墙。我在AppEngine上运行Wordpress并且一切正常(followed the GAE install instructions),除了我无法在帖子中插入图像。我已经安装了GAE WP插件并正确设置了云存储(我知道这是因为上传实际上有效,我可以在WP中左侧导航中访问Media> Library时看到上传。
这是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
这就是我在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
我在这里缺少什么?谢谢你的帮助。
答案 0 :(得分:0)
这不是最佳解决方案,但作为临时解决方法,我已经能够通过抑制/includes/post.php中的错误来解决问题。基本上,AJAX调用在数据中出现了一堆错误,并且不知道如何处理它,所以我只是将error_reporting(0);
放在文件的顶部。
答案 1 :(得分:0)
您还可以通过将“application_readable:true”添加到app.yaml中的以下映射来删除消息
- url: /(.*\.(ico|jpg|png|gif))$
static_files: wordpress/\1
upload: wordpress/.*\.(ico|jpg|png|gif)$