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.

This topic contains 5 replies, has 3 voices.

Last updated by Carlos Rojas 9 months, 1 week ago.

Assisted by: Carlos Rojas.

Author Posts
April 8, 2024 at 3:28 pm #15495260

tomB-16

I have 2 separate websites with the same issue.

So, this client contacted me, saying the shop page was broken, white page, without content (header, page title and footer were showing, no products though). I periodically experience the same problem on another website, and know how to (temporarily) fix it.
I know when I resave woocommerce > settings > products (without making changes), the problem is solved. I made a database backup before & after resaving these settings. I ran the diff command, and found the main difference between before & after, which is the rewrite_rules option (in wp_options page).

Before resaving:
s:7:\"shop/?$\";
s:27:\"index.php?post_type=product\";
s:37:\"shop/feed/(feed|rdf|rss|rss2|atom)/?$\";
s:44:\"index.php?post_type=product&feed=$matches[1]\";
s:32:\"shop/(feed|rdf|rss|rss2|atom)/?$\";
s:44:\"index.php?post_type=product&feed=$matches[1]\";
s:24:\"shop/page/([0-9]{1,})/?$\";
s:45:\"index.php?post_type=product&paged=$matches[1]\";

After resaving:
s:16:\"letterwebshop/?$\";
s:27:\"index.php?post_type=product\";
s:46:\"letterwebshop/feed/(feed|rdf|rss|rss2|atom)/?$\";
s:44:\"index.php?post_type=product&feed=$matches[1]\";
s:41:\"letterwebshop/(feed|rdf|rss|rss2|atom)/?$\";
s:44:\"index.php?post_type=product&feed=$matches[1]\";
s:33:\"letterwebshop/page/([0-9]{1,})/?$\";
s:45:\"index.php?post_type=product&paged=$matches[1]\";

As you can see, the shop page url should be '/letterwebshop' but when the problem occurs, it is '/shop'.

Mutual plugins between the two websites:
- ACF / ACF PRO
- MC4WP
- Mollie Payments for WooCommerce
- Woocommerce
- WCML
- Wordfence
- WPML
- Yoast SEO

These tickets are related:
https://wpml.org/forums/topic/shop-archive-doesnt-show-products-random/
https://wpml.org/forums/topic/shop-page-showing-blank/
https://wpml.org/forums/topic/split-shop-page-is-empty/
https://wpml.org/forums/topic/empty-woocommerce-shop-page-after-random-period/
https://wpml.org/forums/topic/main-shop-page-becomes-empty-from-time-to-time/
https://wpml.org/forums/topic/empty-shop-pages/

This one is the only one that suggest a cause, but no solution.
https://wpml.org/forums/topic/woocommerce-shop-page-gets-empty-regularly/

These are all the mutual plugins that call flush_rewrite_rules():
- ACF (Pro)
- WooCommerce
- WCML
- Wordfence
- WPML String translation
- Yoast SEO

These plugins also call flush_rewrite_rules(), but only on the first site:
- Ninja forms
- WP Migrate DB

Is one of these plugin the cause of this problem? As the problem is random and the status is 200 OK, it is hard to monitor, and frustrating for my clients.

April 8, 2024 at 4:39 pm #15495574

Laura
Supporter

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

If the issue is related to lush_rewrite_rules(), it's linked to this problem, not directly caused by WPML.

https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

If you can find which plugin is rewriting the .htaccess exactly we can see if it's possible to find a permament solution.

April 8, 2024 at 9:48 pm #15496302

tomB-16

Hi,

My issue is different than the one in your link. The rules in my .htaccess file were not changed. Only the rules in the database (wp_options > rewrite_rules) were changed.

The snippet you provided in the link, seems to be fixing a problem with the language folder being added or not added. In this case, the problem is that the `product_base` or `product_rewrite_slug` is incorrectly set to 'shop' instead of our custom base ('letterwebshop' in my example).

April 9, 2024 at 3:06 pm #15500130

Carlos Rojas
Supporter

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

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

Hello,
My name is Carlos and I will continue working on this ticket

I kindly ask you to follow these steps to rule out some possible causes:
- Create a full backup of the site
- Go to Plugins -> Add new -> Commercial tab -> Check for updates -> Update the WPML plugins to the latest version
- Update any other plugin or theme that might be outdated
- Flush any cache memory that might exists
- Go to Woocommerce -> Woocommerce Multilingual & Multicurrency -> Status tab -> Fix any issue that might appear in the first two sections
- Go to Woocommerce -> Woocommerce Multilingual & Multicurrency -> Shop URLs tab -> Make sure at least the first 4 slugs are translated
- Go to Settings -> Permalinks -> Re-save the permalinks
- Double-check if the issue disappeared

Could you tell me the results of the steps described above?

Regards,
Carlos

April 9, 2024 at 3:16 pm #15500176

tomB-16

Hi Carlos,

Thanks for your reply. What you are suggesting is a temporary solution. I can temporarily fix the problem by resaving the permalinks, but the problem re-occurs after an indefinite amount of time.

TBH, I'm not sure this is caused by WPML or WCML. But I saw a lot of similar tickets on this support forum, so I thought there might be a link. It might also be link to Yoast SEO, or a combination of WC + WPML + Yoast.

These are tickets of similiar problems. People who claim that Yoast SEO is the culprit:
- https://wordpress.org/support/topic/blank-woocommerce-shop-page/
- https://wordpress.org/support/topic/shop-page-going-blank-every-other-day/
- https://wordpress.org/support/topic/empty-woocommerce-products-page-because-of-yoast-plugin/

April 9, 2024 at 3:24 pm #15500201

Carlos Rojas
Supporter

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

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

Hi,

The steps I recommended contain more than just re-saving the permalink. Updating the WPML plugins and checking the configuration in Woocommerce Multilingual & Multicurrency is very important in this scenario.

Could you run the steps I described and let me know the results? Or do you need more assistance on my side to run these steps? I will be more than happy to check the configuration on your site 🙂