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

Last updated by lesterH 1 year, 4 months ago.

Assigned support staff: José Arcos.

Author Posts
May 24, 2018 at 3:12 pm #2223977

lesterH

I have a site hosted by WP Engine, so I have both a live and staging site. We have a Product custom post type, and are seeing a 502 Bad Gateway error, after a delay of over a minute, when trying to update a particular product page on the live site, because of WP Engine's 60 second timeout setting. After the error occurs, if I try to open the page for editing again, I get the same 502 error. The only way I can reopen the page is to exit WP Admin and log back in.

The error only happens when WPML is activated, and it only happens on the live site, not on the staging site. It also only happens with the particular instance of this page. If we clone the page to a new page on the live site the update finishes without error in about 10 seconds. When I put the site into debug mode I get the following errors when trying to update/open this page:

[24-May-2018 04:15:46 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/template-parts/splash.php on line 8
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 67
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 70
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 225
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 234
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 242
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 250
[24-May-2018 04:15:47 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 265
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/template-parts/splash.php on line 8
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 67
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 70
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 225
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 234
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 242
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 250
[24-May-2018 04:17:03 UTC] PHP Notice: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' in /nas/content/live/emseal/wp-content/themes/emseal/single-product.php on line 265

I don't get these errors when I try to open another page or a clone of this page, so I don't think replacing ICL_LANGUAGE_CODE with the new $current_language_code value will solve it, as all of our pages using the same theme code. I think there's an issue with how WPML is handling this page on the live site. I've done all the steps on Support->Troubleshooting in terms of fixing errors, clearing cache, etc., without any luck. I've deleted the plug-in code and reinstalled it. We are using the current versions of all the plug-ins - acfml, wpml-cms-nav, wpml-sticky-links, wpml-translation-management, wpml-string-translation, sitepress-multilingual-cms, and wpml-media-translation. We are running WordPress 4.9.5. We upgraded to the current WPML versions about three weeks ago and this problem arose on this page late last week.

What I think I need is a way to completely clear anything related to this post_id from the WPML database tables, but I don't know what that is. If there is such a thing, I'd appreciate getting it from you, since a colleague and I are going a little nuts trying to figure this out. Thanks very much in advance.

May 25, 2018 at 1:02 pm #2229286

José Arcos

Hello, thank you for contact us. I will try to do my best to help you.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

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.

Maybe I'll need to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

** 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
 
Thanks.

May 28, 2018 at 9:10 am #2237091

José Arcos

Hello again, what is the product that is giving the error? I tried with many of them and none is returning me the 502 error. Could you send me the link?

Thanks.

May 28, 2018 at 5:36 pm #2240905

lesterH

An example of a specific page we are having the problem with is: hidden link

The post_id for this page is 834.

The error does not happen on every page, and does not happen on this page if I deactivate the six WPML plugins I have on the site.

May 29, 2018 at 11:32 am #2245327

José Arcos

Hello again, I can not reproduce the issue in my local environment. I activated the debug and I'm getting just a PHP Notice error but not a Fatal or Crash error. The root of the issue may be in a few slow queries between the theme installed in the site and WPML. So, there are a few options that we can consider here:

- Increase timeout time in the production server.
- Disable temporary server cache and try to reproduce the issue.

I think that this last one solution can help to identify the problem. The issue is just on the production site, so the cache is the only difference between staging and production site. If after disabling the server cache, you don't have the issue anymore, ask your hosting provider for further support and explain them all this situation.

I would also recommend you to ask your theme developer to check this error:

[29-May-2018 10:54:55 UTC] PHP Notice:  Trying to get property of non-object in /nas/content/live/emseal/wp-content/themes/emseal/template-parts/cad_library-listing.php on line 129

Please, let me know the result of your tests.

Have a nice day.

May 29, 2018 at 1:49 pm #2246142

lesterH

Hi Jose, As mentioned in my initial request, we are seeing the issue only on our live site. It does not occur on a cloned site or a clone of the same page on the live site. We have not seen the error you posted in any of our logs, so i believe that is something specific to your cloned site. There is something wrong with this specific page in how it interacts with one or more of the WPML plug-ins on the live site. We were hoping that you would be able to investigate that interaction on the live site and see something we're missing or don't have the tools to see. If that's not possible, please let me know. If that's the case, we will close this ticket, and we will have to delete this page from the live site and implement a cloned page with redirections so as not to lose any links. Thanks, Keith.

May 29, 2018 at 3:08 pm #2246619

José Arcos

Hello again, the error notice is from your production site, I activated the debug, and you can read the notice from wp-content/debug.log. Did you try to deactivate the cache for a while and check if the issue persists?

Please, make that test for me and let me know the results. Thanks.

May 31, 2018 at 8:03 pm #2258489

lesterH

Hi Jose, We are going to replace the page and use redirects. Nothing we try is helping, so we think there's just something corrupted in that particular page instance and we don't have time to continue looking for it. I appreciate your assistance and suggestions nonetheless. Thanks.