This Duplicate post link has to be set in 2 places:
- on the custom type Objet single template
- in the View loop displaying all Objets of a given Collection or Institution
Is there any documentation that you are following?
I have found a php function in :
- Tooset forum : https://toolset.com/forums/topic/duplicate-custom-posts-at-front-end/
--- 8 years old : so probably not not up-to-date
- Yoast plugin Duplicate Post : hidden link
I tried both as I am able to : I put the function into the Code Snippets plugin and activated it.
But it does not work :
- on the Single Objet Editing Template, when updating, I get the message :
"La mise à jour a échoué. La réponse n’est pas une réponse JSON valide."
in English : "The update failed. The response is not a valid JSON response."
Is there a similar example that we can see?
- see the 2 screen captures below
What is the link to your site? hidden link
The admin temporary access for Toolset is :
- user name : toolset
- passsword : passwordremoved
Thank you for helping resolve this issue : it would be so useful to my client to be able to duplicate an existing Objet, without having to enter all similar fields contents...
Best regards,
Francesco De Grandi
Hi Minesh,
Thank you for your rapid and very substantial response !
The shortcode you added with the seriously updated function in Snippets work fine.
And it is published immediately, which is the prefered status in this case.
There is nevertheless a detail that would improve the solution even more :
- while cloning it, would it be possible to append the title of the custom post with the string : "copie"
- this would immediately signal the user that it is not the original post, but it's copy.
Thank you for letting me know if it is possible to update the function in that way. I do not have the wordpress/php profitiency to do it myself.
Hi Minesh,
Thank you very much : it works very well.
I decided not to put the shortcode on the single Objet template any more, in order to streamline the workflow of the duplication process.
I have to say that I am amazed at what can be achieved with Toolset : this site muselink.ch is destined to be a mulri-museum platform, allowing collaboration between the museums, therefore requirering tight access control and a great diversity of options for custom types templates and forms.
I have to thank the whole Toolset team for it : BRAVO ! Keep up your excellent work...
This issue is therefore resolved.
Thanks again,
Francesco De Grandi
Hi Manesh,
There is another element to fix, in order to complete this functionality :
- when duplicating, the permalink/slug of the duplicated Objet is set to : copie-source-objet-name
- then, when updating the Object Title, thre permalink stays the same, and is not updated to the new objet name
Is there a way to update the parmalink/slug of the new Objet on the publication form (without access to the admin dashboard) ?
This is a necessary, indispensable functionality. Thank you for helping me achiev it.
Best regards,
Francesco De Grandi
New threads created by Minesh and linked to this one are listed below:
Hi Manesh,
There is another element to fix, in order to complete this functionality :
- when duplicating, the permalink/slug of the duplicated Objet is set to : copie-source-objet-name
- then, when updating the Object Title, thre permalink stays the same, and is not updated to the new objet name,
as you can see in the attached screen shot.
Is there a way to update the parmalink/slug of the new Objet on the publication form (without access to the admin dashboard) ?
This is a necessary, indispensable functionality. Thank you for helping me achiev it.
Best regards,