Skip Navigation

[Resolved] Forms edit post link problems

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

Problem: I would like to create an edit post link, but the link leads to a page without the CRED form.

Solution: Do not use Beaver Themer and Content Templates together. If you want to insert a CRED form but cannot use a Content Template, you can create a View that is filtered to only show the post you want to edit with CRED. Then insert the edit CRED form inside the View's Loop Output.

50% of people find this useful.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 49 replies, has 5 voices.

Last updated by Shane 5 years ago.

Assisted by: Shane.

Author
Posts
#749610

I am trying to insert the link in a content template to edit a form. I have done this before but got totally confused. I have a form to make new records. I have a form to edit these records.
I have this link: [toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
Where do I put it?

#751721

Hi Beda,

I have a view with a content template (loop item in BP) which I target like this: [wpv-view name="bp" limit="1" offset="0"] with offset="1,2, or whatever". That works fine.

I have the following 'edit link' in there, which shows up and works but points in the wrong direction.
[toolset-edit-post-link content_template_slug="edit-bp" target="blank"]Edit %%POST_TITLE%%[/toolset-edit-post-link]

There is a post form to edit the post: "Formulier voor Editten Begeleidingsplannen" (form to edit Begeleidingsplannen, which is a custom post type).

I have read the page "Displaying CRED editing forms" (https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/) 5 times.

Could you point me in the right direction?

#756336

I think you experience this BUG:
https://toolset.com/errata/views-ajax-pagination-url-parameters-are-added-to-cred-user-edit-links-in-a-user-view-loop/

This was however reported for user forms.
But eventually, this shows as well on Post Forms.

Basically, you create a Content Template (if you do not use Toolset Layouts) and add the CRED Form in there:

[cred_form form="test-form"]

Then, elsewhere, for example in a View, you insert the Edit Link, passing that above created Content Template:

[toolset-edit-post-link content_template_slug="the-template-with-cred-form"]Edit %%POST_TITLE%%[/toolset-edit-post-link]

As said, in a View this may result with above-linked BUG

#759348

Hi Beda,
Thanks for your help. However still no luck.

The view with the link has no pagination.

To select the record I want I use this

[wpv-view name="Bp" limit="1" offset="2"]

.

The link I use is

[toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]

I tried the link in the article like this:

<a href="[wpv-bloginfo show='url']/begeleidingsplan/klant1/?content-template-id=1754&user_id=[wpv-user field='ID']">Edit This user: [wpv-user field="user_login"]
</a>

Related question: When the link works I would like to have it visible for another user role (next to Administrator) also. I tried like this

[toolset_access role="Administrator,another-role" operator="allow"]
...
[/toolset_access]

but it did not show up for the other role.

But first things first.

#762676

- Can you tell me where this link points? What URL?

[toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]

- If you click the link, what happens?
- What is the URL of the post being displayed in the Loop (not the current page)?

#763517

Hi Christian,

The URL the link points to is: hidden link
If I click it I come to a page where I can see the record but not edit it.

If I understand you well it is hidden link

#763631

Okay so the edit post shortcode works - it redirects you to the correct URL. The URL exists and the page loads, but the CRED form is not shown. This seems to indicate a problem with permissions or with the Content Template, not the edit post shortcode. Can you try the following troubleshooting steps first?
- Temporarily deactivate all plugins except Types, Views and CRED, then activate a default theme like Twenty Seventeen and try again. If the problem was resolved, reactivate your theme and other plugins one by one until the problem returns. Let me know what you find out.
- Share all the code you have placed in the Content Template with ID 1754.
- Open the browser console and watch for any JavaScript errors that appear when you try to load the Edit Post CRED form.

#763655

Hi Chris,
Your logic brought the solution. But slightly different then what you are inclined to think. I must confess I have been using the new betas of Types, Views and Forms (Cred). They seemed to work flawless but together with Beaver Themer ( important plugin from Beaver Builder guys) it did not work. That combination was the cause.
Please pass this on to the development team so they can fix it for the final release.

Footnote: as I have still some weeks to go developing this site I thought it would be safe because by that time there probably would be stable versions. I learned a lesson and thank you for solving it. I have another question which I will start a new thread for (tomorrow, it's almost midnight here). Please close this one.

Muchas gracias señor!

#763657

Sorry, I was too quick. Still, also with the 'old' versions it is Beaver Themer that causes the mishap = not being able to edit on the front. User forms are no problem, I can edit those on the front.

Shall I pass this on to Beaver Builder also?

#763658

Thanks for the input, I would like to present that issue to my developers so we can get it resolved as soon as possible. Could you provide a SQL dump file from your database so I can try to recreate the problem locally? I will activate private reply fields here so you can share a download link. The fields say "duplicator package" but any download link is fine.

#763660

The Javascript error I got was:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.form.min.js.map, line 0)

#765299

Hi Chris,
I do not get the secure form.

#768863

Let me try again, please find the private reply fields here.

#778363

Thanks, I am able to see the problem here and I have escalated to my 2nd tier support team. I will keep you updated here as I receive more information.

#779979

Thanks Christian!