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 13 replies, has 2 voices.

Last updated by Shekhar Bhandari 1 year ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
September 27, 2018 at 8:20 am

leopoldH

I am trying to: translate my course from English to French

Link to a page where the issue can be seen: hidden link

I expected to see: the whole course and lessons translated to French

Instead, I got:"404 The page you are looking for does not exist." or "Internal Server Error"

I contacted my Host Support Desk who did multiple testings and concluded there is no issue with the Server.

September 28, 2018 at 3:09 am #2772448

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

I can see that the pages are working perfectly, so is the issue resolved?
hidden link
hidden link

If not could you please elaborate the issue further?

Look forward to your reply.

Thanks

September 28, 2018 at 3:44 am #2772453

leopoldH

To replicate the issue:

Browse to hidden link

Upper left corner change language to French

Browse down the page to the image of an ATM

Hover over ATM and click the "green bar" menu item.

Result is an Internal Server Error

This issue is random and does not present every time but only intermittently.

September 28, 2018 at 12:09 pm #2773683

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I can notice the issue, I checked the debug.log but couldn't notice any issues. Also since this issue doesn't happen frequently, it looks like a server issue, could you please contact your hosting provider once and ask for the server log and provide it to us.

Look forward to your reply.

Thanks

September 28, 2018 at 1:14 pm #2773899

leopoldH

This is the message I received from my hosting provider"

"Hello Leopold,

Thank you for your patience. I was able to reproduce the 500 ISE, this was due to too many redirects:

[Thu Sep 27 23:07:01.161978 2018] [core:error] [pid 607898:tid 139742473553664] [client 10.80.0.98:39982] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: hidden link

You may want to reach out to a developer to check your redirects and .htaccess code for conflicts, or disable plugins one by one to see if any are causing a conflict. Please let us know if you have any additional questions or concerns.

Best Regards,
==============================================
Ben P.
Support Specialist
A2 Hosting - Our Speed, Your Success!
+1.888.546.8946
hidden link"

September 28, 2018 at 3:46 pm #2774359

leopoldH

this is another message from the hosting support.

I hope you can leverage these messages to address the issue:

"Hello,

I checked out your site and was able to get it to throw a 500 error. The error kept coming so it made it easier to diagnose. What I found was that your .htaccess file is being modified when the language is switched and a page is loaded. The .htaccess file is being updated to include the /fr/ in the paths WordPress uses to apply redirects. So in other words, instead of this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

You end up with this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /fr/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /fr/index.php [L]
</IfModule>

This creates two problems. One is the 500 error because the fr directory doesn't actually exist. The second issue is that if this did work, the plugin itself uses the /fr/ path in the URL to trigger the language switching. If the rewrite is updated to use the fr in the path, it means everyone who visits the site would see it in French. Instead of working for individual users, it would be global until someone changed the language again.

To stop this from happening I updated the permissions on the .htaccess file to prevent the site from writing to it. This should stop the issue for now but you will need to have a developer look at the site so they can track down what is causing the .htaccess to be updated when the pages are being loaded. It may not be the language switching plugin causing it, as any plugin can have the ability to write to the .htaccess file. Your developer would need to root out the one that is doing this, likely through a series of disabling plugins until the issue stopped happening.

For now though, the permissions of the file are set to 444 but changing them back to 644 (which is default) should make the issue start happening again.

If you have any further questions, please feel free to contact us again.

Thank you for choosing A2 Hosting,
-David P

--------------------------------------------------------------
David P.
WordPress Specialist
A2 Hosting - Our Speed, Your Success!
+1.888.546.8946
@a2hosting"

October 1, 2018 at 7:39 am #2777272

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I would suggest the same the hosting support suggested.

It may not be the language switching plugin causing it, as any plugin can have the ability to write to the .htaccess file. Your developer would need to root out the one that is doing this, likely through a series of disabling plugins until the issue stopped happening.

Could you please disable all non-related WPML plugins, switch to one of default themes, the problem persists?

NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!).

Look forward to your reply.

Thanks

October 1, 2018 at 8:08 am #2777309

leopoldH

I am surprised when it is believed not to be a language plugin as the English version is now running smoothly. The only problem I am experiencing right now is in French.
When you enroll to a class and try to start it, you get the 404 error page. This is not happening when using the English version.
I desactivated most of the plugins before reactivating them. But that didn’t solve the issue.
I would appreciate if you would please try the suggested steps at your end.
The site has been backed up

October 2, 2018 at 9:03 am #2780767

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I can replicate the problem.

Could you please follow the below steps and let me know if this helps:

- Go to WPML->Settings->Post Types Translation
- On "Courses (STM-courses)" click on "Set different slugs in different languages for Courses." and set the same slug for "courses"?

I remember last time I suggested you do the opposite, but it seems currently the previous problem and the recent problem gets fixed when you use the same slug.

Let me know if this helps.

Thanks

Thanks

October 2, 2018 at 1:00 pm #2781476

leopoldH

I followed the steps you indicated and it worked. Do you think I should be good to go or I need to do some other adjustments?
Will I be okay if I rename "courses" to "classes"?
-----------
My other issue:
French front page - “Enter your E-mail” and “SUBSCRIBE” should be translated to French - “Entrez votre courriel” and “SOUSCRIRE” respectively.

In the Search box at the top left ,"Search courses" should be translated to "Recherchez formations"

Can you please, assist with these?

October 2, 2018 at 8:44 pm #2782785

leopoldH

I just noticed that the French version of my logo has been replaced by the default english logo.
You helped me before to set the logo is both languages

October 3, 2018 at 2:51 am #2783442

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Glad to hear that it now works.

Will I be okay if I rename "courses" to "classes"?
-> I think it will be ok, but make sure to translate the classes slug and the translation should also be classes.

As the original issue is resolved may I kindly ask you please to open a new ticket for your additional question?

This will help other users with similar problems to find solutions when searching the forum.

For the logo, please use the same steps as mentioned before, that will fix the logo.

Thanks

October 6, 2018 at 4:04 am #2792458
leopoldH

for the logo, I could not get back the French version. Last time, you were the one who did it

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

https://wpml.org/forums/topic/logo-translation-not-working-masterstudy-theme/

October 8, 2018 at 4:45 am #2794763

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

As the original issue is resolved, I have opened a new ticket for the logo issue.

Thanks