Sometimes js errors is caused when adding media to post-type
-
I’m having an issue I can’t really put my finger on. Sometimes when I try to add a featured image or via a custom field (ACF media field) Happy Files does not initialize correctly giving me a js error. However, if I close down the media dialogue and press again it works. It’s like something is not initialized before I press a media button at least once.
hf.min.js:13 Uncaught TypeError: Cannot read property 'classList' of null at initModal (hf.min.js:13) at Object.success (hf.min.js:13) at c (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6.1:formatted:1319) at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6.1:formatted:1372) at l (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6.1:formatted:3773) at XMLHttpRequest.<anonymous> (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6.1:formatted:3900)
I can re-create this on the same local installation. But it’s less frequent there which is wierd considering my local development is way slower but it happens. The main problem is on our dev server. Biggest difference is that our dev server has a htpassword. But that should not cause this problem? This is happening when using Gutenberg. We have not tried using a non Gutenberg post-type. From what I can tell it happens all post-types (post, page, custom).
We’re running:
Wordpress 5.6.1Plugins:
Advanced Custom Fields Pro 5.9.5
Gravity Forms 2.5 Beta 3 (For Accessibility)
Happ Files 1.5.1
The SEO Framework 4.1.3
WP Rocket 3.8.5
Purge all WP Rocket cache 1.0
WPML 4.4.9
WPML String Translations 3.1.7
- The topic ‘Sometimes js errors is caused when adding media to post-type’ is closed to new replies.