Skip Navigation

[Resolved] Toolset view does not display translated content (WPML) according Toolset Access

This support ticket is created 4 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 52 replies, has 5 voices.

Last updated by Nigel 3 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1511855
#1512079

Thank you, I was able to access the test site and begin investigation but did not have a chance to finish this ticket before the end of my day. I'll update you when I have returned to work and have more information to share.

#1513465

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Mark,

Christian is currently out today, however he will be back tomorrow to continue working on this issue with you.

Thank you for the continued patience.

#1516533

Hi, just a quick update to let you know I've asked my 2nd tier support team to take a closer look here. I'll let you know what I find out.

#1519119

My second tier support team has recommended a change in the conditional in your View. The quotation mark nesting is a bit problematic, and something like this would be more effective:

[wpv-conditional if="[current_user_can capability='[wpv-post-field name='_wpcf_access_group']'] eq 1"]

Please try this update and let me know if the problem is not resolved.

#1519385

Hi, I tried. The problem is not resolved. Thanks

#1527145

I will be reassigning this ticket to second tier supporter Beda, who has had trouble working with the clone of your site to produce the problem. I have tried several times but we get different results and cannot come to a consensus on the solution. Beda will update you when he can.

#1528183

Hi, I'm Beda, I had a (several) looks at this issue when Christian escalated it, and the main issue I had was that the Duplicate wasn't allowing me to deploy the site at first, but later also I found, the content of the Duplicate is significantly different from what I saw on your test site.

For example, on the Duplicate, I see the culprit View has an Ordering by a Custom Field that does not exist for the Post Type in question and hence not even admins sees content in the page.
Another issue was also some HTML condition, that was wrongly formatted.

But on the local site Toolset Access had no effect whatsoever over this, and also it can't, because this is actually a Feature often requested that Toolset Access misses: to control the views loop output.
On the testing site, however, as soon Access is deactivated I see content in the Spanish view as that test user.

When you take that View and insert it into a new page, and translate that page, the same issue happens.
This is truly strange, as Access, has knowingly no rule over Views!
And as soon I give Read rights tot he Series Post type for the role (one of) this user has... I can see the output in the front end.

And this all does not happen in the native language.
So the steps to replicate this issue should be as follows:

1. Create a user with maybe many custom roles
2. Install WPML and translate some content
3. Create a View of that content and show it as well translated
4. Visit as a user with no read rights over that post type, in a secondary language.

The user is expected to see content but if the bug is replicable, the user won't see

Before I dig into this, can I ask - on this test site - might I remove other plugins and themes as well?
I want to be sure I don't miss an obvious conflict first.

NOTE:
I have left the read rights for the training role ON, for that post type, Series so you can see it working now.

#1528197

Hi, Beda. Yes you can remove plugins or theme from the site. Thanks.

#1528209

I will replace the content of training modules to dummy content. To not expose it to the world.

#1528237

Are you using the "Create different Content Templates for each language" on purpose?
This is usually not recommended, and not the default setting.
It is in Toolset > Setttings > WPML Integration

If set, it expects you to translate the Content Templates, but there are no translations, so in the translated languages those templates will not work.
One of them is used on Series (single)

I inserted as well a new view and the thing is, on the translation, even if I added my new view, the old View is displayed.
So we have some massive cache at work here, do you use cache on this site?
That's BTW an issue only in WPML not related to Toolset, because the actual page content if ATE or other translation methods are disabled and we translate by editing the page directly, shows the old view, not the one I inserted in the translation editor.
Please report this issue to WPML as it is particular to WPML and this site, but not Toolset directly.

However, after being aware of this, I was able to edit also the translation of the homepage and have inserted my new view there too.
It has the same issue as the existing View

It is truly impossible that Access controls this, and yet, it is Access that provokes this issue on your site, I can't say else.

I then saw you are using outdated Toolset and outdated WPML plugins.
I've updated them all, and no it doesn't solve a thing.

The only that solves it is to set the user role you want to see those posts to have read access.

Is there a reason why not giving them read access but then at the same time displaying them a view with those posts?
It might for you to be faster to just given them read rights in access, while we narrow down the issue.

Please do not delete the testing site, I will need to take a copy of it later.
Note that I had to make several changes and tests, it is not in its original state.

#1528261

I dont remember I changed Toolset > Setttings > WPML Integration. Maybe Chris did that.
I dont use any additional caching tools.
Are you talking about giving a read access to whole post type? This will allow user to access any of them, this is not what we need.

#1530161

Do you mean Christian (our Supporter)?
I don't think he made that change but will ask.

Related to "Are you talking about giving a read access to whole post type? This will allow user to access any of them, this is not what we need."

The thing is, if you display a View, in a fresh WordPress install, using Access, you can NOT control what that View displays with Access settings.
That View will ALWAYS display ALL posts to ALL users.
This is important to understand.

What is happening on your site in the second language is not possible, seen from the intended way it should work and is designed, UNLESS that is an archive, then yes - but you display a View there.
It may be the View is overwritten and assumes an archive, and then yes Access will hide the contents according to the Access settings - but that is only on archives.

There is hence a usability issue when you want to show only a FEW posts to a role but display posts with Views.
You can't control that and the user will see all posts. Only when visiting the single post, then the Access rules would apply, or of course, in the archive.

I suspected that to be the issue initially on your site, but I inserted the view in a page, that is not an archive, and it still happens.
The only explanation for this is code, code added or modified to make something work that Access can't do.
This is possible thru filters, actions or maybe even a BUG or conflict could break Access' process to check whether a View or Archive is used.

This is why I suggested giving that user read rights - but you are right, if you need granular single post control on those, this will not be the best solution.

I am now attempting to take a new copy of the site, to debug this again, find out what is wrong and fix it...

#1530191

So this site cannot be duplicated.
"This server cannot complete the build due to host setup constraints."
Yes, the packages are created, but corrupt, incomplete, and that is why when I deployed the previous one, I saw something completely different than what I see online.

I tried all in one migration and it seems to have created something that I can use for a clean replicate.
It's almost one GB in size and currently downloading, please wait for me to confirm until closing the testing site, if possible

Thanks!

#1530219

OK, I have a clean duplicate of this issue now, you can close the testing site if you want.

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