Are there any other JavaScript error messages at browser JavaScript console before this error message?
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.
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='http://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.
All it shows is this:
<script type='text/javascript' src='http://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 8 years, 8 months ago by
mattwiz.
Update:
I got the remaining scripts enqueued. Now it shows:
<script type='text/javascript' src='http://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 8 years, 8 months ago by
mattwiz.
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.
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