Skip Navigation

[Resolved] CRED edit post links not appearing for drafts and private posts

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

Problem:
I have some drafted posts, and the links to the relevant CRED Edit forms for those specific Posts is not showing in a View Loop, when logged in as a custom role.

Published Posts CRED Edit links thou display fine.
What's the issue?

Solution:
In Views 2.4.1 and previous, the View loop did not render those edit post links for posts that where not published.

In any 2.4.1+ version, those links wil be dsplayed for users that *can edit* such posts, using the post preview link as a basis for it.
This means it is expected that you need to activate edit rights for the *post type*, not the CRED form per se, in Toolset Access > your_post_type, when you use a role that has no native rights to preview a post.

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

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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 20 replies, has 3 voices.

Last updated by Beda 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#609785
MYBEACH-Login.jpg
MYBEACH-Login2.jpg
MYBEACH-Login-Landing-Page.jpg

Hi Beda,

I am not sure exactly what you are doing.

The steps to get to the proper area are.

1) Go to hidden link
2) Users then click on the MY BEACH LOGIN link at the top navigation bar (see screenshot)
3) That takes you to the MY BEACH LOGIN credentials Page (See screenshot)
4) Login as a user (I can supply a test user account if you can give me a hidden credentials area)
5) Once logged in as a user, yu should be abel to see the MY BEACH Landing Page (see screenshot)
6) From there, you can click onthe My Music Gigs link on the left.

#609865

Thank you for the swift reply.

I have to debug this locally, something like this cannot be solved on a remote server easily.
This is why I have deployed the copy of the site.

After I encountered the issues as outlined previously, which will also appear on your online site after enabling WP Debug, I removed those issues and followed up with the steps I had at hand from the report to 2nd Tier, which lead to the problem described. I tried to find better steps in the ticket, but was not able to reach the issue.

I now followed the steps you provided in your last reply, and used again the tests user credentials that Nigel has provided me from this ticket.
I was more successful than earlier.

I saw on the step "Once logged in as a user, yu should be abel to see the MY BEACH Landing Page (see screenshot)", there are 170+ JS errors in the Browser console, related mainly to Error 500, 404 of missing images.
I am just mentioning this, in case you encounter performance issues on that page, it might be due to calls to missing data.

I then performed the last step of your detailed list above ("From there, you can click onthe My Music Gigs link on the left.")

I am led to "my-music-gis" correctly this time.

However I think I found a method how you can show the Edit Button for the Draft which right now is missing.

1. Head to Toolset > Access > Post Types > Music Gigs
2. Control this post type with Toolset Access
3. Find the user role "Client / Advertiser" (which is the role of the test user provided) and check these capabilities:
- Edit own
- Read (is checked by default if you check "Preview any")

This will solve the problem with the missing CRED Edit Button.
If you need this user to also see other's drafts, please also activate "Edit any".

Can you confirm that this solves the issue you reported here?

I suspect this is expected as we probably need the permission to access the Admin Edit Interface to see a draft, if I remember right WordPress would not allow the (unsafe) access to a draft no matter what.
I think that is why we need the edit permission on the post type directly if it's a draft.

I am not 100% sure about this and will confirm the technical details as soon I have some news in regard from the DEV, but meanwhile, I think you will be able to proceed.

#609878

Hi Beda,

Thank you for your assistance. I can confirm that now the EDIT button/link is appearing in the view and linking properly.

I am still having issues with the edit pages that it links to ... but I think Nigel is looking into that.

I saw your remark...
"... there are 170+ JS errors in the Browser console, related mainly to Error 500, 404 of missing images.
I am just mentioning this, in case you encounter performance issues on that page, it might be due to calls to missing data."

Yes, performance pon this page has been an issue. *as well as other areas of the site) . However, I am not seeing the same thing that you are. I am definitely seeing Console JS Warnings. They all seem to be referencing the jQuery Colorbox log messages. Are those the "errors" that you are referring to? I believe they are referencing links/images that are in the top Uber Navigation Bar.

#610121

No, on my end it was a lot of 404 not found on things like vabeach-logo-300x300.png, and 500er errors on the same kind of paths.

I assume, this is for some reason of how the images where stored. Eventually you do not see these issues on your site because the Images exist there, while my local MAMP my not be able to load them.

Anyway, these errors are not related to the issue reported here. That should be solved with the step indicated, as you confirm.

In Views 2.4.1, the View loop did not render those edit post links for posts that are not published.

In any 2.4.1+ version, those links wil be dsplayed for users that can edit such posts, using the post preview link as a basis for it.
This means it is expected that you need to activate edit rights for the post type, not the CRED form per se, in Toolset Access, when you use a role as you did.

Please let me know if I can help you with anything else?

#610140

Hi Beda,

You have fixed the issue of the EDIT button not appearing for DRAFTS. Thank you.

I am now waiting on Nigel to find out why the Editing page isn't rendering completely and functioning properly when I use the [toolset-edit-post-link...] shortcode

#610144

Hence I will close this ticket here.

Thank you for your patience.