Skip Navigation

[Resolved] JavaScript error when using post relationship editor to add new child post

This support ticket is created 6 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#643430

Dear Christian Cox,

I made the relationship between two custom posts, Acupuncture Point and Book, I edit an Acupuncture Point post, there is no problem when connect existing book but error when Add New Book, I turn on the browser inspector and find below error

AddNewDialogViewModel.js:48 Uncaught ReferenceError: tinyMCE is not defined
    at Object.self.onSaveNewRelationship (AddNewDialogViewModel.js:48)
    at HTMLDivElement.click (AddNewDialogViewModel.js:114)
    at HTMLButtonElement.d.click (dialog.min.js?ver=1.11.4:11)
    at HTMLButtonElement.dispatch (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-ui-position,wp-a11y,underscore,shortcode,backbone,wp-util,moxiejs,plupload&ver=4.9.4:3)
    at HTMLButtonElement.r.handle (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-ui-position,wp-a11y,underscore,shortcode,backbone,wp-util,moxiejs,plupload&ver=4.9.4:3)
#644019

Please clear your browser cache, then go to Toolset > Post Types. Edit both custom post types "Acupuncture Point" and "Books". In the panel "Sections to display when editing", enable option "Editor", and test again. Let me know if this does not resolve the problem.

#649475

Dear Christian Cox,

Yes, I test it with Incognito Windows, after enabling the editor from Sections display when editing, I can add the new book. What is the problem?

I found another critical problem and making a relationship between custom posts. There is a "Trash" option under the section "Acupuncture Points Books", it is very dangerous if more than one relationship to current custom post.

I make two connections from two acupuncture points to the same book, I click the Trash option from one of the two acupuncture points, it permanently removes the book and also breaks all the relationship with another. I understand I should select disconnect option to remove the relationship but it still too dangerous if I have hundreds of connection with the same book already.

Best regards,

Kelvin.

#649821
Screen Shot 2018-04-11 at 1.07.28 PM.png

I test it with Incognito Windows, after enabling the editor from Sections display when editing, I can add the new book. What is the problem?
It's a bug in the betas, we're working to fix it. Enabling the editor is the workaround that we have found for now. We will resolve the bug in a future release.

I make two connections from two acupuncture points to the same book, I click the Trash option from one of the two acupuncture points, it permanently removes the book and also breaks all the relationship with another
I understand how this could be a problem, and we include the warning message to be sure Users know this cannot be undone (see the screenshot). Do you have any specific ideas about how this could be improved?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.