Skip Navigation

[Resolved] Cannot edit custom posts from front-end

This support ticket is created 7 years 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 12 replies, has 2 voices.

Last updated by mirkoG 7 years ago.

Assisted by: Christian Cox.

Author
Posts
#508554

I am trying to: allow users to edit custom post types from the front-end.
I created a form to create new posts and another form to edit posts (CPT).
I created a page that embeds the form to add new posts (CPT).
I created a layout for the archive of the CPT where users can click on the name of the post to see it.
I created a layout for the "single" CPT. In this layout, I used the CRED button to insert a link to the "Edit Form".

I visited this URL:
When clicking on the Edit link this is added to the URL: ?cred-edit-form=44857&_id=45708

I expected to see:
The edit form...

Instead, I got:
I am still on the "single" page where I can see the post in "view mode". The link still has the "?cred-edit-form=44857&_id=45708" part, the edit button doesn't show if that part is in the URL.

#508715

Hi, is it possible that the edit form is hidden further down the page, underneath the post content? By default, Layouts will load the CRED edit form on the single post page, with the content of your post visible. If you want to modify that, so that the edit form appears on its own page, I can help set that up. If the edit form is not visible at all on your page, that's an issue I will need to investigate further. Can you clarify for me if the form is completely missing, or just hidden?

#508723

Hi Christian,

thanks for your reply. I have just double-checked - just in case - and I can confirm that the page is reloaded, the Edit link disappear, but no edit form is shown.

Thanks,
Mirko

#508727

Okay that's unusual.

- Does this problem occur for only certain users, like only logged-in users, or only logged-out users? Any certain user role?

- If you are using Toolset Access, can you confirm the user has the ability to edit the post?

- Can you disable any non-Toolset plugins and enable a default theme like Twenty Seventeen temporarily to test?

If none of these tests reveal the problem, I will need to take a look at your wp-admin area to see your site configurations. You can provide the login credentials in the private reply fields here. Please also let me know where I can find the edit form (full URL). Thanks!

#509190

Hi Christian,

The problem occurs with both the Administrator and the custom role I created for the users (after making sure that Access was configured properly).

I have tried with a default configuration: the only thing that changes is that disabling Divi when I click on the Edit link I am redirected to the edit page but in the Dashboard rather than the front-end.

Disabling all the plugins (but the SiteGround plugin) doesn't change anything. I will send you a private reply with the log-in information and the URL.

Thanks

EIDT: I cannot find the private reply fields you mentioned in your message. Where are they? O:-)

#509504

Yes, please send the login credentials. There should be private fields enabled for your next reply.

#509876

Okay I see what's happening. You are using a Layout to display the single "Listing" post. CRED forms use the WordPress hook 'the_content' to display the CRED form for editing post, but your Layout does not include a cell that initiates a call to the_content. You can fix this by adding a content template cell in the single project Layout.

Insert this code in the content template cell:

[wpv-post-body view_template='None']

Please let me know the results.

#510000
0000001.png
img.png

Hi Christian,

no luck, I am afraid...

I added the cell as per your instructions (maybe it has to be in a specific place?) but the behaviour of the Edit link is still the same (page is reloaded, edit link is no longer there, but the edit form does not show up).

PS: Attaching a pic to show the cell in the layout. I can see that cell in the code of the page but it is completely empty (second pic attached).

#510406

Okay, I can't see anything obviously wrong here so I would like to make a clone of your site I can test locally. This way I can modify code without breaking your live site. Please let me know if that's okay with you, and I will use the Duplicator plugin to create the clone and proceed with my tests.
Duplicator plugin: https://wordpress.org/plugins/duplicator/

#510441

Sure, no problem

#510481
Screen Shot 2017-04-06 at 4.38.09 PM.png

Hmmm, I just disabled all the non-Toolset plugins and now I see the CRED edit form on my local environment. I'm attaching a screenshot.

I'll try to narrow down the conflicting plugin, standby.

#510504

It's Yoast SEO - when I disable the Yoast plugin temporarily on my end and purge the cache, my form reappears. Can you confirm the same on your end? I'm closing out the day here but I'll be back online Sunday. If you need urgent support before then, feel free to open a new ticket and link to this one for reference.

#511024

Great, yes, I can confirm that deactivating Yoast SEO the problem is gone!

Thanks for your support and have a great weekend.

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