Skip Navigation

[Resolved] CRED Edit Post Links In A View Disappear When Post Status is Draft or Pending

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

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 16 replies, has 4 voices.

Last updated by Yann Bigant 6 years, 8 months ago.

Assisted by: Mohammed.

Author
Posts
#550624

I have a custom role based on the Contributor role. In Access Control they are set to be able to edit their own posts.

I have a View that lists their posts and displays links to edit the posts. These links only appear next to posts that have a status of 'published'. If they are have either 'draft' or 'pending' status, the links are not displayed.

If, however I add a CRED edit post form to the View, the post is displayed no matter what status it has and the User can edit it.

This doesn't make sense. If a User has the right permissions to edit a post, then post edit links should also be available.

Can you look into this please?

Thanks

#550796

Hi Julie,

I'm Mohammed, the Toolset support team leader. I will do my best to help you.

I'm able to replicate your issue. I will report it to the development team but before doing so, I will try to find a workaround for you.

Please wait and I will get back to you again.

Thanks.

#550925

Hi Julie,

Unfortunately, I couldn't find a workaround. I escalated the issue to the developers so that they can take care of the issue and fix it.

Please wait and I will get back to you once I get any news.

Thanks.

#551259

Hi Julie,

I escalated this to the development team and the response is that it's not a bug. it's by design and here it's a part of their response:

"CRED edit post liks create a link that, when clicked, point to the frontend page for a given post, and display the desired edit form insted of the post content. But when a post is not published, there is no such thing as "frontend page for a given post", because, well, it is not published."

For now, I submitted this again as a feature request in our system so that it can be implemented in the future.

Please let me know if you are satisfied with that.
You can close this ticket and follow the CRED changelog page to know the newly added features to the plugin: https://toolset.com/download/toolset-cred/#changelog

Thanks,
Mohammed

#551347

Hi Mohammed

Thank you for turning this round so quickly.

Unfortunately I'm completely dissatisfied with the development team's response.

when a post is not published, there is no such thing as 'frontend page'...because it's not published'

This comment is utter nonsense for the following reasons:-

1. They are not taking users' capabilities into account and they have no choice but to take these into account. WordPress allows Users with the right capabilities to view/edit post with draft status so if you're providing a link to a post then you have to enable display to occur according to post status & user capabilities.

2. If their comment were true, then it wouldn't be possible for a User with the right permissions to view & edit an edit version of a CRED form (displayed directly on a page or via a View rather than via a link to it) when the post has a status of draft but we all know that this IS possible.

3. The behaviour of the edit links HAS to behave in the same way as the edit version of the form. It's illogical and inconsistent to be able to edit a post in draft status in one area of a website (if presented with the edit version of the form) but not be able to edit the same draft post in a different place on a website (if led to it by a credit edit post link).

4. Here's the definitive point; the former cred_link_form shortcode behaves the way it should !!!!!
Something has been changed in the move from using [cred_link_form form='x-y-z' form_name='X Y Z' text='Edit %%POST_TITLE%%'] to using [toolset-edit-post-link content_template_slug="a-b-c"]Edit %%POST_TITLE%%[/toolset-edit-post-link].

It shouldn't be treated simply as a feature request; it's already been a feature, it's been taken away and needs to reinstated.

#551383
Posts ‹ otgs_toolset_replicate — WordPress - Google Chrome 2017-07-21 16.26.45.png

Hi Julie,

Thank you for your reply and I forgot to thank you for pointing out to this whatever we can call a feature or a bug.

Let me clarify the developer's feedback.the feedback means that you can preview the post but you are not actually viewing it which means that there is no actual page for the post to view it in the frontend.

What CRED does is that the form replaces the post content in the frontend. and because there is no page for the post because it's not published, then the edit form can't exist anymore.

The good news is that the request is approved which means that the development team has a way to implement this.

Thank you for your understanding.
Mohammed

#551536

Good call 🙂

Looking forward to a swift implementation

#552545

Hi Julie,

