Skip Navigation

[Resolved] Edit Draft Post and Published Post On The Same Page

This support ticket is created 3 years, 10 months 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by himanshuS 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1911201

Situation:
For a custom post type, I want to
1) Create a draft post
2) Allow user to review the draft it
3) If want to make changes, edit the draft post
4) Review the post after making changes to draft post
5) Publish the draft post
6) Allow user to make changes to the published post
7) View published post.

The CPT Name: Project Submissions
Setup is done using elementor template.
What is working:
- Draft post is created using CRED form and 'show post' option allows me to show the project submission after submission.
- The post is easily published using the 'submit project submission' form that only has a submit button in it. The submit button shows up on the post itself in elementor template
- If post is published, the edit post button works well. I have created a content template that has an edit published post form embedded in it. I also have a post content module on the elementor template, which is called when I click on the edit post button.
- Published post is edited easily and the post is viewable again after I submit the edit published post form

What is not working:
- I have created another edit post form titled edit draft project submission. In this form, I am setting the post status to draft after editing.
- I have added this post form in a new content template named Edit draft project submission template.
- I added another edit post button the elementor template calling the draft project submission template using it's id (for example: [wpv-post-url]?content-template-id=11979)
- The problem: When I click on the edit draft post button, nothing happens.

Why does the edit post button ( i.e. call to the content template) work when post is published and not when post is in draft status.

What could I be missing?

#1911631

Hello,

For the problem:
When I click on the edit draft post button, nothing happens.

Please check if there is any JS/PHP error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

And check the compatibility issue:
In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2021, and test again

#1919347

My issue is resolved now. Thank you!