Skip to content Skip to sidebar

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

Problem:
If you're experiencing the 'Sorry, you are not allowed to access this page.' error when switching languages on ACF options pages, it might be due to insufficient WordPress memory limit or incorrect user permissions.
Solution:
1. Increase the WordPress memory limit to at least 128MB, which is the minimum requirement for WPML. You can do this by adding the following lines to your wp-config.php file:

/* WP Memory Limit */<br />define('WP_MEMORY_LIMIT', '256M');

Place it before the line:

/* That's all, stop editing! Happy blogging. */

2. Ensure your current user is added as a translator under WPML >> Translation Management > Translators tab, with the correct language pairs assigned.
3. If the problem persists, check if it affects specific user roles or also occurs with the admin user role.
4. Try creating a new user with the Administrator role and access the ACF options page to see if the issue is resolved.

If these steps do not resolve your issue, or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, you can open a new support ticket for further assistance at WPML support forum.

0% of people find this useful.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by Noman 1 year, 2 months ago.

Assisted by: Noman.

Author Posts
October 23, 2024 at 10:25 am #16321253

tom@hive.agency

Background of the issue:
I am trying to translate the content within ACF fields on ACF options pages, such as site-wide footer content. I have checked all of the guides relating to making custom fields translatable.

Symptoms:
When I edit an options page and try to change language using the language switcher, I get the default WordPress 'Sorry, you are not allowed to access this page.' message.

Questions:
How can I resolve the 'Sorry, you are not allowed to access this page.' error when switching languages on ACF options pages?

October 23, 2024 at 11:12 am #16321422

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Before your ticket is assigned to one of my colleagues, I'd like to guide you through some initial debugging steps to speed up the support process.

To begin, please follow the below steps and let me know how it goes:

1. The current WP Memory Limit on your site is 40MB. The WP memory limit needs to be increased, it's different from PHP memory. PHP memory is fine but WordPress uses 40MB as default in your site. The minimum requirements for WPML are 128MB: https://wpml.org/home/minimum-requirements/

Please add this line to your wp-config.php file to increase WP memory, wp-config.php file is located in the root of your WP install:

/* WP Memory Limit */
define('WP_MEMORY_LIMIT', '256M');

You can add it anywhere in your file. I recommend placing it right before the following line:

/* That's all, stop editing! Happy blogging. */

2. Please try to add your current user as a translator under WPML >> Translation Management > Translators tab, ensuring the correct language pairs are assigned, and check if this resolves the issue.

3. If the issue persists, let me know whether it affects a specific user role or if it also occurs with the admin user role.

4. Additionally, create a new user with the Administrator role and try accessing the ACF options page to see if it works properly.

Please let us know the results,
Thank you

October 23, 2024 at 11:19 am #16321431

tom@hive.agency

Thank you Noman, point number 2 resolved getting access to the translated page however all of these fields are empty - we're using auto-translate - how can I get WPML to automatically translate these fields too?

October 23, 2024 at 11:42 am #16321495

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Glad to hear points 2 solved this issue. Sorry, currently it’s not possible to translate the ACF options pages automatically. You should be able to translate it manually by following the below steps:

1. Open ACF options page in the default language.
2. Switch to secondary language using admin language switcher.
3. Translate it manually and press the save/update button.

Here is a doc for more details:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-the-acf-options-page-custom-fields-with-wpml/

Please let me know if this resolves the issue or if you need further assistance with this issue.
Thank you

October 23, 2024 at 12:21 pm #16321647
tom@hive.agency

No problem, I will manually translate those custom fields, I've set them to copy once for now.

This is unrelated but when I started auto-translating I set items to publish but to mark for review - but now I have over 100 items for review and it won't allow me to bulk approve them. I get the same error as here: https://wpml.org/forums/topic/failed-approving-translations-for-the-following-posts-2/

I can individually review and accept, but I need to bulk accept them.

I've set all future translations to publish without review so I really just need to clear all 'Pending review' from the translations queue.

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/failed-approving-translations-in-bulk/

October 23, 2024 at 1:53 pm #16322206

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear the ACF options page translation issue is solved now. For the Failed approving translations problem, it’s a different issue and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/failed-approving-translations-in-bulk/

If the ACF options page translation issue is solved, please mark this ticket as resolved and we will continue working on the above ticket for it.

Thank you for your cooperation