Skip Navigation

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.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Mateus Getulio 2 months, 3 weeks ago.

Assigned support staff: Mateus Getulio.

Author Posts
July 8, 2021 at 9:33 am #9155031

Taro Murakami

Tell us what you are trying to do?
I want to continue the support of this ticket. Marc Estrada was in charge of this issue and he handovered it to me.
https://wpml.org/forums/topic/language-in-directories-and-wp-in-subfolder-return-404-on-all-pages/

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
corporate-stg.whill.inc/gb

July 8, 2021 at 8:19 pm #9160153

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

July 12, 2021 at 8:13 pm #9180751

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Thank you for providing the credentials, but unfortunately, we're receiving a 504 error after making the login. Please see: hidden link

Is it working for you? If yes, could you please whitelist my IP, so we can check if it solves the problem: 201.75.187.167?

Let us know, please. Thanks,
Mateus.

July 14, 2021 at 2:26 am #9191067

Taro Murakami

Hello Mateus,

It reproduced for me, too. Now I fixed the problem so you won't see 504 error.
If the error still continues, let me know.

Thank you.

July 14, 2021 at 9:03 pm #9199341

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I checked this out but so far I couldn't find a fix for it.

I asked my colleagues to have a look at this issue in order to see if there's anything I'm missing.

I'll come back here as soon as one of my colleagues reply back to me (which it shouldn't take long).

Thanks,
Mateus.

July 15, 2021 at 1:43 pm #9210171

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

In order for us to take a closer look at this issue, I'd like your help creating a package of your website and sending it to us.

Please use the plugin Duplicator(hidden link) to create a full copy of your website so we can take a look at it and see what's causing the issue with the large table.

Please check our tutorial on how to create a Duplicator package here: https://wpml.org/faq/provide-supporters-copy-site/

If you come across problems while creating it, please feel free to ignore(exclude from the backup) both uploads and cache folders.

I'm enabling the proper field for your to share this copy, you'll see it on your next response.

Alternatively, you may use any file sharing service that you prefer and share the link in the ticket(your next response is being marked as private, only you and I have access to it).

Thank you, please let me know.

July 28, 2021 at 1:29 am #9283773

Taro Murakami

Hello Mateus,

I'm sorry for late this reply.
Now I found the cause of this issue.

The cause was settings in .htaccess. I added directive below.
#################
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteBase /nl/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /nl/index.php/$1 [L]
</IfModule>
#################

The reason I added is to use mod_cache. When I use CacheEnable directive of Apache2, I need to add redirect logic above. Otherwise wordpress doesn't work properly.

How can I use both mod_cache and WPML at the same time? Is it impossible?

About Duplicator, I can't send you the hole copy because of security and related reason.

Thank you,

July 29, 2021 at 12:38 pm #9308877

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thanks for your reply.

What can be happening is that the .htacess is getting overwritten with the language folder. Please check the errata for more information: https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/

Could you please test the workaround described there? Just add the following code to your functions.php:

add_filter('mod_rewrite_rules', 'fix_rewritebase');
function fix_rewritebase($rules){
    $home_root = parse_url(home_url());
    if ( isset( $home_root['path'] ) ) {
        $home_root = trailingslashit($home_root['path']);
    } else {
        $home_root = '/';
    }
 
    $wpml_root = parse_url(get_option('home'));
    if ( isset( $wpml_root['path'] ) ) {
        $wpml_root = trailingslashit($wpml_root['path']);
    } else {
        $wpml_root = '/';
    }
 
    $rules = str_replace("RewriteBase $home_root", "RewriteBase $wpml_root", $rules);
    $rules = str_replace("RewriteRule . $home_root", "RewriteRule . $wpml_root", $rules);
 
    return $rules;
}

Please give it a try and let us know how it goes. We're looking forward to your reply.

Kind regards,
Mateus.