• Resolved webuseful

    (@webuseful)


    Hi,
    The “Select File” button no longer puts the name of the selected file into the filename_1 text input field. Turning off Ajax did not help. Enabling debug mode did not help.

    I upgraded WordPress to 4.9.4, and various plugins, 3 days ago.

    The Chrome console shows lots of JS errors from the wp-file-upload scripts. The first few are:

    Uncaught SyntaxError: Invalid or unexpected token (index):153
    (index):185 Uncaught TypeError: Cannot set property ‘visualeditorbutton’ of undefined
    at WFU_JS_1_visualeditorbutton ((index):185)
    at wfu_run_js ((index):110)
    at (index):189
    WFU_JS_1_visualeditorbutton @ (index):185
    wfu_run_js @ (index):110
    (anonymous) @ (index):189
    wordpress_file_upload_functions.js?ver=4.9.4:2 Uncaught TypeError: Cannot read property ‘title’ of undefined
    at wfu_js_decode_obj (wordpress_file_upload_functions.js?ver=4.9.4:2)
    at wfu_run_js ((index):110)
    at (index):212

    (There are more but I think the root cause is the first error)

    Line 152 is:
    else{document.getElementById(‘wfu_messageblock_arrow_1’).style.display=”none”;header_container.colSpan=3}}
    Line 153 starts with:
    var next_block=document.getElementById(‘wfu_messageblock_subheader_1’);var next_block_id=0;var file_block=null;

    Thanks in advance,

    Steve

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter webuseful

    (@webuseful)

    Hi,

    It’s fixed. It was a theme-related issue. The theme moved the wpautop filter to after shortcodes are processed, which added line feed around:
    file_contents=”

    <table>
    <tbody>”+file_contents+”</tbody>
    </table>

    The theme is a few years old, so I guess a recent upgrade changed the way wpautop works.

    Steve

    Plugin Author nickboss

    (@nickboss)

    Thanks, good to know.

    Regards

    Nickolas

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

The topic ‘Select File button has stopped working, with JS errors’ is closed to new replies.