Support » Plugins and Hacks » Zia3 CSS JS » [Resolved] Javascript issues

[Resolved] Javascript issues

  • I was getting javascript issues with this plugin, which were inexplicable, till another plugin’s tests (Geo Mashup) showed the following error.

    Uncaught TypeError: Cannot read property 'value' of null

    I am no expert, but thought I’d post this here in case it helps.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Serkan Azmi


    Hi Vidyut,

    You may have other plugins using the same syntax highlighter that have been uninitialized properly.

    Please send me a list of installed plugins to see if I can replicate the issue. So far there has been no issues with other plugins.


    I have also experienced this error with the plugin running on one of my clients sites. The error is caused by the JS for this plugin being loaded on every single page in the administration panels. This plugin’s JS is trying to initialize the syntax highlighting for the two textboxes, but the textboxes are only on the edit/add post screens, and so on the other screens it gives this error.

    Serkan, you should stop hooking the enqueue functions from the actions that you have them hooked to, and only call them inside of the function that displays the metaboxes. That way the JS will only be loaded on the administration panels where it is actually needed. I edited the plugin to do this, and the error was fixed. And the plugin still worked on the add/edit post screens.

    Plugin Author Serkan Azmi


    Thanks for the find, I updated the plugin to only load the required scripts when metaboxes are visible as suggested by J.D. Grimes. Please let me know if this fixed your problem Vidyut.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Javascript issues’ is closed to new replies.