You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having the Polylang integration enabled and slugs for post types are translated, the fetchRedirect pathname is not matching the translated slug in handleError, therefore a redirect added for a different locale in WP is not detected.
Steps to Reproduce
Create custom post type., slug example 'programmes'
Add translation to the post type slug in polylang, for example PT 'programas'
Add rewrite in middleware so NextJS knows programas translated path is programmes/
Add a redirect from from WP with Safe Redirect Manager from '/pt/programas/foo' that returns 404 to an existing page
Within handleError function pathname is the ctx resolvedUrl which is programmes/foo
See redirect not working.
Inside handleError to test, hardcode pathname in fetchRedirect to '/pt/programas/foo' and see redirect working.
The text was updated successfully, but these errors were encountered:
lucymtc
changed the title
fetchRedirect on handleError with polylang translated slugs not working
fetchRedirect not working on handleError with Polylang translated slugs
Feb 6, 2024
Describe the bug
When having the Polylang integration enabled and slugs for post types are translated, the fetchRedirect pathname is not matching the translated slug in handleError, therefore a redirect added for a different locale in WP is not detected.
Steps to Reproduce
programas
translated path isprogrammes/
Screenshots, screen recording, code snippet
No response
Environment information
WP 6.4.3
Safe Redirect Manager 2.1.0
Polylang Pro 3.3.2
@headstartwp/core 1.1.2
@headstartwp/next 1.1.5
WordPress information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: