Skip Navigation

[Resolved] New Method of Creating Post Edit Link in CRED Version 1.9 Not Working

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

Problem:
I'm trying to create post edit links using the latest version of CRED (1.9) but having problems.

I've created a Content Template that contains the edit version of my form and I have a view that displays a list of the user's posts.

Solution:
Please follow the below steps and you will then see Edit form on front-end:
1. Create a new Content Template
2. Add Cred Edit form in this Content Template
3. Create a View
4. Insert Cred Edit post link in “Templates for this View” section, screenshot here:
https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2017/06/533420-CT_in_View.png?x50174

Relevant Documentation:
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/

This support ticket is created 7 years, 5 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 11 replies, has 2 voices.

Last updated by julieP 7 years, 5 months ago.

Assisted by: Noman.

Author
Posts
#533313

I'm trying to create post edit links using the latest version of CRED (1.9) but having problems.

I've created a Content Template that contains the edit version of my form and I have a view that displays a list of the user's posts.

There's seems to be two ways of creating the required post edit links inside the View. I already have content in my View, I understand I can go to Field & Views and select the CRED Edit Post Link. When I do this, I get the set up box to set the Content Template for the edit version of the form, the link text etc and this creates a shortcode with this format:-

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

I've added my View to the page but nothing shows on the frontend (there are posts that fulfil the criteria for the View).

I then tried it a different way by using the Loop Wizard and including the Post edit link field. When I select the edit button next to this field I can add the link text and add some CSS but I can't set a Content Template and there's isn't an option to 'open in same window'. This method creates a different style shortcode:-

[wpv-post-edit-link text="Amend"]

and does display the expected output of the View, together with the links, but the links take the user to the backend. I need them to edit on the frontend.

Apart from the fact that things aren't working as they should, why the need for two different styles of shortcodes?

I can see why the use of Content Templates to hold the edit version of the form makes sense but the whole process of adding edit links has become cumbersome - it was SO easy before.

This is SO frustrating.........................

#533420

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

CT in View.png

Hi Julie,

Thank you for contacting Toolset Support. I totally agree with you that this process is complicated and frustrating too. We have already raised this issue to with our development team to simplify it. The change was needed to allow adding new features, but it obviously needs to be re-done so it's easier to use.

Please follow the below steps and you will then see Edit form on front-end:
1. Create a new Content Template
2. Add Cred Edit form in this Content Template
3. Create a View
4. Insert Cred Edit post link in “Templates for this View” section (please see attached screenshot)

If issue still exists, then you can send us temporary login info to look into your site.

Thank you

#533670

Hi Noman

I can't add the CRED edit post link to the template section (please read over my post again).

I've spent hours this morning doing some testing to see if I could isolate the issue but I'm no further forward.

I have to say I'm really concerned right now. I have a live site and one that is in Coming Soon mode. I daren't update either in case my edit links drop out. In not updating I'm compromising security and SEO on both sites and the launch of my second site is now delayed. Not funny.

To help you understand the issues, this is what I've been doing to test.

Separate to the two site mentioned above, I have a multi site installation with currently just 3 sites that I use for testing software & plugin updates and design improvements. I'll explain each one separately.

MAIN SITE
This site is what I call my 'vanilla' site; it contains just a couple of post types, post fields, post forms and views. Nothing has been imported from anywhere else. There is a post field of every type (almost) which the forms use. The forms were created in the old style originally. I haven't used any Content Templates to display the Loop content. What is displayed sits in the View between <wpv-loop> and </wpv-loop>. Since the update, I changed the contents to match the new style and created the required Content Templates for the edit version of the forms. In the Views, I added the post edit links via Fields & Views and was able to select the Content Template in the settings window.
RESULT: The post edit links display and work correctly on the frontend.

SECOND SITE
Here I'm re-creating my live site and have imported post forms etc using Module Manager. I've changed the content of the post forms to use the new style. It was only when I got to the point of testing the pages containing post edit links that I realised the problems (see first thread).
RESULT: can't add post edit links as expected and depending on which shortcode is used, either the links don't display or they link to the backend not the form edit Content Template.

THIRD SITE
To see if perhaps there was something amiss on site two, I've spent several hours this morning testing a few things on this new third site. I ran 3 tests.

TEST ONE
I imported a few single line post fields from my live site, created Post Forms, Content Templates and a View to display edit links by selecting CRED post edit link from Fields & Views (i.e, without using Loop Wizard/Content Template).
RESULT: links displayed and linked correctly to CT.

TEST TWO
I imported a variety of other post fields from my live site all relating to one post type. I created a post type, post form, the CT to edit it and a View by selecting CRED post edit link from Fields & Views (i.e, without using Loop Wizard/Content Template).
RESULT: links don't display

TEST THREE
I imported the post forms from my live site that use the post fields I imported for Test Two. I created a different CT to edit the form and a different View selecting CRED post edit link from Fields & Views (i.e, without using Loop Wizard/Content Template).
RESULT: the links don't display

At this point I went back to the page set up to display the output of the View created in Test One and the links for that now no longer display.

As I see it, the only option I have is to completely re-write my sites which I've spent nearly a year working on day in day out. I'm feeling totally gutted at the moment.

Please provide private box so I can give you log in details.

Thanks

#533783

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Julie,

As I can see that Post Edit link working fine on your MAIN SITE and the problem arise when you imported post forms on your SECOND SITE. Looks like something went wrong when you import the post forms.

- Please also send me export file that you exported using Module Manager (the one you are trying to import, so we can test using that file).

- Please provide temporary access (WP-Admin and FTP Login info) to your SECOND SITE.

I have enabled private message box, your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

Thank you

#533924

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Julie,

I have checked in your second site, and found that there is problem in the condition you have created in this View, when I take out the cred edit post link from the conditional output it display Edit link on form page:

Your scenario is very complex and I am not able to find out that what’s wrong in the conditional output. But I can confirm that Cred Edit Post link is working as expected in your site. Please try to fix the conditions first to make Cred Edit Post link work.

Thank you

#534088

Hi Noman

Thank you for looking into this. Firstly, can I request please that you hide/remove the URL contents in your response that identify the site domain. Thanks

I was really relieved when I read your findings but I'm afraid my joy was short lived.

Views 223, 224 and 227 are essentially the same as 222 but applied to the other post types. So I removed the conditional statements in those too but the links don't display. I don't understand why the link shows in the one you amended but not in the others. We've also lost sight of the fact that there are NO conditional statements in my tests on Site 3 and the links don't display there either.

I therefore don't believe the conditional statements are the issue and, at the end of the day, the links display without issue in my live site using the previous CRED format so they should (& need to) work in the new format.

You commented that my scenario is complex; I would agree it achieves alot but I don't feel it's unreasonable to only display a post edit link if the post has a status of publish or draft and the value of a custom field is 'no'. That's a fairly simple database query in my book.

I carried out some more testing this morning on a fourth & a fifth site. On the fourth site I imported one of the post forms from my live site, the associated post fields and the View to see if it would work in the updated environment. The link shows but clicking on it returns a 404 (the target is '_self'). On the fifth site, I re-created from scratch the fields for one of the post types, the post forms, the CT to display the edit link and a View. The link doesn't display.

This essentially means I can't update my live site (or my new site) without losing the post edit link feature which is a crucial function on both sites.

I've added you to these additional sites in case you want to have a look.

There is clearly a big problem here and it needs further investigation please.

#534217

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

errors.png

Hello Julie,

When I open a View 223, and created a page with this page, then is said, “You don't have any dog walks booked at the moment” even though I published “Rex” post that was saved as draft earlier. But still Rex post was not displayed in the View 223, then I added a new “Test Dog” post and it is displaying with Edit link on the front page, but still Rex post is not displaying. Same happened with View 224.

Please check here: [ Links removed ]

I guess something is went wrong with your older posts and your site because I see some errors when I tried to add new post. Please see attached screenshots.

I have removed your site links from previous message and will removed the above links too when you check those pages.
Thank you

#534223

Hi Noman

There seems to be an issue after the work I did in site 5.

Before we go any further with this, can you clarify something for me please? In a multi site scenario using sub folders, if I create, for example, a post field in the main site called Arrival Time with slug arrival-time, export that post field using Module Manager, import it into say site 2 then change the slug to arrivaltime (no hyphen) in site 2, should the slug in the main site remain as arrival -time or will that change to arrivaltime as well?

Thanks

#534256

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Julie,

No slug will not change in Main site if you change slug in site 2. But where ever you have used this field in site 2 for example in CRED form then you also need to update this slug in CRED form.

Thank you

#534264

OK thank you for clarifying that (is how I thought it should be).

I've had a look around and discovered that alot of the post fields have dropped out (in more than just one site). I think I need to re-install this site and try it again. If I still have an issue with the post edit link, I'll raise a new ticket.

Please remove URLS from post#534217 then I'll close this thread.

Thanks

#534267

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure Julie, I have removed the URLs. I wish the other problems will be solved soon so you can get everything working fine.

Have a great day,
Thank you

#534311

Thanks Noman, you too