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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 14:00 – 17:00 | 14:00 – 18:00 | 14:00 – 18:00 | 13:00 – 17:00 | 13:00 – 17:00 | - |
Supporter timezone: Europe/Zagreb (GMT+02:00)
Tagged: Bug
This topic contains 10 replies, has 2 voices.
Last updated by Bruno Kos 2 years, 2 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
March 20, 2023 at 3:07 pm #13285623 | |
julianZ-4 |
Tell us what you are trying to do? In Google Search Console, under the menu item "indexing" -> Pages, we have more than 2.000 URLs not indexed because of the reason "Page with redirect". See screenshot here: hidden link The URLs Google tries to index do not exist. I do not know why Google always checks them. When I click on "URL Inspection" you can see that these URLs are linked from nowhere: hidden link There is no sitemap and the URL "Referring page" (hidden link) is the same redirect as well. Maybe there was a bug in WPML, maybe our developers made a mistake. These URLs with a redirect are there for more than two years now and were never removed from Google alltough there are no links to these URLs. That's why I started to investigate what could be the problem. Apparently, these URLs are forwarded with a 302 (temporary) redirect intead of a 301 (permanent) redirect. X redirect by is from WPML: hidden link Most likely, because WPML has set up a temporary redirect instead of a permanent redirect, these URLs are still on Google but do not get indexed and are (most likely) bad for our SEO. I have set up a staging system and have disabled all plugins except: The 302 redirect is still there, no change on staging, too. The link to my site is: blackfridaydeals.ch You can check the two cases with wrong redirect like this: In both cases - and for all shops (850 in German, 552 in French, 252 in Italian) this happens. So in total, there are a lot of redirects, a lot more even than the 2.000 Google Search console finds. The stores / shop pages are a "custom taxonomy". How can I solve this? How can I make the redirects be 301 permanent instead of 302 temporary? Thanks a lot in advance. |
March 21, 2023 at 5:44 pm #13296917 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Thank you for contacting WPML support! Could you tell me if you changed the slug of page, so from zara to zara-it perhaps? When you say: The stores / shop pages are a "custom taxonomy". Among these 2000 affected pages, do these have specific pattern, such as having a common slug that redirects, such as "shops"? Regards, |
March 21, 2023 at 6:11 pm #13297293 | |
julianZ-4 |
Hi Bruno Thanks for your reply. Could you tell me if you changed the slug of page, so from zara to zara-it perhaps? All the stores / shop pages are located in "folder" /shops/. It is a setting in Theme-options of rehub theme: hidden link I believe the underlying URL is hidden link => It is a 301-redirect. Interestingly, if you want to get a store in French language, you can not add: hidden link (302-redirect to german-URL by WPML) but you have to add: hidden link (301-redirect to correct URL) So yes, this could/might be the problem/pattern, because WPML also redirects this page: hidden link via a 302 instead of a 301 redirect Do you know how to fix it? |
March 22, 2023 at 2:36 pm #13306373 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Can I ask you the following? In order to debug this issue, I will install Duplicator plugin, will create packages and will try this on my localhost and escalate further to 2nd tier. I will exclude all the media files, etc, to keep the package minimal. https://wpml.org/faq/provide-supporters-copy-site/ Let me know if this is OK with you. If yes, I will need WordPress admin username and password so I could do this. I marked your next reply private so you can safely add this information. Please make a full backup of your site before sharing this info! Regards, |
March 22, 2023 at 3:33 pm #13306841 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, This is escalated to our 2nd tier team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you. Regards, |
March 22, 2023 at 3:42 pm #13306933 | |
julianZ-4 |
Hi Bruno Thanks a lot. Can I delete your credentials from live in the meantime? Best Julian |
March 22, 2023 at 3:55 pm #13307021 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Sure, you can remove them, but we may prompt you to create a new user. Let's see first what 2nd tier will find out in their debugging. Regards, |
March 22, 2023 at 4:29 pm #13307319 | |
julianZ-4 |
Sure, thanks. I can create a new login upon request 🙂 |
March 23, 2023 at 12:50 pm #13315365 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, In wp-content\plugins\sitepress-multilingual-cms\classes\query-filtering\class-wpml-query-parser.php:L332, what if you replace: $wpml_wp_api->wp_safe_redirect( $new_url ); with: $wpml_wp_api->wp_safe_redirect( $new_url, 301 ); Does it change anything? Regards, |
March 24, 2023 at 12:20 pm #13323137 | |
julianZ-4 |
Hello Bruno Yes, it's now a 301 redirect instead of a 302 redirect. Will you implement this in production version? Because if not, I will have to do it manually on every WPML update.. Best Julian |
March 28, 2023 at 7:50 am #13346439 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, We will escalate this to our development team for them to decide because this would require thorough testing to see if this can somehow impact any other URL or cause any unwanted redirects. We will keep you posted here on what developers decide! Regards, |