amnuts / opcache-gui

A clean, effective and responsive interface for Zend OPcache
1.21k stars 197 forks source link

OPCache GUI does not load in Moodle's Behat environment #61

Closed abias closed 3 years ago

abias commented 3 years ago

Hi Andrew,

as you know, we have packaged your great OPCache GUI into a Moodle plugin on https://github.com/moodleuulm/moodle-tool_opcache.

Today, I had to see that, while the plugin works perfectly in my browsers, OPCache GUI is not working anymore in Moodle's Behat environment.

When I watch the Behat tests, the step where the test goes to the Moodle OPCache settings page fails as the OPCache GUI does not load there:

grafik

The same happens when I take over manual command over the testing browser and open the OPCache GUI file directly without the Moodle wrapper:

grafik

Clicking on the error message in the web inspector console, I get this line:

grafik

It might be important to say that the testing browser is a really old Firefox 47, but there are reasons for the Moodle developers to use this old browser:

grafik

Do you have any idea what could cause OPCache not to load in this environment, Andrew?

If you need any more details from me, please let me know.

Cheers, Alex

amnuts commented 3 years ago

Hi @abias,

Not sure off the top of my head, but if I were to guess it's because the javascript used in the interface uses ES6 constructs and the build process doesn't do any work to make that js backwards compatible. So it's likely there's something there that's incompatible.

Might be handy to see what the code looks like on the lines specific; 117 and 458 by the looks of the screenshots.

Andy

abias commented 3 years ago

Hi @amnuts ,

thank you for this feedback!

Your explanation makes sense to me. According to https://caniuse.com/es6, Firefox does not fully support ES6 until version 54.

This problem arose just recently when I switched my Behat testing environment from Chrome (which I have been running up to then) to Firefox (which is Moodle's default for Behat testing). Switching back to Chrome, the Behat tests work again.

I think I will leave it then with Chrome and can close this issue.

Thanks, Alex