Title: [Plugin: Ultimate CMS] javascript error generated by script.php
Last modified: August 20, 2016

---

# [Plugin: Ultimate CMS] javascript error generated by script.php

 *  [James Revillini](https://wordpress.org/support/users/jrevillini/)
 * (@jrevillini)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-ultimate-cms-javascript-error-generated-by-scriptphp/)
 * Hey dude! Great job on the new plugin. I just found one little issue having to
   do with include paths in script.php. It generated a php error which causes the
   javascript to not process, both on front and back end.
 * Here’s the fix for the first lines of script.php: [http://pastebin.com/EE5wUvag](http://pastebin.com/EE5wUvag)
 * [http://wordpress.org/extend/plugins/ultimate-cms/](http://wordpress.org/extend/plugins/ultimate-cms/)

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

 *  Thread Starter [James Revillini](https://wordpress.org/support/users/jrevillini/)
 * (@jrevillini)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-ultimate-cms-javascript-error-generated-by-scriptphp/#post-2587346)
 * BTW I should have stated those were while in the admin.
 * I have a couple more errors when viewed as a visitor:
 * > <b>Warning</b>: Invalid argument supplied for foreach() in <b>/…/wp-content/
   > plugins/ultimate-cms/post-type/class-xydac-post-type-functions.php</b> on line
   > <b>38</b>
   > <b>Warning</b>: Invalid argument supplied for foreach() in <b>/…/wp-content/
   > plugins/ultimate-cms/page-type/class-xydac-page-type-functions.php</b> on line
   > <b>27</b>
 * The fix is to have the get_active_{whatever}_types() function return an empty
   array if no custom post/page types are found. (I have not defined any yet)
 * fix for post types: [http://pastebin.com/yADXVLr3](http://pastebin.com/yADXVLr3)
   
   fix for page types: [http://pastebin.com/RJPUDgxq](http://pastebin.com/RJPUDgxq)
 *  Thread Starter [James Revillini](https://wordpress.org/support/users/jrevillini/)
 * (@jrevillini)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-ultimate-cms-javascript-error-generated-by-scriptphp/#post-2587383)
 * And another one caused in admin: “Uncaught TypeError: Cannot read property ‘value’
   of null” caused by script.php, line 2006:
 *     ```
       CodeMirror.fromTextArea = function(textarea, options) {
           if (!options) options = {};
           options.value = textarea.value; //textarea is null sometimes!
       ```
   
 * Since this gets into the CodeMirror code and I don’t know where it’s called from,
   I’ll probably leave this one to you. But I’ll tell you this – I got the error
   while managing widgets.
 *  Plugin Author [XYDAC](https://wordpress.org/support/users/deepakseth/)
 * (@deepakseth)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-ultimate-cms-javascript-error-generated-by-scriptphp/#post-2587488)
 * Thanks for these updates, I’ll make the changes and have the updated version 
   out asap.
 * -Xydac

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

The topic ‘[Plugin: Ultimate CMS] javascript error generated by script.php’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-cms_ce5c48.svg)
 * [Ultimate CMS](https://wordpress.org/plugins/ultimate-cms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-cms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-cms/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-cms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-cms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-cms/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [XYDAC](https://wordpress.org/support/users/deepakseth/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-ultimate-cms-javascript-error-generated-by-scriptphp/#post-2587488)
 * Status: not resolved