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

Last updated by Bruno 1 year, 6 months ago.

Assigned support staff: Bruno.

Author Posts
May 8, 2018 at 8:50 am #2025569

adriO

Affter updating the Gravity Forms plugin to version 2.3.1 I'm confronted with internal server errors. What ever page I try, internal server error is the response.

Investigating the problem I discovered that when the Multilingual CMS plugin AND the YITH Wishlist plugin is active the internal server error show (of course is Gravity Forms activated also).

In only WPML or the YITH Wishlist plugin is active together with Gravity Forms no issue occurs.

I reached out to the support of Gravity Forms and they are pointing me to you and YITH.

I don't know which plugin is ultimately responsible but yet again WPML is involved. I'm getting very frustrated by WPML. One issue isn't even solved yet or another one occurs. I'm on the edge of leaving the products of OnTheGoSystems

Ok, let's try to be positive
I did see a notice though which might be helpful.

Notice: An outdated add-on or custom code is attempting to access the fcsp_rg_form table which is not valid in this version of Gravity Forms. Update your add-ons and custom code to prevent loss of form data. Further details: hidden link in /home/fullcol4/staging/1/wp-content/plugins/gravityforms/gravityforms.php on line 5146

I will also post over at YITH.

Best wishes

May 9, 2018 at 1:34 am #2042312

Bruno
Supporter

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

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

Thank you for contacting us.

Apparently, this is a problem that is happening with GravityForms Multilingual.

It seems that in the latest version of GF, some tables have been changed and GFML tries to access the old tables, but it is no longer working: hidden link

Our developers are already aware and are already working to fix this. The version fixing this issue will be released soon.

Would you like me to test your site in our testing environment to see if this will work correctly? If so, please could you create a copy of your site with Duplicator and back up your site? Then just send me the link so I can test.

Thank you.

May 9, 2018 at 3:13 pm #2055777

Bruno
Supporter

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

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

Hi Adri,

Thank you. I tested your site in my testing environment and this does not seem to be related to GravityForms Multilingual.

This seems to be related to the Yith WooCommerce Wishlist. The problem is happening as follows:

- When you access the default language and then switch to the secondary language, the .htaccess file changes;

- This change basically adds the language code inside the .htaccess file:

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

- With this change, this 500 error occurs

- Exactly, this change is made to the code in the file plugins/yith-woocommerce-wishlist-premium/includes/class.yith-wcwl.php on line 1174

- At line 1161, the plugin author defined these lines to prevent this from happening with another plugin:

if( defined( 'POLYLANG_VERSION' ) ){
	return;
}

- Basically, adding a filter to WPML should also avoid the problem as well:

if( defined( 'POLYLANG_VERSION' ) || defined( 'ICL_LANGUAGE_CODE' ) ){
	return;
}

Note: Why is this happening?

1. You have not set a Wishlist page in YITH Plugins > Wishlist > Settings (tab) > Wishlist Page

> and

2. The slugs on these pages are different "Lighttable" and "Lichtbak". On the "Lichtbak" page, for example, if you use the "wishlist" slug, this works correctly.

This is because the "wishlist plugin" checks whether the defined slug exists in the list of rewrites rules. Only one URL for wishlist is saved. If this is saved in English it does not work in Dutch and vice versa. Keeping the two slugs similar works properly.

I hope I have been able to explain why this problem is happening. In short:

- Filtering if WPML is enabled will avoid the problem, as the author did with Polylang plugin.
- Creating a wishlist page and keeping the same slug in both languages and configuring in YITH Plugins > Wishlist > Settings (tabs) > Wishlist Page, will also work correctly.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

May 10, 2018 at 6:02 pm #2077978

adriO

Hi Bruno,
Thank you for your quick reply and for providing a solution for my problem.
A few remarks though (and questions to make things more clear to me).

In your explanation you wrote that I did not set a wishlist page in the settings but I did. I checked it and the page 'Lighttable' was set as wishlist page.

If I do understand you correctly is changing the slug of the Dutch wishlist page from "lichtbak" to "lighttable" will also do the trick. Maybe it does but if possible I do want to keep my permalinks as clean as possible. English slugs for English pages and Dutch for Dutch pages.

I tried the solution for checking if WPML is active as you provided and that works flawlessly.
So, I'm gonna suggest to YITH to add the check as they did with Polylang.

For now, thank you very much, you've been a great help.

May 10, 2018 at 6:31 pm #2078338

Bruno
Supporter

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

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

Hi Adri,

I'm glad this helped.

>>> In your explanation you wrote that I did not set a wishlist page in the settings but I did. I checked it and the page 'Lighttable' was set as wishlist page.

You're right. I was a bit confused. I noticed that when changing the setting page to the secondary language using the top bar, this option is not checked. That's why I got confused. Sorry about that.

>>> If I do understand you correctly is changing the slug of the Dutch wishlist page from "lichtbak" to "lighttable" will also do the trick. Maybe it does but if possible I do want to keep my permalinks as clean as possible. English slugs for English pages and Dutch for Dutch pages.

From the tests I've done, as long as the slugs are the same, this should work correctly. For this to be possible, you will need to make the same filter that is being made for Polylang.

Or maybe it will be necessary to create custom permalinks for each of the slugs used in the wishlist pages. In the "yith-woocommerce-wishlist-premium/includes/class.yith-wcwl.php" file, in the lines 1165 - 1169, maybe it will be necessary to add a loop with each slug of each language.

Thank you.