• If you try to insert media into a post with display_errors = on wordpress fails to work as expected.

    admin-ajax.php displays a bunch of errors before the json which causes media library not to show. This is the output for my app when wordpress makes the ajax request to admin-ajax.php

    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    {"success":true,"data":[{"id":158,"title":"Trade-To-Travel-Brochure","filename":"Trade-To-Travel-Brochure.pdf","url":"https:\/\/storage.googleapis.com\/tradetotravel\/Trade-To-Travel-Brochure.pdf","link":"http:\/\/trade-to-travel.appspot.com\/our-brochure\/trade-to-travel-brochure\/","alt":"","author":"2","description":"","caption":"","name":"trade-to-travel-brochure","status":"inherit","uploadedTo":99,"date":1391645349000,"modified":1391645349000,"menuOrder":0,"mime":"application\/pdf","type":"application","subtype":"pdf","icon":null,"dateFormatted":"February 6, 2014","nonces":{"update":"2baeb0b830","delete":"c4e2143c16"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=158&action=edit","compat":{"item":"","meta":""}},{"id":85,"title":"pool_M_2017_106910","filename":"pool_M_2017_106910.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/pool_M_2017_106910.jpg","link":"http:\/\/trade-to-travel.appspot.com\/properties\/downtown-condo\/pool_m_2017_106910\/","alt":"","author":"2","description":"","caption":"","name":"pool_m_2017_106910","status":"inherit","uploadedTo":66,"date":1391114408000,"modified":1391114408000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"January 30, 2014","nonces":{"update":"10928ccee1","delete":"f989d879db"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=85&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/DHtYRvQLODMdMf6I0qAxCfiqXSXNXbEEO66Y2qRs8cEoS7mZiDJFccaHzN9NpB9SZ2a3kI_72A_3YF3jz81-Z6CX8sFt=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/DHtYRvQLODMdMf6I0qAxCfiqXSXNXbEEO66Y2qRs8cEoS7mZiDJFccaHzN9NpB9SZ2a3kI_72A_3YF3jz81-Z6CX8sFt=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/DHtYRvQLODMdMf6I0qAxCfiqXSXNXbEEO66Y2qRs8cEoS7mZiDJFccaHzN9NpB9SZ2a3kI_72A_3YF3jz81-Z6CX8sFt=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/pool_M_2017_106910.jpg","height":547,"width":918,"orientation":"landscape"}},"height":547,"width":918,"orientation":"landscape","compat":{"item":"","meta":""}},{"id":69,"title":"DP-HEADER1","filename":"DP-HEADER1.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/DP-HEADER1.jpg","link":"http:\/\/trade-to-travel.appspot.com\/properties\/downtown-condo\/dp-header1\/","alt":"","author":"2","description":"","caption":"","name":"dp-header1","status":"inherit","uploadedTo":66,"date":1388698297000,"modified":1388698297000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"January 2, 2014","nonces":{"update":"e831e53950","delete":"7ac650e442"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=69&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/B7he7VR5IC6VGbaMsS1LRPklXBkGEfMaHHhWeKq1c93De7vLOb0bDTCp0Co5ebudlCjNRC3IICCUKWr7dn3ZrECaBzij=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/B7he7VR5IC6VGbaMsS1LRPklXBkGEfMaHHhWeKq1c93De7vLOb0bDTCp0Co5ebudlCjNRC3IICCUKWr7dn3ZrECaBzij=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/B7he7VR5IC6VGbaMsS1LRPklXBkGEfMaHHhWeKq1c93De7vLOb0bDTCp0Co5ebudlCjNRC3IICCUKWr7dn3ZrECaBzij=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/DP-HEADER1.jpg","height":378,"width":590,"orientation":"landscape"}},"height":378,"width":590,"orientation":"landscape","compat":{"item":"","meta":""}},{"id":38,"title":"Casa la Big Sur, Costa Rica","filename":"CasaBig71.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/CasaBig71.jpg","link":"http:\/\/trade-to-travel.appspot.com\/?attachment_id=38","alt":"","author":"1","description":"","caption":"Casa la Big Sur, Costa Rica","name":"casabig7-2","status":"inherit","uploadedTo":0,"date":1384463562000,"modified":1384463562000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"November 14, 2013","nonces":{"update":"e6d0d7e07d","delete":"3aa3138ae0"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=38&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh4.ggpht.com\/27txJtY3YeYrv9knhgc18Jkd_TeEShCVEDSVgkq_lZHH-jA3WUnK_-OF6zFQzQHgg9HbZJh0zezqjfvwBeqDjdeMYj5E=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh4.ggpht.com\/27txJtY3YeYrv9knhgc18Jkd_TeEShCVEDSVgkq_lZHH-jA3WUnK_-OF6zFQzQHgg9HbZJh0zezqjfvwBeqDjdeMYj5E=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh4.ggpht.com\/27txJtY3YeYrv9knhgc18Jkd_TeEShCVEDSVgkq_lZHH-jA3WUnK_-OF6zFQzQHgg9HbZJh0zezqjfvwBeqDjdeMYj5E=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/CasaBig71.jpg","height":797,"width":1200,"orientation":"landscape"}},"height":797,"width":1200,"orientation":"landscape","compat":{"item":"","meta":""}},{"id":37,"title":"San Jose del Cabo, Mexico","filename":"cabo.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/cabo.jpg","link":"http:\/\/trade-to-travel.appspot.com\/?attachment_id=37","alt":"","author":"1","description":"","caption":"San Jose del Cabo, Mexico","name":"cabo","status":"inherit","uploadedTo":0,"date":1384463533000,"modified":1384463533000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"November 14, 2013","nonces":{"update":"65cfb15599","delete":"af70c166db"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=37&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/yVMuXZ-cuwbRZWnLiKFwNchuLm8NkCLXPy1lgT1RB_ya9OkUdVZcHxTyPbH-vOLjm2A2iR58McXIUuRHZ4gZE_APeq1H=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/yVMuXZ-cuwbRZWnLiKFwNchuLm8NkCLXPy1lgT1RB_ya9OkUdVZcHxTyPbH-vOLjm2A2iR58McXIUuRHZ4gZE_APeq1H=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/yVMuXZ-cuwbRZWnLiKFwNchuLm8NkCLXPy1lgT1RB_ya9OkUdVZcHxTyPbH-vOLjm2A2iR58McXIUuRHZ4gZE_APeq1H=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/cabo.jpg","height":450,"width":595,"orientation":"landscape"}},"height":450,"width":595,"orientation":"landscape","compat":{"item":"","meta":""}},{"id":36,"title":"Casa la Big Sur, Costa Rica","filename":"CasaBig7.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/CasaBig7.jpg","link":"http:\/\/trade-to-travel.appspot.com\/?attachment_id=36","alt":"","author":"1","description":"","caption":"Casa la Big Sur, Costa Rica","name":"casabig7","status":"inherit","uploadedTo":0,"date":1384198175000,"modified":1384198175000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"November 11, 2013","nonces":{"update":"d4116e1cfc","delete":"64d8e85fea"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=36&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/4zPIYB3UFAN-XKMkZIhW-LhMNGQ_T-QQnddOPS0H5qMRh1DnkDv8Aa6mGbcyO5wb_rVA3H8SfTPxX-T1rUzj-5aMnr0Y=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/4zPIYB3UFAN-XKMkZIhW-LhMNGQ_T-QQnddOPS0H5qMRh1DnkDv8Aa6mGbcyO5wb_rVA3H8SfTPxX-T1rUzj-5aMnr0Y=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/4zPIYB3UFAN-XKMkZIhW-LhMNGQ_T-QQnddOPS0H5qMRh1DnkDv8Aa6mGbcyO5wb_rVA3H8SfTPxX-T1rUzj-5aMnr0Y=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/CasaBig7.jpg","height":797,"width":1200,"orientation":"landscape"}},"height":797,"width":1200,"orientation":"landscape","compat":{"item":"","meta":""}},{"id":4,"title":"me3","filename":"me3.jpeg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/me3.jpeg","link":"http:\/\/trade-to-travel.appspot.com\/?attachment_id=4","alt":"","author":"1","description":"","caption":"","name":"me3","status":"inherit","uploadedTo":0,"date":1383852366000,"modified":1383852366000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"November 7, 2013","nonces":{"update":"ee3c43f941","delete":"ffa915c67a"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=4&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/QALm8Ggc98dS25hlRI7ngyJxrYdrUxOD2upSqYetcLyc-9-jsePcpMOSWKStR5MFenJkFm_xrrZyuT_ZYuX7450wKONmmg=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/QALm8Ggc98dS25hlRI7ngyJxrYdrUxOD2upSqYetcLyc-9-jsePcpMOSWKStR5MFenJkFm_xrrZyuT_ZYuX7450wKONmmg=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh5.ggpht.com\/QALm8Ggc98dS25hlRI7ngyJxrYdrUxOD2upSqYetcLyc-9-jsePcpMOSWKStR5MFenJkFm_xrrZyuT_ZYuX7450wKONmmg=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/me3.jpeg","height":960,"width":960,"orientation":"landscape"}},"height":960,"width":960,"orientation":"landscape","compat":{"item":"","meta":""}}]}

    Uploading a new image via the same interface has a similar problem. When the upload posts to /_ah/upload it returns errors before the json as well.

    <br />
    <b>Warning</b>:  array_keys() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>4463</b><br />
    <br />
    <b>Warning</b>:  asort() expects parameter 1 to be array, null given in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2220</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/base/data/home/apps/s~trade-to-travel/1.373619958606583670/wordpress/wp-includes/post.php</b> on line <b>2221</b><br />
    {"success":true,"data":{"id":201,"title":"me","filename":"me.jpg","url":"https:\/\/storage.googleapis.com\/tradetotravel\/me.jpg","link":"http:\/\/trade-to-travel.appspot.com\/hello-world\/me\/","alt":"","author":"1","description":"","caption":"","name":"me","status":"inherit","uploadedTo":1,"date":1391843269000,"modified":1391843269000,"menuOrder":0,"mime":"image\/jpeg","type":"image","subtype":"jpeg","icon":null,"dateFormatted":"February 8, 2014","nonces":{"update":"d5db6af69e","delete":"40f5d9785c"},"editLink":"https:\/\/trade-to-travel.appspot.com\/wp-admin\/post.php?post=201&action=edit","sizes":{"thumbnail":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/u62T1Fgxd0RTEjlVVxclx6TD6MEomulhDFj2xiy2E2oOTOpAIGFkUY7BwEy99ilrc_luPLcLmeo-Ss_yaISbqy8fHcI=s150-c","orientation":"landscape"},"medium":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/u62T1Fgxd0RTEjlVVxclx6TD6MEomulhDFj2xiy2E2oOTOpAIGFkUY7BwEy99ilrc_luPLcLmeo-Ss_yaISbqy8fHcI=s300","orientation":"landscape"},"large":{"height":false,"width":false,"url":"http:\/\/lh6.ggpht.com\/u62T1Fgxd0RTEjlVVxclx6TD6MEomulhDFj2xiy2E2oOTOpAIGFkUY7BwEy99ilrc_luPLcLmeo-Ss_yaISbqy8fHcI=s1024","orientation":"landscape"},"full":{"url":"https:\/\/storage.googleapis.com\/tradetotravel\/me.jpg","height":527,"width":600,"orientation":"landscape"}},"height":527,"width":600,"orientation":"landscape","compat":{"item":"","meta":""}}}

    https://wordpress.org/plugins/google-app-engine/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author slangley

    (@slangley)

    I wasn’t able to repro this using the latest version of the plugin – can you confirm that this still occurs?

    I am still getting this error as well. Plugin Version 1.4, WordPress Version 3.9. This is a new install from github. I am unable to upload an image but when trying to add media to a post this happens.

    00:21:36.224 200 1KB 365ms
    /wp-admin/admin-ajax.php
    50.154.67.245 - username [09/Jul/2014:21:21:36 -0700] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 1171 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" “projectid.appspot.com" ms=365 cpu_ms=233 cpm_usd=0.000131 instance=00c61b117c01e98163d46ed2c527932160d4c2 app_engine_release=1.9.6 trace_id=545b90805d18866de379ad1e97d4476f
    
       
    W
     00:21:36.212
    PHP Warning:  opendir(/base/data/home/apps/s~projectid/5.377142674316209552/wordpress/wp-includes/images/media): failed to open dir: No such file or directory in /base/data/home/apps/s~projectid/5.377142674316209552/wordpress/wp-includes/post.php on line 4982
       
    W
     00:21:36.212
    PHP Warning:  array_keys() expects parameter 1 to be array, null given in /base/data/home/apps/s~projectid/5.377142674316209552/wordpress/wp-includes/post.php on line 5010
       
    W
     00:21:36.213
    PHP Warning:  asort() expects parameter 1 to be array, null given in /base/data/home/apps/s~projectid/5.377142674316209552/wordpress/wp-includes/post.php on line 2347
       
    W
     00:21:36.213
    PHP Warning:  Invalid argument supplied for foreach() in /base/data/home/apps/s~projectid/5.377142674316209552/wordpress/wp-includes/post.php on line 2348
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘displaying errors causes problems for media’ is closed to new replies.