Hardware and performance

Moodle file picker not working

 
Picture of Taj Des
Moodle file picker not working
 

Hello all,

I have a new moodle site hosted in blue host (shared hosting). Initially I was able to add files (pictures, pdf) to the front page and to courses. Some weeks later though, I couldn't. When I click the 'Add an activity or resource' link and select a file to upload, for example, the file picker keeps loading infinitely as shown in the figure below.

I have searched several forum posts for a solution but not successful so far. The host says 'this is a moodle issue'. I am stuck here. Your help is most appreciated


Regards,


 
Average of ratings: -
Picture of Taj Des
Re: Moodle file picker not working
 

If someone has come across with such an issue (posted above) or if you think you have a solution for it, then please help me. I'm still waiting for some enlightenment...


Thanks,

 
Average of ratings: -
Picture of Emma Richardson
Re: Moodle file picker not working
Documentation writersParticularly helpful MoodlersPlugin developers

Try clearing your caches...

 
Average of ratings: -
Picture of Rob Clark
Re: Moodle file picker not working
 

Hi,

I'm experiencing the same problem.  File picker in the forums are not loading correctly into the page, but it is not consistent.  The problem does not happen on some browsers, but is happening on other browsers and operating systems.  It is also not consistent across the entire Moodle site.  The file picker loads properly in assignment submission, but not on forum postings.

I'm running Moodle 2.7.

  • Firefox 53.0 for Mac - loads properly
  • Safari 10.0.2 for Mac - does not load the picker
  • Chrome 57.0.298 for Mac - does not load the picker
  • Firefox 52.0.2 for Windows - loads properly
  • Firefox 53 for Windows - does not load the picker
  • Chrome 58.0.3 for Windows - does not load the picker
  • Internet Explorer 10 for Windows - does not load the picker
  • Microsoft Edge for Windows - does not load the picker

I have tried clearing cache, doing a hard refresh, using different browsers and operating systems, etc. to identify the source of the problem, but to no avail.  I have several hundred students in courses right now who are not able to submit files because of this problem.

Any help anyone can provide would be greatly appreciated.

Thanks.

 
Average of ratings: -
Picture of Emma Richardson
Re: Moodle file picker not working
Documentation writersParticularly helpful MoodlersPlugin developers

Try turning off the Javascript caching found under Appearance/Javascript and Ajax - I had to do that on one of my sites.

 
Average of ratings: -
Picture of Rob Clark
Re: Moodle file picker not working
 

Hi Emma,

Thanks for your prompt response.  I just tried your suggestion with hard resets and cleared caches all around, but it didn't work.  Anything else come to mind?

It only just started happening yesterday, and one of my staff just had her browser update when she re-opened it and the problem started for her with the new update.  The only thing that I can see as a common major update across all browsers is that they have all stopped supporting Java NPAPI with the latest release.  Do you know if the Moodle File Picker is run as NPAPI?  I can't find anything in the documentation.

Cheers,

Rob





 
Average of ratings: -
Picture of Rob Clark
Re: Moodle file picker not working
 

Is it because the File Picker in Moodle 2.7 runs as NPAPI, which is no longer supported by browsers?

R

 
Average of ratings: -
Picture of Rob Clark
Re: Moodle file picker not working
 

Found the problem.  The mathjax shutdown on April 30th was the source.  I simply loaded mathjax on my local server and redirected it in Site Administration > Plugins > Filters > MathJax from cdn.mathjax.org to mymoodleserver.com. 

Problem solved.  Thanks a lot for your help, Emma.

Rob

 
Average of ratings: -
Picture of Ron Vitug
Re: Moodle file picker not working
 

We have same issue file picker is just keep spinning/loading. Then it will hang the moodle site I need to restart apache to able to access again. Moodle 3.1.6 is our versionscreenshot



 
Average of ratings: -
Picture of Ken Task
Re: Moodle file picker not working
Particularly helpful Moodlers

Did you recently upgrade from 3.0.highest to 3.1.highest?

Actually, that might not matter but would help me verify what I found doing an upgrade as above.

Beginning version 2.9.x Moodle 'transitioning' away from the YUI library.  YUI library might be used in filepicker.

https://docs.moodle.org/dev/YUI

Is your site set to combo load YUI libraries?

Try this in config.php of site:

$CFG->useexternalyui='0';
$CFG->yuicomboloading='0';

Check your DB - mdl_config table to see any settings for YUI external or combo loading.

Purge server caches ... might have to do that manually to assure
caches have been eradicated.

IF the above works, suggest making sure that YUI settings stay '0'
by editing the mdl_config table and setting the above variables to '0'.

You could then remove the config lines.

'spirit of sharing', Ken


 
Average of ratings: Useful (1)
Picture of Ron Vitug
Re: Moodle file picker not working
 

Tried and still no luck. I am thinking if it's a repository matter since we upgrade it to the new server?


We're running PHP on Apache with mod_php 

 
Average of ratings: -
Picture of Ken Task
Re: Moodle file picker not working
Particularly helpful Moodlers

Describe 'upgrade it to the new server', please.

What makes one think it's a repository matter?

"Faculty Documents" looks to be a file system repo.

So in moodledata/repository/ ... what does 'Faculty Documents' label actually point to?

