ecampbell / moodle-atto_wordimport

Import Word file contents into Moodle Atto text box
2 stars 7 forks source link

Error in moodle 3.9.2+ (apache2 php7.4-fpm) #22

Open bonimat opened 3 years ago

bonimat commented 3 years ago

We have problem with moodle 3.9.2+ when import a file .docx. The error reported is "Got error 'PHP message: PHP Fatal error: Cannot redeclare atto_wordimport_strings_for_js() (previously declared in /var/www/html/moodle/lib/editor/atto/plugins/wordimport/lib.php:38) in /var/www/html/moodle/lib/editor/atto/plugins/wordimport/lib.php on line 38' ". We resolved in import.php changing require(DIR . '/lib.php'); with require_once(DIR . '/lib.php');

Could you apply in your code?

ecampbell commented 3 years ago

Hi there, I've changed the code to fix this. I haven't encountered this myself before, strangely enough.

On Mon, 16 Nov 2020 at 15:21, bonimat notifications@github.com wrote:

We have problem with moodle 3.9.2+ when import a file .docx. The error reported is "Got error 'PHP message: PHP Fatal error: Cannot redeclare atto_wordimport_strings_for_js() (previously declared in /var/www/html/moodle/lib/editor/atto/plugins/wordimport/lib.php:38) in /var/www/html/moodle/lib/editor/atto/plugins/wordimport/lib.php on line 38' ". We resolved in import.php changing require(DIR . '/lib.php'); with require_once(DIR . '/lib.php');

Could you apply in your code?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ecampbell/moodle-atto_wordimport/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGQHDBT3WQOALSKJ4B6DCDSQE7OTANCNFSM4TXJPU3Q .

-- Eoin Campbell campbeeo@tcd.ie https://www.linkedin.com/in/eoin-campbell-tudublin/

bonimat commented 3 years ago

Maybe it depends on our theme (Fordson). Thanks a lot!