General developer forum

Entire site broken - Javascript doesn't work

 
 
Picture of Arif Shah
Entire site broken - Javascript doesn't work
 

Hi,

I have the same problem as referred in following post:

https://moodle.org/mod/forum/discuss.php?d=218670

None of the site admin functions or SCORM courses work. This is critical as the site exclusively contains SCORM courses. 

Google console gives following javascript error:
Uncaught TypeError: Cannot call method 'load_flowplayer' of undefined

Our Moodle 2.5.1 site is running on WIndows 2008, IIS 7.5, SQL Server 2012, PHP 5.3.27. Already tried 'Purge Cache' method as suggested on the above post but that doesn't make any difference.

Please advise if there is anything else I could try. 

Already spent days trying to get my head round this but no luck so far. Any help would be greatly appreciated 

Many thanks
Arif Shah

 
Average of ratings: -
Picture of Marcus Green
Re: Entire site broken - Javascript doesn't work
Group Particularly helpful Moodlers

You are probably going to have to eliminate possibilities here. Go back to a a very basic install that does work and keep adding bits to it until it breaks. I know that sounds crude but it will almost certainly find the problem.  

Something Javascript related is broken. Firing up your browsers in anonymous (pron?) mode may help to eliminate some caching. What has changed and what tools are you using. SCORM uses Javascript so is there an issue with some of the Javascript generated by your SCORM tool.  What non standard plugins are you using. Try multiple browsers, try them all. That is not to suggest that your users should be limited to a particular browser of course.

(please only post a question in one forum at a time)

 
Average of ratings: -
Picture of Arif Shah
Re: Entire site broken - Javascript doesn't work
 

Thanks very much for your reply Marcus.

I forgot to add there was a 404 error just before the "cannot call method load_flowplayer" message. The 404 error is for following file:
http://mysite.com/lib/javascript.php/1377865494/lib/javascript-static.js

Guillermo kindly directed me towards this article:
http://docs.moodle.org/25/en/Blocks_FAQ#My_Administration_block_links_don.27t_expand.21

I disabled 'Use slash' option and the menus started working but the SCORM courses give 404 error for following file:
http://mysite.com/lib/editor/tinymce/tiny_mce/3.5.8/tiny_mce.js

Although I can see the physical file is there at the correct location. O also tried clearing theme cache and changing javascript + ajax options but no luck.

We are just using a standard legacy theme and no other non-standard plugins. We use Moodle to host SCORM courses for our users from a DotNetNuke site. We supply external authentication and enrolment parameters from a separate SQL server database.

Regards
Arif

P.S. Sorry for posting the issue multiple times as I am really desperate for a solution.

 
Average of ratings: -
Gmads
Re: Entire site broken - Javascript doesn't work
 

Hi Arif,

I assume that you tried all the options listed in the FAQ and neither of them solved your problem, except disabling the Use slash.

About the problem with the SCORM course, please try as recommended here:

https://moodle.org/mod/forum/discuss.php?d=199054

 
Average of ratings: -
Picture of Raphael Goldman
תשובה ל: Re: Entire site broken - Javascript doesn't work
 

Try to clean cash from moodle and reload the site, it should solve your problem

 
Average of ratings: -
Picture of Arif Shah
Re: Entire site broken - Javascript doesn't work
 

@Raphael - I have already tried purging cache but that didn't make any difference.

I did try setting the cgi.fix_pathinfo = 0 as per Guillermo's suggestion but still no luck.

With 'Use Slash' disabled the SCORM player opens a new window but doesn't show any external resources. 

As a test I setup a new install of Moodle 2.5.1 and got the same issues there too which makes me think it would be an environment/configuration issue.

I've got PHP 5.3.27 fast-cgi setup on windows 2008 server with IIS 7.5. Please see a screenshot of my server check attached. (All ok except a warning for Intl extension).

The strange thing is that I upgraded the site back in early July from 1.9 to 2.5 and tested that every single SCORM course worked fine. Had to turn the site off for few weeks due to ASP.NET issues on the server and when turned it back on couple of weeks back found these issues with JavaScript.

Another approach I am looking at - what configuration can I change on the server to help enable 'Use Slash' argument?

Please help before I jump off a cliff!!

Regards
Arif


 
Average of ratings: -
Picture of Arif Shah
Re: Entire site broken - Javascript doesn't work
 

Hi,

I still can't find a solution for this.

Just trying to figure out what would be the underlying cause of javascript failing on the site. Is it because my server is not configured properly to accept 'Slash arguments'?? In that case, what could I change to get it working?

Or is it some limitation of working in PHP/fast-cgi/Windows/IIS configuration that slash arguments won't work?

Please advise.
Regards
Arif Shah  

 
Average of ratings: -
Picture of Marcus Green
Re: Entire site broken - Javascript doesn't work
Group Particularly helpful Moodlers

To eliminate anything to do with your web server and slash arguments you need to create another fresh install of moodle and see if javascript works on that with nothing installed but bare Moodle. Have you done that?

 
Average of ratings: -
Picture of Arif Shah
Re: Entire site broken - Javascript doesn't work
 

Marcus,

I have already tried a fresh install and confirmed that the problem exists. Just not sure what do I need to change to get slash arguments to work on a windows server / IIS 7.5 / fast-cgi php.

Regards
Arif

 
Average of ratings: -