Definitely looks like it, and looks like it’s much more on the ACFPro side of things. The console stack shown above is all looking at ACF’s javascript much more than anything from CPTUI itself.
I’d check in with them at the moment, and if they come up with something that needs amended in some way for CPTUI’s settings, let us know. We’d love to help resolve the issue, especially if we need to make a change to our code itself.
Thread Starter
John O
(@jossoway)
Hi, thanks for the speedy reply. I’ve let the people over at ACF know too so hopefully they’ll fix things. 🙂
Thread Starter
John O
(@jossoway)
Hi,
I have been in touch with ACF, and they suggested I see whether the error only occurs with the block editor. I installed the Classic Editor, and as they suspected, there is no error when using the Classic Editor to edit and save the custom post with the custom taxonomy.
Looking into it a bit more, I discovered that the issue still occurs in the block editor when I deactivate ACF Pro but keep running CPT-UI and use it to add a custom taxonomy to the post type. With ACF Pro disabled I forced the error and got this error code:
TypeError: this.props.terms.join is not a function
at t.value (http://websiteaddress.com/wp-includes/js/dist/editor.min.js?ver=9.0.7:55:215147)
at zc (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:146:251)
at wc (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138:272)
at fa (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137:115)
at gg (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:135:196)
at Ca (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:133:365)
at Object.enqueueSetState (http://websiteaddress.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:191:324)
at r.q.setState (http://websiteaddress.com/wp-includes/js/dist/vendor/react.min.js?ver=16.6.3:20:304)
at r.value (http://websiteaddress.com/wp-includes/js/dist/data.min.js?ver=4.2.0:1:13998)
at http://websiteaddress.com/wp-includes/js/dist/data.min.js?ver=4.2.0:1:10357
To create the above error:
Using WP5.0.3 and CPT-UI I created a custom post type, then created a custom taxonomy for that custom post type. The error only occurs when trying to save a custom post type using the block editor. Everything works fine using Classic Editor.
When I remove the custom taxonomy, the error disappears.
When I switch to Classic Editor, the error disappears.
Any idea what could be causing this?
Thanks in advance.
Thread Starter
John O
(@jossoway)
Hi – any updates on this issue? Thanks.
I somehow missed seeing this reply, sorry.
Let me have a chance to see if I can recreate at all. I’m still doubtful that it’s anything specific to CPTUI because we don’t do anything to the editor screens directly ourselves, especially around Javascript, but I can at least give it an honest go.
To help out with that, can you share your settings for the post type/taxonomies being used?
You can grab the blobs of JSON from the “post types” and “taxonomy” tabs in the Tools section. Just paste the two here and I can take it from there.
Thread Starter
John O
(@jossoway)
Hi,
I had deleted the custom taxonomy so I could get the project ready for users to add content. I have just tried to recreate the error on my dev version and now it works? There have been several plugin updates over the past week. I can only assume there was some sort of conflict that has now resolved itself. Very bizarre. Thanks for your patience!
I could easily believe some of the changes from https://wordpress.org/plugins/advanced-custom-fields/#developers and 5.7.11 or 5.7.12 resolving the issue.
Glad to hear things are looking up all in all at this point.
Hi Michael, hi John,
just wanted to let you know that I encountered that “Uncaught TypeError: t.filter is not a function” error as well when registering a CPT and a custom taxonomy through a functionality plugin and not through CPTUI.
I had custom fields applied to that CPT with ACF and was using Gutenberg.
The temporary solution was the same though as for you, John:
The error disappeared when I threw out that custom taxonomy, and was then able to publish my CPT just fine.
Well, weird. Google only spits out this thread right here when searching for the error message. I will try to make the author of ACF aware.
Cheers
Alex
Thread Starter
John O
(@jossoway)
@voneff – let me know if you find out the cause. I tried but I couldn’t isolate what was causing the error – it even occurred when I deactivated ACF-PRO.
I wonder if it is a block editor issue with custom posts / taxonomies, and CPT-UI and ACF-PRO are red herrings?
The initial filter error has references to ACF Pro files, so at minimum, it’s trickling through and being triggered in that stack trace of calls.