I am having an issue with my WordPress installation. I am hoping some people familiar with WordPress can help me out.
I am trying to add custom CSS using the Visual Composer plugin but when I click save after entering the CSS it does not do anything.
If I delete everything and keep it as it was then it allows the save button to work. I have included the error in the console below.
After researching this a little bit I see that the isNotDirty
property is part of tinyMCE. It detects if the CSS stored in the database has changed in the window.
To troubleshoot I have uninstalled all the plugins and reinstalled them. I have restored a previous known working database but am still getting the error. Any ideas on where to look next? I would have thought reinstalling visual composer would have corrected the issue but apparently not.
Here is another link with more info
Uncaught TypeError: Cannot set property 'isNotDirty' of null composer-view.js?ver=4.2.2:293
vc.post_custom_css_block_view.Backbone.View.extend.setAlertOnDataChange composer-view.js?ver=4.2.2:293
vc.post_custom_css_block_view.Backbone.View.extend.save composer-view.js?ver=4.2.2:277
n.event.dispatch load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,json2,farbtastic&ver=3.9.1:3
r.handle load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,json2,farbtastic&ver=3.9.1:3
UPDATE:
I have installed a fresh copy of the theme on a different virtual host and it seems to be working fine on there. I noticed that the working version has one extra line of HTML which is listed below. The non working version does not have this.
<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all" id="ui-id-1" tabindex="0" style="display: none;"></ul>
I changed the themes on the non-working version and it still does not work.
UPDATE:
Something very strange happened. I am always using the backend editor, so I decided I would try out the frontend editor to see if I could add custom CSS. Sure enough it allows you to do it and I was able to save the custom CSS. So I went back into backend editor mode and now all of a sudden the custom CSS in the backend is working.
I experience this issue on one of my WordPress projects. I managed to fix it by taking the following steps:
Locate the following lines of code and remove them: