Skip Navigation

[Resolved] View within view for sequence of many-many CPTs

This thread is resolved. Here is a description of the problem and solution.

Problem:
I setup a many-to-many relationship in types using three custom posts such that
-A is a custom post type
-B is a custom post type
-C is a custom post type
-C is a child of A and B
The problem occurs in the edit screen of the posts of type (A) and (B)
When I add new raw in the "post relationship" section, all the buttons (Save,Edit,Delete) are disabled.

Solution:
Please update Types to the latest version.
If this didn't work, please replace the file " \wp-content\plugins\types\embedded\resources\js\post-relationship.js"
with the following file: http://tinyurl.com/z6w74vb

This support ticket is created 8 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
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

Tagged: 

This topic contains 26 replies, has 4 voices.

Last updated by jimP 8 years, 1 month ago.

Assisted by: Mohammed.

Author
Posts
#375601

Hello Jim,

I’m Mohammed Toolset support second tier and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

I've checked the issue and found that this a possible issue in Types.
I will share my findings with the development team.Please keep following this ticket and I will get back to you once I get new news.

Thanks.

#375686

Hi Jim,

Thank you for your patience.

This issue should be fixed in the next Types release.
But to make this work until we launch this release, we have developed a workaround for this issue.

Please replace the file " \wp-content\plugins\types\embedded\resources\js\post-relationship.js"
with the following file: hidden link

This should fix the issue.

Thanks.

#375797
Screen Shot 2016-03-15 at 06.38.37.png
Screen Shot 2016-03-15 at 06.38.22.png

I could be incorrect, but I'm not sure that your updated file has solved the problem. I have uploaded it as you instructed (and cleared the WPEngine backend cache, and updated file permissions...WPEngine necessities when you do this via sFTP), and did a trial with a sample post on our production site. Attached are screenshots of the results. In the first, I have just created a new post relationship: the "Add New Post-Resources Link" button is greyed out, but I can click the Save button on the new link (at top); then on the second screenshot, I've clicked Save, and all important buttons are new greyed out/inoperable as they were before (this includes "Save Draft" button). So, with your updated file I can still only add one post relationship at a time.

I'm happy to further diagnose, and again many thanks for your very quick response.

Jim P.

#375803

Hi Jim,

I'm very sorry for this, I will check it again.

Please give me the time to do that.

Thanks.

#375821

Hi Jim,

I've tested the issue on my local machine and I can confirm that the provided fix works properly.

I need to check this on your website.
We already have the admin access to your website.I need the FTP access ti your website to check the fix.

Please provide the FTP access in the next private reply.

Thanks.

#376722

Hi Jim,

Thank you for your patience.

I've tried many tomes to replicate the issue locally but I couldn't.
So, I think that there is something special in your installation.

I've logged into your website ti figure out the issue but it seems that I'm not authorized to edit the post relationships.

Anyway, I such cases, I will need to replicate the issue on my local machine so that I can debug the issue.
For this, you'll need to temporarily install a plugin called "Duplicator" on your site. This will allow you to create a copy of your site and your content. You can provide me with the snapshot following these directions:
If you already know how Duplicator works ( http://wordpress.org/plugins/duplicator/ ), please skip the following steps and just send me the installer file and the zipped package you downloaded.

:: Duplicator instructions
. From WordPress plugin page, look for "Duplicator" and install it
. Once installed, you get a new main menu "Duplicator"
. Chose "Packages"
. Click on the first button you find in the toolbar on the right ("Create Package")
. Give it a name or leave it as is
**You can ignore the uploads directory , cache and the archives
. Click on "Create Package Set"
. Wait until the package is ready
. Click on "Installer", then on "Package": the first one is just a php script, the second one is a zip file containing everything you need
. Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big , you can also exclude the images if the file is very big )
IMPORTANT: remember to create or keep an admin account for me before creating the snapshot, or I won't be able to log-in. You may delete the new admin account once the snapshot has been built.

I will set the next reply as a private reply so you will able to provide a link to download the duplicator package.

Thanks and Best Regards

#376732

You cannot successfully use Duplicator on a multisite:

https://wordpress.org/plugins/duplicator/faq/

So this will not work on our instance.

I have just given you admin privileges on the target site; please try again. I will attempt to reproduce the problem on our Toolset test site.

Jim P.

#376746

One quick question: if I attempt to duplicate this issue at

hidden link

will this work, or has that file

\wp-content\plugins\types\embedded\resources\js\post-relationship.js

been updated on the discover-wp.com site? If it hasn't been updated on that site, then I won't be able to test the issue there.

Jim P.

#377346

Hi Jim,

I'm asking for help here because I'm not authorized to deploy any changes here.

Please let me get the accurate information and get back to you again.

Thanks.

#377349

Okay, thanks; I do think you will be able to perform edits on our site, now, or if Types is being updated soon we could wait for your discover-wp.com site to be updated. (There's a priority on getting this fixed, though, ideally within this wk.)

Regards,

Jim P.

#377696

I would appreciate if we could expedite resolution of this issue, which was reported on 13 March. Please let me know what I may do to assist.

Regards,

Jim P.

#377706

Okay, I have some good news to report! I believe your file fix did indeed solve the problem. What I did to diagnose this time was I logged in via a different user role, and when I did so I discovered another problem, which I had actually encountered before and documented for others:

https://toolset.com/forums/topic/you-do-not-have-rights-to-create-new-items-when-creating-new-many-to-many/

For some reason, my intermediate CPTs were no longer managed via Access, and I received that exact same error again. When I fixed this, I could then add multiple post relationship links with no problem.

I cannot say exactly how the two were related (in the case of a network admin role), but I think we are good at this point.

Thank you for all your help.

Jim P.

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