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 Carlos Rojas 1 year ago.

Assigned support staff: Carlos Rojas.

Author Posts
September 26, 2018 at 2:31 pm #2767694

jasonW-5

The radio button list above does not include the site with the problem, which is:
standexelectronics.com (site is actually in production, I just had to click something above)

I am not 100% sure this is caused by WPML, but I have eliminated all of our custom code and am now looking at WPML as a possible cause. Here is what is happening:
All of a sudden a segment of the site returns 404 errors on all pages. It stays that way until we flush the rewrite rules. This is in all languages. A flush of the rewrite rules resets things for a while and the problem stays away for a few hours to as long as a day.

As a stopgap, I have written a flush_rewrite_rules() into the 404 page so that if someone gets a 404 it does the flush and the problem goes away temporarily after that single instance. That is obviously a band aid solution and we need to find the root cause. Running flush_rewrite_rules() is too resource intensive to run that often.

The client is very upset because they still get 404s once in a while, even though my code flushes the rewrite rules after that 404 and there are no more errors -- at least for a few hours.

With regard to giving support site access, I will have to inquire as to if our company wishes me to do that.

Any help in diagnosing this problem would be very helpful.

Thank you!
Michael

September 27, 2018 at 6:01 pm #2771509

jasonW-5

Just a bump on this -- we haven't had any response yet. Again, this is a production site and we have an unhappy client.
Thank you

September 27, 2018 at 9:07 pm #2771798

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting WPML support.

I would like to ask you to follow this steps in order to isolate the cause of the issue:
- Create a staging site or make a full backup of the producction site before making any change.
- Update all outdated plugins and themes if necessary.
- Flush all cache memory that might exists.
- Go to Settings -> Permalinks -> Re-save the permalink structure.
- Deactivate all the plugins that are not related to WPML.
- Switch for a moment to a WordPress default theme like Twenty Seventeen.
- If the issue is gone, activate one by one to see with which one there is an interaction issue.

Could you tell me the result of this steps?

Kind regards,
Carlos

September 28, 2018 at 1:49 pm #2774108

jasonW-5

Hi Carlos,

I had done most of those steps (minus the two mentioned below) previous to submitting the support request.
This is a production site for a lareg international corporation, so

1) Switching themes is not an option in any way shape or form since it is a gigantic production corporate site with heavy traffic 24x7.
2) Deactivating all plugins not WPML just is not an option since they would lose major functionality and the problem sometimes takes a day or more to arise. They would never agree to us doing this.

The steps you describe are standard WP troubleshooting technique, but we can't do that since it is a production site on a major level. If we make a staging site, no one will be in it 24x7 doing whatever it is that triggers the 404 situation. Again, it can go for a day or even two just fine and then something happens that makes pages go 404.

Can you now see why I am looking for help? We feel pretty trapped here since we can not find the source of this 404 issue and we can't do the standard troubleshooting you recommend.

September 28, 2018 at 4:59 pm #2774479

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you very much for your feedback.

I understand your concern about the troubleshooting steps I recommended. In this case I kindly ask you to activate the debug mode on the site (https://codex.wordpress.org/Debugging_in_WordPress) and check if there is any error message in the debug.log file.

Looking forward to your answer.
Best regards,
Carlos