• Resolved Forson

    (@forson)


    Dear Support,

    I am using Toolset Types Custom Post Generator:

    I have a website with a custom post structure that has sections of the custom post that are Children and Nested Grand Children of the Parent post. When I duplicate the post your plugin only duplicates the top-level version of the post.

    Here is the Structure:
    Parent Post A (Custom Post)
    – Post Detail A1 (Repeating Field Group)
    — Line Item a (Nested Repeating Field Group)
    — Line Item b (Nested Repeating Field Group)
    – Post Detail A2 (Repeating Field Group)
    — Line Item a (Nested Repeating Field Group)
    — Line Item b (Nested Repeating Field Group)

    Parent Post B (Custom Post)
    – Post Detail B1 (Repeating Field Group)
    — Line Item a (Nested Repeating Field Group)
    — Line Item b (Nested Repeating Field Group)
    – Post Detail B2 (Repeating Field Group)
    — Line Item a (Nested Repeating Field Group)
    — Line Item b (Nested Repeating Field Group)

    My problem is Duplicate Post is only duplicating the Parent Post data but not the associated Post Detail (Repeating Field Group) and Line Items (Nested Repeating Field Groups).

    The answer I received from Toolset Support as as follows:
    “Hello, there’s nothing exactly like this built into Toolset. I doubt there is anything like it built into the Duplicate Post plugin, because of how RFGs are technically implemented in Toolset. An RFG is basically its own custom post type, related to the parent post in a one-to-many post relationship. So any tool that clones the parent post would also have to understand Toolset’s post relationships and how RFGs are managed in the databsae. Nested RFGs are even more complex, because they are children of another RFG, and I don’t know of any post duplication tool that is capable of cloning those. In short, I think it would take a considerable amount of custom code to make this work.”

    I am wondering if this is a feature that is achievable with your plugin or at the very least something that could be added?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Enrico Battocchi

    (@lopo)

    Hi @forson,
    as the people from Toolset say, Duplicate Post knows nothing about RFGs so it can’t clone them when cloning the parent.
    But there are some hooks, documented here, that one can use to attach a function to be called when you clone a parent post with RFGs.
    But you would have to know the specification of RFGs to do that. A lot of work, probably, as Toolset people say, but this would be how to “plug that code” into my plugin…

    I hope this helps!

    Thread Starter Forson

    (@forson)

    If you were to gain access to Toolset’s API for RFG and Nested RFG, would you be able to add a functionality to clone an entire custom post? We really need this functionality.
    Thanks!

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi @forson,
    it’s a bit out of the scope of my plugin so I can’t work on it.
    I added a similar feature for WPML translations but the code was provided was provided by the WPML team. You should ask the people from Toolset if they could do the same (WPML and Toolset are from the same company, actually).

    Thread Starter Forson

    (@forson)

    Hi @lopo ,

    Thanks for the fast responses. You are correct about WPML and Toolset. So can you tell me exactly what you or someone else would need from Toolset and I will get them to provide it.

    If you worked with WPML to do something similar – my guess is for cloning translations – then the Toolset implementation would not be too too different.

    Could you help me determine exactly what needs to be done? I imagine this would benefit many users of both plugins.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Toolset Custom Post Types Not Duplicating Repeating Field Groups’ is closed to new replies.