Yes, I hope so. BTW, it's a high priority now.

#556402

Hi Mohammed

I've had a look at the errata list but can't identify which one is for this issue. Can you advise please?

Thanks

#556480

Hi Julie,

We usually publish the Erratas when we want to officially announce a fix for an issue or to clarify something to our clients.

Your request is still in our queues. but, to be honest, I don't know when it will be implemented.

Just please keep following this ticket and I will notify you once I get any news from the development team.

Thanks.

#556761

Hi Mohammed

My understanding of the erratas list isn't just to 'announce a fix', it's there to also provide details of known issues that are being addressed.

You indicated the fix for this issue was a 'priority'. You now seem to be suggesting this isn't the case anymore.

This issue isn't a feature request. It's a function that no longer works correctly. That makes it a 'bug' (for want of a better word) and should therefore be included on the erratas list. The fact that it's not suggests it's not being taken seriously and won't be addressed anytime soon.

I don't think that's good enough.

I have pursued the use of Toolset's plugins for many reasons but one of the main benefits is the ability to edit custom posts on the front end. I have spent 1000's of hours over the last year building my second website using Toolset plugins. A fundamental part of the design is based on the ability for users to be able to manage custom posts on the front end which means I can keep users out of wp-admin. This has all been possible until the change in the shortcode format for editing posts. So now my site no longer works as constructed and you don't appear interested in reinstating the function with any urgency.

Ultimately this hits my online reputation and my pocket.

Do you think this is acceptable?

Have I made a mistake in choosing Toolset?

#557188

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi Julie

This is Juan, Toolset team leader.

Let me first apologize for the inconvenience we might be causing you. We had a different view in how this should be managed, because we considered that this new ability to add edit links using a resource (a Content Template or a layout) was a new solution for a long standing issue we had with the old CRED edit links. As it was a new development, we tried to narrow it down to the most general use case, which involved showing edit links for indeed published posts.

But we were wrong and you were right. The old CRED edit links covered the whole use case, incluing the ability to edit not published posts by those who can indeed edit them.

Our new approach is a little more limited in that regard. Because the link itself just links to the post frontend page, with an extra URL parameter that forces the right resource (Content Template or layout) that includes the CRED edit form. But for not published posts, the limitation is clear: there is no link to the frontend page for that post!

However, there might not need to be one.

I am currently testing a solution that for not published posts (drafts, pending review, future posts, etc) checks whether the current user can inded edit that post. If tht is the case, we will display the edit links, but instead of linking to the frontend page for that post, that does not exist, we will link to the frontend preview of that post, which is available for that current user.

Long story short: we will have a solution for this as soon as we get this tested. That solution will be publishd in an errata that I will link here, so you can use it right away. And the final, stable, definitive solution will be included in the next version of Views.

Hope it helps.

#558226

Hi Juan

Many thanks for your response, clarification and acknowledgement of this issue.

I'm very pleased to hear you're actively looking into this.

I'm a little worried by something you said in your penultimate paragraph:-

instead of linking to the frontend page for that post, that does not exist, we will link to the frontend preview of that post

If we link into the preview of the post, will this mean the user (with the correct permissions) will be able to see the post but not edit it? I perceive a preview to be just that and not actually the edit version of the form (which is what we had before). As long as my users with permissions to read & edit posts with draft or pending status will be able to edit or publish such posts on the frontend (as before), I'll be a happy bunny.

On a positive note, having been sceptical initially about using Content Templates to display edit forms, I can now see the benefits and an increase in flexibility which is never bad!

I look forward to further updates.

#560234

Hi Julie

This is to update you that our request is implemented in the next major Views release 2.5 .

Please keep following this ticket and I will notify you once we publish this release.

Thanks.

#560677

Hi Julie

I just got an update from Juan that he implemented a workaround for this. please follow the instructions in this Errata page and let me if it fixes your issue:
https://toolset.com/errata/cred-edit-post-links-should-be-available-for-authors-of-drafts-and-private-posts/

Thanks.

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