[Resolved] JavaScript Error in Classic Editor Triggers Issue with Media Library
This support ticket is created 5 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I have updated WordPress to 5.3 but my clients still prefer the Classic Editor. After updating, the Types gives a JavaScript error:
TypeError: wp.data.select(...) is nullbundle.add_or_edit.js:1:4354
<anonymous> hidden link
n hidden link
<anonymous> hidden link
<anonymous> hidden link
It doesn't cause a problem until they go use the Add Media button, at which point they can no longer use "Upload Files" tab to directly upload to their posts. When they click "Upload Files", the following error is generated:
TypeError: this.obj._listeners is undefinedbackbone.min.js:1:3747
Backbone 5
t hidden link
dispose hidden link
dispose hidden link
remove hidden link
jQuery 3
Backbone 2
remove hidden link
set Backbone
forEach jQuery
set Backbone
set hidden link
uploadContent hidden link
Backbone 4
t hidden link
trigger hidden link
render hidden link
mode hidden link
click hidden link
_click hidden link
_click self-hosted:1019
jQuery 2
dispatch
handle
I realize that the above error is generate by core WordPress files, but I'm wondering if it is linked to the first error. They currently work around the issue by going to Media -> Add New in the admin menu, uploading all of their files and then writing the post as the "Media Library" tab is still working. We have another site in WordPress 5.2 and I am not seeing the issue. Any help would be appreciated. Thanks,
Joe
Thanks for the report. I had a report of something similar yesterday which appeared to be a compatibility issue with a 3rd-party plugin, but reading your description I've re-tested the error and confirmed that it occurs because of an incompatibility with the current Types and WordPress 5.3.
I've updated the details on the internal ticket accordingly, and as an issue that can be reproduced just with Types (when editing posts with the classic editor) it should receive prompt attention, and I'll let you know how that goes.
That's the first error you report.
The second I haven't been able to reproduce.
To be clear, the error appears when you edit a post with the classic editor, and when adding to the post content, you use the Add Media button to insert an image via the Upload tab?
I didn't experience any such problems.
Are you able to check for conflicts on your site? Disable non-Types plugins and test again to see if the issue persists, as well as switching theme to twentynineteen if necessary.
I would start with the obvious candidates such as Enhanced Media Library and TinyMCE Advanced.