And does what it points to has correct ownership/permissions?

If version 3.3 you have a new CLI script in moodlecode/admin/cli/

Run from moodlecode/admin/cli/

what does the following show?

php cfg.php |grep repository

and

php cfg.php |grep yui

'spirit of sharing', Ken


 
Average of ratings: -
Picture of John Joubert
Re: Moodle file picker not working
 

Ken,


I'm running moodle 3.1.3 - and YUI combo loading is turned off. However, it's default is to be on.   I'm dealing with performance issues since my recent upgrade from moodle 2.7 to 3.1.3.  Is this safe/good to turn on?  Or, should I be avoiding this since, like you, I've read that it's going to be depracated at some point...


Any advice, direction, pointers, etc. appreciated very much.


John

 
Average of ratings: -
Picture of Ken Task
Re: Moodle file picker not working
Particularly helpful Moodlers

Not sure that YUI alone would be the single factor in a hyperjump between long term support versions 2.7.x to 3.1.x in performance issues.   Like all previous versions of Moodle every version upwards does more ... and seems to require more resources of server.

Did you do the environment check and update that component before upgrading?  Did you have to 'fix' anything while at 2.7?  Run it again, now at 3.1.x and see if there are not some recommendations.

As far as performance issues ... think you'll have to share a complete description of your system(s).

'spirit of sharing', Ken




 
Average of ratings: -
Picture of Matt Donnelly
Re: Moodle file picker not working
 

Thanks Ken! 

File Picker was consistently hanging only in Chrome for 30sec (checked Network Tab in Inspector) on Moodle 3.5 before allowing me to select files.

Adding those two lines to config.php fixed the problem immediately. 

 
Average of ratings: -
Picture of Rodrigo Ribeiro
Re: Moodle file picker not working
 

Hello


Having the same inssue! My server is a DigitalOcean VPS ans everything is ok with VPS.

Centos7++Apache2+PHP7 (no fpm)+Moodle 3.4+


Alredy tried to set yui to "0" in mdl_config....not solved.


When send any file the circle still running forever...


What i have to do?



 
Average of ratings: -
Picture of Daniel Thies
Re: Moodle file picker not working
Core developersParticularly helpful MoodlersPlugin developersTesters

Hi Ron,

Are you running PHP on Apache with mod_php or with php-fpm? I had a similar problem switching from Apache to Nginx.

Daniel

 
Average of ratings: -
Picture of Francisco Nieto
Re: Moodle file picker not working
 

Did you find a solution to your issue? I have moved to ngixn and php7.0-fpm, and I am experiencing the same issue. When I try to upload a file with the file picker, it keeps spinning and it seems like it never upload the file; however, when I drag and drop the file, I do not have any issue.

 
Average of ratings: -
Picture of Daniel Thies
Re: Moodle file picker not working
Core developersParticularly helpful MoodlersPlugin developersTesters
Yes, there is a setting that needed to be changed in the http block of my nginx.conf. The parameter client_max_body_size has a default value of 1M. This limits any file upload to the server even though php settings are higher. It is not detectable by the browser so nothing is reported.
 
Average of ratings: -
Picture of Francisco Nieto
Re: Moodle file picker not working
 

Thanks so much for answering me back, but my issue was not the parameter client_max_body_size, it was the parameter below, I had the parameter set up as "DENY" instead of "SAMEORIGIN"


add_header X-Frame-Options SAMEORIGIN;


Thanks again for you prompt answer.

Francisco

 
Average of ratings: Useful (1)
Picture of Harry McLaren
Re: Moodle file picker not working
 

Just an FYI for others, our site had this issue and after MUCH troubleshooting, it was the Cloudflare 'Rocket Loader' which was breaking it. 

 
Average of ratings: Useful (2)
Picture of David Le Blanc
Re: Moodle file picker not working
 
Thank you for this post Harry. How did you resolve the issue with Cloudflare 'Rocket Loader'? I have started to experience difficulties with the File picker and even uploading images with the dialog box that appears after clicking the images button in our atto editor. 
 
Average of ratings: -
Picture of Liana Shpani
Re: Moodle file picker not working
 

Hello!

I am having this issue too, but the suggestions in this (and many other file picker not working forums) didn't fix it. I recently updated the test instance of Moodle to 3.5.1 and this issue appeared (not on the clean install, so it is definitely something in our code). It is not from the additional css as I tried removing it and the problem persisted. Then I updated the code to 3.5.2 and the issue persists, that just confirms that it's being caused by our code, but it wasn't there in the previous versions (3.3.2). 

A detail on the problem: the file pickers that didn't work were the ones that you see as an admin or teacher - as a student when you upload something to the assignment it works fine. 

Any ideas on what to try or what to be looking for that might have caused this? Thank you!! 

Best,

Liana

 
Average of ratings: -
Picture of Liana Shpani
Re: Moodle file picker not working
 

Something that I found while looking around: This error shows up in the console in the sites where the filepicker doesn't load... 


 
Average of ratings: -
Picture of Benoît Rousseau
Re: Moodle file picker not working
 

Hi, did you find a solution ? hi have the same problem ...

 
Average of ratings: -
Picture of Liana Shpani
Re: Moodle file picker not working
 
It was being caused by my wiris plugin. 
 
Average of ratings: Useful (1)