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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 0 replies, has 0 voices.

Last updated by Kor 6 days, 13 hours ago.

Assisted by: Kor.

Author Posts
February 14, 2025 at 4:42 pm #16707509

Fernando Morgenstern

Background of the issue:
I have a custom post type page where the original and translated page have the same slug. When I access hidden link it works normally.

But when I try to access the english version hidden link it results in an infinite redirect loop.

hidden link redirects to hidden link with x-redirect-by = WordPress

hidden link redirects to hidden link with x-redirect-by = WPML

Symptoms:
This happens from time to time and I have to clear the rewrite_rules manually in order to make it work. For some reason, sometimes the rewrite_rules is populated with the word glosario ( in spanish ) instead of glossary.

When the error is happening I get this:

$ wp option get rewrite_rules |grep glos
'glosario/[^/]+/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[1]',
'glosario/[^/]+/attachment/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',
'glosario/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glosario/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glosario/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',
'glosario/[^/]+/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',
'glosario/([^/]+)/embed/?$' => 'index.php?glossary=$matches[1]&embed=true',
'glosario/([^/]+)/trackback/?$' => 'index.php?glossary=$matches[1]&tb=1',
'glosario/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?glossary=$matches[1]&paged=$matches[2]',
'glosario/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?glossary=$matches[1]&cpage=$matches[2]',
'glosario/([^/]+)(?:/([0-9]+))?/?$' => 'index.php?glossary=$matches[1]&page=$matches[2]',
'glosario/[^/]+/([^/]+)/?$' => 'index.php?attachment=$matches[1]',
'glosario/[^/]+/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',
'glosario/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glosario/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glosario/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',
'glosario/[^/]+/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true'

After I clear it and force it to populate again:

l$ wp option get rewrite_rules | grep glos
'glossary/[^/]+/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[1]',
'glossary/[^/]+/attachment/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',
'glossary/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glossary/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glossary/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',
'glossary/[^/]+/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',
'glossary/([^/]+)/embed/?$' => 'index.php?glossary=$matches[1]&embed=true',
'glossary/([^/]+)/trackback/?$' => 'index.php?glossary=$matches[1]&tb=1',
'glossary/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?glossary=$matches[1]&paged=$matches[2]',
'glossary/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?glossary=$matches[1]&cpage=$matches[2]',
'glossary/([^/]+)(?:/([0-9]+))?/?$' => 'index.php?glossary=$matches[1]&page=$matches[2]',
'glossary/[^/]+/([^/]+)/?$' => 'index.php?attachment=$matches[1]',
'glossary/[^/]+/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',
'glossary/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glossary/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
'glossary/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',
'glossary/[^/]+/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',

Questions:
How can I fix this issue?

February 14, 2025 at 5:10 pm #16707600

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. Here is the ticket.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.