Interfacelab / ilab-media-tools

https://mediacloud.press/
GNU General Public License v3.0
114 stars 37 forks source link

Direct upload to Google Cloud storage returns error at ilab-media-direct-upload.js?ver=4.2.37:14 #161

Open tlimited opened 3 years ago

tlimited commented 3 years ago

Firstly, the /wp-admin/media-new.php DOES work, the "normal" upload does not.

To Reproduce Steps to reproduce the behavior:

  1. Go to '/wp-admin/upload.php' and have devtools console open
  2. Drag in and upload a jpeg image
  3. Everything looks fine and console tells that uploading and resizing is happening
  4. Console.log says "Upload finished"
  5. Console error on doUploadFinished: function(e, t, r, i):
    ilab-media-direct-upload.js?ver=4.2.37:formatted:7132 Uncaught TypeError: Cannot read property 'id' of null
    at n.<anonymous> (ilab-media-direct-upload.js?ver=4.2.37:formatted:7132)
    at c (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8:2)
    at l (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8:2)
    at XMLHttpRequest.<anonymous> (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8:2)
  6. Script is stopped, the media has been uploaded to Cloud storage but is not available in WP media library.

Expected behavior No error and that the media is available in the WP Media library.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information)

How did you install the plugin? Did you install via composer, a git checkout, wordpress.org, freemius?

Additional context Add any other context about the problem here.