Tell us what you are trying to do?
Hi, we have a customer site in German and English that is restricted to logged in users only. We use Toolset access control to restrict the page. German is our default language and we created a content template under Access Control in German which works fine while being on the german version of the site (hidden link). We also translated the template into english using WPML, but on the english version of the page we are getting a 404 error: hidden link
The website is created using Avada Theme and the login dialog you can see on the site is provided by Avada. The Register modal is done with Formidable Forms builder.
Is there any documentation that you are following?
Toolset documentation
I just ran a simple test on my local site where this appeared to work as expected.
I created a Content Template to be shown when access is restricted (just a heading with some text).
I translated that template to a second language.
I restricted Guest users from seeing pages using Access, and set them to be shown the above Content Template instead.
I ensured that my test page was translated into the second language.
I then tested it on the front end. A guest visitor in the default language sees the template content in the default language. Switching to the second language, they see the translated template content.
Those are effectively the same steps you have followed?
If so, I think we'll need to see you site to look into this further.
Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.
I have checked it in your website:
1) You are using content template "No access", but it is empty in both languages: hidden link
How do you display the login form in above content template?
2) Since you are using 30 plugins and a custom theme in your website, I have tried to switch to WordPress default theme 2023, but get below error in frontend:
There has been a critical error on this website.
In order to check the compatibility issues, Is there any way to deactivate plugins/theme in your website in order to check the compatibility issues
Yes, the content template is empty, because we don't need to show any content there. The homepage content is restricted using a restriction setting within the Avada Theme. The user login form also comes from Avada theme.
Switching from Avada theme to the default WordPress themes won't work and this is also not an option for us.
We can try to reproduce the issue on a blank test system. If you have any idea in the meantime, we would be happy to hear it.
Thanks for the details, I have tested it in my localhost, and I can reproduce the same problem, it seems the problem only occurs in the home page of secondary language, can you confirm it in your website? thanks
In the meantime we tested on a local system as well and could NOT reproduce the issue there.
On the customer project we found that we have reverse proxy via nginx activated. We see the following 404 errors:
2022-12-01 10:04:22 Error xx.xx.xxx.xxx 404 GET /en/ HTTP/1.0
On the customer server we have another website with WPML installed (but no Toolset is used there) and the switch to /en (for english) works well on this site. It uses FastCGI (Apache) instead. But even if we use the exact same settings on the affected site, we still get the 404.
How did you configure your local machine? nginx? Apache? Are we sure it's a Toolset issue and not an WPML issue?
Here is the update from our 2nd tier supporters:
You can try below hot fix:
Download the patch file from here: https://toolset.com/patches/types-access-functions.php.zip
Unzip the file and use it to replace the file functions.php in Access plugin folder: plugins/types-access/application/
An important note: this update won’t be included in the upcoming Access release (too late), and so you will need to re-apply the patch after the next Access version.