• Resolved bboehm86

    (@bboehm86)


    No further error but Chrome consol says:

    Line 161, Column 14
    
    Pause On Caught Exceptions
    
    Call StackAsync
    Not Paused
    Breakpoints
    No Breakpoints
    DOM Breakpoints
    XHR Breakpoints
    Event Listener Breakpoints
    Scope VariablesWatch Expressions
    Not Paused
    ConsoleSearchEmulationRendering
    
    Preserve log
    .
    POST http://XYZ/wp-admin/async-upload.php 500 (OK) VM234 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,au…:4
    Possibly unhandled TypeError: undefined is not a function
        at escapeHtml (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:161:14)
        at showError (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:112:75)
        at tryCatch1 (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:12744:19)
        at Promise$_callHandler [as _callHandler] (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:10086:13)
        at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:10102:18)
        at Promise$_settlePromiseAt [as _settlePromiseAt] (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:10274:14)
        at Promise$_rejectPromises [as _rejectPromises] (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:10411:14)
        at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:7933:12)
        at Async$consumeFunctionBuffer (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:7896:14)
        at MutationObserver.Promise$_Scheduler (http://XYZ/wp-content/plugins/mammoth-docx-converter/mammoth-editor.js:12015:17) VM291 mammoth-editor.js:8208

    any Idea?

    https://ww.wp.xz.cn/plugins/mammoth-docx-converter/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michael Williamson

    (@michaelwilliamson)

    Could you try replacing line 111 in mammoth-editor.js, so instead of

    document.getElementById("mammoth-docx-error-message").innerHTML = escapeHtml(error);

    You have:

    document.getElementById("mammoth-docx-error-message").innerHTML = escapeHtml(error.toString());

    Thread Starter bboehm86

    (@bboehm86)

    First of.. Wow crazy fast reply, thanks alot!
    Now i get [object Object] as error message

    And consol says:

    Line 161, Column 14
    
    Pause On Caught Exceptions
    
    Call StackAsync
    Not Paused
    Breakpoints
    No Breakpoints
    DOM Breakpoints
    XHR Breakpoints
    Event Listener Breakpoints
    Scope VariablesWatch Expressions
    Not Paused
    ConsoleSearchEmulationRendering
    
    Preserve log
    .
    POST http://XYZ/wp-admin/async-upload.php 500 (OK) VM2588 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,a…:4
    send VM2588 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,a…:4
    m.extend.ajax VM2588 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,a…:4
    uploadImage mammoth-editor.js:89
    (anonymous function) mammoth-editor.js:55
    tryCatch1 mammoth-editor.js:12744
    Promise$_callHandler mammoth-editor.js:10086
    Promise$_settlePromiseFromHandler mammoth-editor.js:10102
    Promise$_settlePromiseAt mammoth-editor.js:10274
    Async$_consumeFunctionBuffer mammoth-editor.js:7933
    Async$consumeFunctionBuffer mammoth-editor.js:7896
    Promise$_Scheduler mammoth-editor.js:12015

    Not sure if it matters but the site is running on IIS 8 on Windows Server 2012..

    Plugin Author Michael Williamson

    (@michaelwilliamson)

    Hmm, not quite as much information in the error string as I was hoping! Could you try replacing the line with:

    console.log(error);
    document.getElementById("mammoth-docx-error-message").innerHTML = escapeHtml(JSON.stringify(error));

    And seeing both what the error message displays and what gets outputted to the console.

    Also, taking a closer look at the logs, it seems as if there’s a 500 error when trying to upload an image. If you go to the network panel, can you confirm that there’s a 500 error, and if so, grab any request and response information that’s available?

    Thread Starter bboehm86

    (@bboehm86)

    It worked just now one time, just one though… but i guess i was just lucky, error is back..

    # Error message now:
    Error while attempting to convert file: {"readyState":4,"responseText":"","responseJSON":null,"status":500,"statusText":"OK"}

    # Consol:

    POST http://XYZ/wp-admin/async-upload.php 500 (OK) VM73 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,aut…:4send VM73 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,aut…:4m.extend.ajax VM73 load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,schedule,wp-ajax-response,aut…:4uploadImage mammoth-editor.js:89(anonymous function) mammoth-editor.js:55tryCatch1 mammoth-editor.js:12745Promise$_callHandler mammoth-editor.js:10087Promise$_settlePromiseFromHandler mammoth-editor.js:10103Promise$_settlePromiseAt mammoth-editor.js:10275Async$_consumeFunctionBuffer mammoth-editor.js:7934Async$consumeFunctionBuffer mammoth-editor.js:7897Promise$_Scheduler mammoth-editor.js:12016
    Object {readyState: 4, getResponseHeader: function, getAllResponseHeaders: function, setRequestHeader: function, overrideMimeType: function…}abort: function (a){var b=a||u;return i&&i.abort(b),x(0,b),this}arguments: nullcaller: nulllength: 1name: ""prototype: v.abort__proto__: function Empty() {}<function scope>always: function (){return e.done(arguments).fail(arguments),this}complete: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}done: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}error: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}fail: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}getAllResponseHeaders: function (){return 2===t?f:null}getResponseHeader: function (a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b}isAsync: trueoverrideMimeType: function (a){return t||(k.mimeType=a),this}pipe: function (){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}progress: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}promise: function (a){return null!=a?m.extend(a,d):d}readyState: 4responseJSON: nullresponseText: ""setRequestHeader: function (a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}state: function (){return c}status: 500statusCode: function (a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}statusText: "OK"success: function (){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}then: function (){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}__proto__: Object

    # request headers

    POST /wp-admin/async-upload.php HTTP/1.1
    Host: XYZ
    Connection: keep-alive
    Content-Length: 15628
    Accept: application/json, text/javascript, */*; q=0.01
    Origin: http://XYZ
    X-Requested-With: XMLHttpRequest
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36
    Content-Type: multipart/form-data; boundary=-----------------------------201587343
    Referer: http://XYZ/wp-admin/post-new.php
    Accept-Encoding: gzip,deflate
    Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
    Cookie: wordpress_40ab07af03c9a4fc9bd9c0b14ed5535a=boehm_it%7C1415700507%7CylDf655hS6xIO7bFkiTzUFKks9TbMzoCJ3fvBsyZdst%7C137a49fb9221cd22322ba85e733d1846c2c18e7b839dcea046e66ada9bcc3747; ARRAffinity=07eef0c545b2cba40ca5145ac8ea183e0f167d0fffa8c38bd837efc847dd87db; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_40ab07af03c9a4fc9bd9c0b14ed5535a=boehm_it%7C1415700507%7CylDf655hS6xIO7bFkiTzUFKks9TbMzoCJ3fvBsyZdst%7Ca632f439ee78bc0c4b857aa40ce22bbccd98d4bb9597fa32bcb42ff99ec5b59b; wp-settings-2=hidetb%3D1%26editor%3Dtinymce%26libraryContent%3Dbrowse%26urlbutton%3Dnone%26advImgDetails%3Dshow%26imgsize%3Dfull%26align%3Dnone%26posts_list_mode%3Dlist; wp-settings-time-2=1415527711; _icl_current_language=de

    # response headers

    HTTP/1.1 500 OK
    Content-Length: 0
    Server: Microsoft-IIS/8.0
    Date: Sun, 09 Nov 2014 13:56:38 GMT

    # response
    …none…

    # cURL

    curl "http://XYZ/wp-admin/async-upload.php" -H "Cookie: wordpress_40ab07af03c9a4fc9bd9c0b14ed5535a=boehm_it"%"7C1415700507"%"7CylDf655hS6xIO7bFkiTzUFKks9TbMzoCJ3fvBsyZdst"%"7C137a49fb9221cd22322ba85e733d1846c2c18e7b839dcea046e66ada9bcc3747; ARRAffinity=07eef0c545b2cba40ca5145ac8ea183e0f167d0fffa8c38bd837efc847dd87db; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_40ab07af03c9a4fc9bd9c0b14ed5535a=boehm_it"%"7C1415700507"%"7CylDf655hS6xIO7bFkiTzUFKks9TbMzoCJ3fvBsyZdst"%"7Ca632f439ee78bc0c4b857aa40ce22bbccd98d4bb9597fa32bcb42ff99ec5b59b; wp-settings-2=hidetb"%"3D1"%"26editor"%"3Dtinymce"%"26libraryContent"%"3Dbrowse"%"26urlbutton"%"3Dnone"%"26advImgDetails"%"3Dshow"%"26imgsize"%"3Dfull"%"26align"%"3Dnone"%"26posts_list_mode"%"3Dlist; wp-settings-time-2=1415527711; _icl_current_language=de" -H "Origin: http://XYZ" -H "Accept-Encoding: gzip,deflate" -H "Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36" -H "Content-Type: multipart/form-data; boundary=-----------------------------201587343" -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Referer: http://XYZ/wp-admin/post-new.php" -H "X-Requested-With: XMLHttpRequest" -H "Connection: keep-alive" --data-binary ""^
    "-------------------------------201587343"^
    "Content-Disposition: form-data; name=""name"""^
    
    "word-image.png"^
    "-------------------------------201587343"^
    "Content-Disposition: form-data; name=""action"""^
    
    "upload-attachment"^
    "-------------------------------201587343"^
    "Content-Disposition: form-data; name=""post_id"""^
    
    "135661"^
    "-------------------------------201587343"^
    "Content-Disposition: form-data; name=""_wpnonce"""^
    
    "b8bf2691e2"^
    "-------------------------------201587343"^
    "Content-Disposition: form-data; name=""async-upload""; filename=""word-image.png"""^
    "Content-Type: image/png"^
    
    "‰PNG"^
    ""^
    "

    And yes images.. i got like a gazillion “ghost” image entries now im the libary (eg. word-image18.png).. all got the same URL, same name, same title etc. but broken preview images..

    anyway thanks again for the quick response! 🙂

    Plugin Author Michael Williamson

    (@michaelwilliamson)

    Definitely looks like the issue is the 500 error. I think you’ll have to dig through your logs (presumably your IIS logs) to work out what’s actually causing the 500 errors.

    Thread Starter bboehm86

    (@bboehm86)

    once again, many thanks! I’ll try to get my hands on these logs..
    outstanding quick support man!

    best regards
    benni

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error while attempting to convert file:’ is closed to new replies.