• Resolved mattwiz

    (@mattwiz)


    I am getting the following error on a fresh WP install using the default twentysixteen theme with no plugins active other than URE. Any help would be appreciated.

    Uncaught TypeError: $(...).selectable is not a function
        at HTMLDocument.<anonymous> (ure-js.js?ver=4.8:140)
        at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=4.8:2)
        at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=4.8:2)
        at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=4.8:2)
        at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=4.8:2)
    • This topic was modified 7 years, 7 months ago by mattwiz.
    • This topic was modified 7 years, 7 months ago by bdbrown.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Are there any other JavaScript error messages at browser JavaScript console before this error message?

    Thread Starter mattwiz

    (@mattwiz)

    No sir there is not. Everything is functioning 100% until I hit the button in the pop-up to save my changes and then I get a blank screen and the error.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    I can not reproduce this error. Fresh installed WordPress 4.8. 2016 theme activated. The only active plugin – User Role Editor. I modified a role – turned ON a capability, then click update, confirmed, and got an updated role as usual without JavaScript error.

    Error message is related to jQuery UI problem. It’s not loaded for some reason.
    If you open a browser page source at Users->User Role Editor, will you see this code:

    
    <script type='text/javascript' src='https://yourdomain/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resiz&load%5B%5D=able,jquery-ui-draggable,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-selectable&ver=4.8'></script>
    

    ‘jquery-ui-selectable’ is important.

    Thread Starter mattwiz

    (@mattwiz)

    All it shows is this:
    <script type='text/javascript' src='https://mydomain/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils&ver=4.8'></script>

    Looks like it’s not loading a bunch of things. It seems to be doing that on every admin page. If you have any idea what might cause this, I’m all ears. Otherwise, I’ll mark this as resolved and search for the answer elsewhere on the web. Thanks for the help so far!!!

    • This reply was modified 7 years, 7 months ago by mattwiz.
    Thread Starter mattwiz

    (@mattwiz)

    Update:

    I got the remaining scripts enqueued. Now it shows:
    <script type='text/javascript' src='https://mydomain/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sorta&load%5B%5D=ble,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-selectable,jquery-ui-position&ver=4.8'></script>

    However, I am still getting the error.

    Update 2:

    I went into the Plugin code and set all of the JS to load in the footer instead and that fixed the JS error. However, upon saving – the page went blank and the update still did not save.

    • This reply was modified 7 years, 7 months ago by mattwiz.
    Plugin Author Vladimir Garagulya

    (@shinephp)

    Try another browser. I test URE with Google Chrome and Mozilla FireFox. If it will not help, I have no idea what may be going wrong. It’s difficult to catch if you can not repeat it at your own environment.

    Blank page may be related to a server side PHP fatal error. Look at the server logs.

    Thread Starter mattwiz

    (@mattwiz)

    Thanks for the tip! I was able to get everything resolved!

    For someone who is having the same issue and finding this via search engine, PHP7 was missing some packages that needed to be installed manually. If you are getting the following in your server logs, just run the commands below and you should be all set.

    PHP Fatal error: Uncaught Error: Call to undefined function utf8_decode()

    sudo apt-get install php7.0-xml
    sudo apt-get install php7.0-xmlrpc
    sudo apt-get install php7.0-mbstring
    sudo apt-get install php-patchwork-utf8
    sudo service apache2 restart

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Uncaught TypeError: $(…).selectable is not a function’ is closed to new replies.