Open thepurpleblob opened 8 years ago
The most likely cause is that there is some unusual construct inside the Word file that is not recognised by the XSLT code. Send me the Word file that causes the problem and I will take a look.
Any we tried, including this... http://www.easychair.org/publications/easychair.docx
I tried the easychair.docx file on the test server www.moodle2word.net and it imported OK for me, so I wonder if there is some configuration issue on your server. Can you give me access to your server so I can take a closer look?
Unfortunately, it's our test/evaluation server and it's not publicly accessible. Same thing on my development box (although, granted, it's running exactly the same code). Is there anything I can usefully do to provide more information?
Turn on DEVELOPER level debugging and drag a Word file into an Atto edit window. Temporary files should be created in the /moodledata/temp folder with suffixes .wml, .if1 and .xhtml, Send me these files and I'll take a look.
Ok, still using the easychair.docx file I did as you suggest. Only the first two temp files are created - nothing with a .xhtml extension. However, here are the other two...
Unfortunately, I am stumped on this one. The files you sent are well-formed XML, and exactly the same as I get, so I don't understand what is going on on your server.
Ok... thanks. I'll try a completely new install of 3.1 when I get a minute and see what happens.
Exactly the same here
During easychair import I get the following text in an error window:
XSLT transformation failed ({$a}) URL: https://someaddress-removed Debug info: Error code: transformationfailed Stack trace:
No .xhtml file in moodledata/temp
Maybe this helps to investigate further.
Hello, That stuff is just gorgeous, you have to read about it more at http://action.onevegagroup.com/e4oyiehi
In haste, howard@e-learndesign.co.uk
Hello,
I have encountered this problem now in 2017. Moodle 3.1.3+ (Build: 20161222) & Atto_wordimport 1.2.0 (Build 2016121301) gives an error; "XSLT transformation failed ({$a})" with this example docx file from Calibre;
https://calibre-ebook.com/downloads/demos/demo.docx
So it seems this isn't working properly.
I have fixed the issue with importing https://calibre-ebook.com/downloads/demos/demo.docx. It may also work for http://www.easychair.org/publications/easychair.docx, but I can't confirm it.
Moodle 3.1 and latest master...
This is the error log...
[Wed Jun 15 13:21:27.152862 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Forbidden variable in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152906 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file /var/www/moodle31/lib/editor/atto/plugins/wordimport/wordml2xhtmlpass2.xsl line 378 element template in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152917 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Failed to compile predicate in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152939 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Forbidden variable in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152953 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file /var/www/moodle31/lib/editor/atto/plugins/wordimport/wordml2xhtmlpass2.xsl line 380 element template in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152962 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Failed to compile predicate in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152980 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Forbidden variable in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.152993 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file /var/www/moodle31/lib/editor/atto/plugins/wordimport/wordml2xhtmlpass2.xsl line 381 element template in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.153015 2016] [:error] [pid 14892] [client 172.20.88.25:59421] PHP Warning: XSLTProcessor::importStylesheet(): Failed to compile predicate in /var/www/moodle31/lib/editor/atto/plugins/wordimport/xslemulatexslt.inc on line 82, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0 [Wed Jun 15 13:21:27.160928 2016] [:error] [pid 14892] [client 172.20.88.25:59421] Default exception handler: XSLT transformation failed ({$a}) Debug: \nError code: transformationfailed\n* line 232 of /lib/editor/atto/plugins/wordimport/lib.php: moodle_exception thrown\n* line 66 of /lib/editor/atto/plugins/wordimport/import.php: call to atto_wordimport_convert_to_xhtml()\n, referer: http://.../moodle31/course/modedit.php?add=page&type=&course=2§ion=0&return=0&sr=0