Skip Navigation

[Resolved] Introducties should only show for connected experts.

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

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

Author
Posts
#2092703

****Please refer this ticket to Waqar***

This is the original threat:
https://toolset.com/forums/topic/split-how-to-show-the-related-posts-through-view/

We've "connected" the vakexpert "architect interieurarchitect Brussel" to 10 posts, which he can see at "hidden link". He should have NO access rights to the other posts.

However the vakexpert let us know that all 70 posts are available.

This threat has been solved before.

What is going wrong?

#2094377

Hi,

Thank you for contacting us and I'd be happy to assist.

The Vakexperts post "Architect/interieurarchitect, Brussel" is connected to the 17 Introducties posts.

The custom code from the other thread that you mentioned will make sure that when the author "lucas_freire_architecture" for this Vakexperts post visits the page at /introducties-ingelogde-gebruiker/, the view only shows those connected 17 Introducties posts.

When you log in as the "lucas_freire_architecture" user, do you see all Introducties posts in this view?

If yes, you're welcome to share the login details for this user.

I've set your next reply as private.

regards,
Waqar

#2094383

Waqar

What I am saying is that "lucas_freire_architecture" is seeing "all" introducties posts instead of "17" which he is only allowed to see (because for the other introducties posts he is "not" connected).

I cannot share "lucas_freire_architecture" credentials as I simly don't have the password (and it can nowhere be retrieved).

#2095723

I performed a quick test to confirm that the view at the page /introducties-ingelogde-gebruiker/ is showing the posts correctly.

Logged in as the administrator user that you've provided access to, I visited the page and saw the message "Geen introducties gevonden", without any results.

Next, I changed the author of the Vakexperts post "Architect/interieurarchitect, Brussel" to the administrator user that I was logged in as and then visited the same page again. This time it showed me the 17 Introducties posts which were connected to the "Architect/interieurarchitect, Brussel" post.
( screenshot: hidden link )

I've now reverted the author back to the "lucas_freire_architecture" and this test confirms that the view is doing its part correctly.

Are you referring to the user seeing un-related posts on this /introducties-ingelogde-gebruiker/ page or do you mean that the user should not see the content on un-related single Introducties pages?

#2095761

I am referring to the fact that this particular user sees all 36 introducties posts instead of only 17 for which he has been granted access.

#2095873

I apologize if my question wasn't clear in the last message.

Does this particular user sees all 36 introducties posts instead of only 17 on the page /introducties-ingelogde-gebruiker/ or somewhere else?

I also need your permission to set a new password for this particular user so that I can log in as that user for troubleshooting.

#2098909

Thank you for sharing these details.

During troubleshooting, I noticed that the custom filtering based on related posts was not working only when the AJAX-based pagination is used.

In the related custom code snippet "show-vakexperts-related-posts", I've replaced the line:


if ( !is_admin() && ( isset($view_settings['view_id']) && $view_settings['view_id'] == 5663) ) {

With:


if ( ( isset($view_settings['view_id']) && $view_settings['view_id'] == 5663) ) {

The check for "!is_admin()" was causing this and it is fixed now.

#2098939

My issue is resolved now. Thank you Waqar!