Ready to get started?Download WordPress


[resolved] Javascript issues (4 posts)

  1. Vidyut
    Posted 10 months ago #

    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.


  2. Serkan Azmi
    Plugin Author

    Posted 9 months ago #

    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.


  3. J.D. Grimes
    Posted 7 months ago #

    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.

  4. Serkan Azmi
    Plugin Author

    Posted 7 months ago #

    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.



You must log in to post.

About this Plugin

About this Topic


No tags yet.