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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

Tagged: 

This topic contains 22 replies, has 2 voices.

Last updated by Dražen Duvnjak 3 weeks, 3 days ago.

Assisted by: Dražen Duvnjak.

Author Posts
October 18, 2024 at 7:32 am #16302919

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

sure, we would be glad to help, but not much I can help if you are not willing to follow my suggestion and get back with more info. Also, do not need edit htaccess that is not what I suggested.

1) Contact hosting support and ask them to share server error logs and send it to me, so I can see what is causing issue.

2) Go to your theme functions.php and at the end add the next code:

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;
}

- Go to settings > permalinks > click save /update
- Monitor the website and check if the issue still happens.

Let me know how it goes or if any doubts about the shared steps.

Regards,
Drazen

October 26, 2024 at 2:37 pm #16333420

ahfA

Hello, I added the code and at the end of theme functions.php, I also activated the WPL plugins and my site is showing errors, you can seen on the Loom link below:

hidden link

October 26, 2024 at 2:44 pm #16333424

ahfA

My site works on the first minutes and then it shows this error:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Apache/2.4.62 (Debian) Server at ahf.al Port 80

This happened after I activated the wpml plugin.

I repeat that I added the code that you sent.

October 28, 2024 at 7:03 am #16335951

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks, as I can see this happens after some action, as you have shown adding to cart.

Please contact hosting support and ask for server error logs, and few last error messages that occurred when error happens. That way they / we can clearly see what happens.

When server error happens, there is server error log with more information why this happened.

Let us know.

Thanks,
Drazen

October 30, 2024 at 11:04 am #16346329

ahfA

Hello
I communicate with server and they send me one file that i atach on this link .

hidden link

Thank you .

October 31, 2024 at 7:05 am #16349801

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks, I see an error there that could cause an issue:

Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT)

I suggest you go to WPML > Support > Troubleshooting > Click on the button "Fix WPML table collation" and see if it helps.

If not, you can use a third-party plugin Database Collation Fix (https://wordpress.org/plugins/database-collation-fix/) and set all tables' collation to "utf8mb4_unicode_520_ci".

❌ IMPORTANT: Please backup your database and website before proceeding ❌

You can also ask hosting support to help with this.

Let me know how it goes.

Regards,
Drazen

November 4, 2024 at 11:53 am #16360705

ahfA

Hello , i make this but is the same , show errorr very often

EROR.PNG
November 5, 2024 at 7:19 am #16364205

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

please re-do the process, make sure you have done the fix or your hosting support, then check again server error logs again if you still get the same error message about this or new.

Please share with me also the log. If you get the same messages, it means you have not applied the fix correctly.

Regards,
Drazen

The topic ‘[Closed] Plugin Conflicts: WPML’ is closed to new replies.