Impossible to upload images

Hi,

I'm trying to create Flash Cards and Dialog Cards, and when I try to upload an image (135 Ko ), it doesn't work, and the system it won't let me get the pictures from the wordpress media libray. Are they too heavy my pictures? Is there a way to get them from the library?

Thanks a lot

icc's picture

Hi! Unfortunately, you cannot use the WordPress media library to select files, this has yet to be integrated due to technical difficulties. 

Do you get any error messages when you try to upload a file? Try checking both your server's error_log file and the console of your browser(Ctrl+Shift+J for Chrome) when uploading.

no, I don't get any message, just the icon it turns, it turns, and nothing happens...and it can last forerever....any hints?

icc's picture

Try having the console open when uploading the file and wait like ~30 seconds. You should get a message in the console when it fails.

thank you, but nothing happens, it just says "uploading, please wait" and it tourns, it tourns...and no message in the console...

icc's picture

That is strange. Have you tried in another browser?

yes, I've tried with Chrome, Firefox and Safari, the 3 of them updated, and all of them same thing "uploading, please wait". The picture I'm trying to upload I did upload it to the media library so I guess it's not that heavy....so still stuck...

thomasmars's picture

Hi, if the response from the server is empty it will look like it is loading forever. There should really have been an error message if this happens.

Can you check the network tab in your console to see what response you get when trying to upload the file ?

network tab in console? what is that?

thomasmars's picture

https://developers.google.com/web/tools/chrome-devtools/network-performance/resource-loading. Click the request that says something like "admin-ajax.php?token=******&action=h5p_files" and explore the response of that request.

I've tried that and I get nothing.....

thomasmars's picture

There is nothing in your network tab ?

Make sure you have "All" selected in your filters above the timeline and that the network activity is recording (press the circle in the upper left corner of your dev tools, or press ctrl+e. The circle should turn red when activity is being recorded).

Hi again, finally i got something on the console:

JQMIGRATE: Migrate is installed, version 1.4.1  load-scripts.php:9:542

unreachable code after return statement[En savoir plus]  wpadm-ga.js:22:4

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  jquery.js:2:31293

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  jquery.js:2:31293

unreachable code after return statement[En savoir plus]  wpadm-ga.js:22:4

 

hi again,

when I try to do the same, upload some images on the "flashcards" activity, on another site on the same hosting, I have no problems to do it, and I get this message on the console:

JQMIGRATE: Migrate is installed, version 1.4.1  load-scripts.php:9:542

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  jquery.js:2:31293

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.

Any hints?

Hi again,

now I've got this message when trying again: Failed to load resource: the server responded with a status of 404 (Not Found) file-5887561fc84af.jpg 

and once again, on the network tab in console (finally I got what it means) I get this:

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  jquery.js:2:31293

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  jquery.js:2:31293

GET http://elantzen.eus/wp-admin/load-styles.php [HTTP/1.1 200 OK 0 ms]

GET http://elantzen.eus/wp-content/plugins/h5p/h5p-editor-php-library/styles... [HTTP/1.1 200 OK 0 ms]

POST XHR http://elantzen.eus/wp-admin/admin-ajax.php [HTTP/1.1 200 OK 1346 ms]

POST XHR http://elantzen.eus/wp-admin/admin-ajax.php [HTTP/1.1 200 OK 3159 ms]

POST XHR http://elantzen.eus/wp-admin/admin-ajax.php [HTTP/1.1 200 OK 2227 ms]

icc's picture

The messages you get should be OK, so it's strange that you're seeing this issue. Would it be possible for you to create me a temporary account so that I can have a look at the issue myself? That is probably the easiest way of figuring out what's going on.
You can use the email: frode.petterson (at) joubel.com

And you get no error messages in you web server's error_log file?

ok

I'm having the exact same problem uploading images to Wordpress in Safari. I get a spinning wheel that says "Uploading, please wait..." but it doesn't stop no matter how long I wait. Was this issue ever resolved? Any help would be greatly appreciated.

I'm having the exact same problem uploading images to Wordpress in Safari. I get a spinning wheel that says "Uploading, please wait..." but it doesn't stop no matter how long I wait. Was this issue ever resolved? Any help would be greatly appreciated.

BV52's picture

Hi hlc,

You mentioned that the issue is when uploading in Wordpress using Safari so I assume that if you use another browser it works fine. If that is the case clearing the cache and/or disabling other plugins in Safari might do the trick.

-BV52

I'm having the same problem in both Safari and Firefox on Mac. The wheel just spins and says "Uploading, please wait..." but the photo never uploads. I looked to see if any plugins might be interferring and also cleared the cache, but still having the same issue. 

BV52's picture

Hi hlc,

Can you please check if you have any error messages in the browser console.

-BV52

Hi BV52,

There are 4 error messages in my console when I try to upload an image. I've attached a screenshot.

hlc

icc's picture

This appears to be a web server config issues, the header X-Frame-Options has an incorrect value. You should try to figure out where this is set, perhaps in a .htaccess file, and make sure the value is valid(see link).

I get exactly the same, the wheel just spins and says "Uploading, please wait..." but the photo never uploads.
When I save and look at the page the images are not shown.
Is there already a solution for this problem?

Because I have the same problem: the wheel just spins and says "Uploading, please wait..." but the photo never uploads.
When I look at the page, the images are not shown.
Do you already know what causes this problem and how it can be solved?

BV52's picture

Hi AnitaF,

Your could possibly be different that was stated above. To further isolate the issue, please include the following information:

  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors
  8. Any PHP errors
  9. Screenshots if it's a visual problem

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

-BV52

Hi,

  1. When uploading the images
  2. Wordpress version 4.9.8
  3. Mobile ánd desktop
  4. Chrome and Edge (have not tried any other browsers)
  5. H5P version 1.11.0
  6. Memory game (sample: https://houseofhappinesz-academy.nl/happy-kids/les-1/)
  7.  Browser console error see enclosed
  8. Don't know how to find errors. It's php version 7.1
  9. See 6 and: 
BV52's picture

Hi AnitaF,

There are a lot of possible causes for an error 404. One of the best way to isolate this is by checking PHP error logs. Please visit this page for more details.

-BV52

Hi, I've had someone else take a look. Weird thing is that he can upload the images without a problem. So it doesn't seem to be a php problem, but a problem with my device, my laptop. Have you heard that before? That it could be caused by the device on which you are logged in on the website?
My laptop is fairly new (february this year) with Windows 10 and not the cheapest one....

I've found out what caused the problem with the upload of the images!
The problem lies with Google Chrome. I've tried it in Edge and there the images are uploaded without a problem.

BV52's picture

Hi AnitaF,

I think we are on to something here :-) . Can you please check the version of Chrome, if it is V69 I think you have the same issue as what was reported here.

-BV52