[wp-trac] [WordPress Trac] #39827: notice in wp-includes/canonical.php:392
WordPress Trac
noreply at wordpress.org
Thu May 15 13:07:46 UTC 2025
#39827: notice in wp-includes/canonical.php:392
-----------------------------------+-----------------------------
Reporter: jakubbis | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Canonical | Version: 4.7.2
Severity: normal | Resolution:
Keywords: needs-test-info close | Focuses:
-----------------------------------+-----------------------------
Changes (by SirLouen):
* keywords: has-patch needs-testing needs-unit-tests needs-test-info =>
needs-test-info close
Comment:
== Reproduction Report
=== Description
This report validates whether the issue can be reproduced.
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty 2.9
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.0
* WPML Multilingual CMS 4.7.4
=== Reproduction Steps
1. Install WPML Multilingual Plugin (Luckily, I happen to have a copy)
2. Start Setup, Set English as Default Language, Spanish as Translation
Language.
3. Leave the rest of the options by default
4. Settings > Permalinks > Custom Structure > `/%postname%`
5. Switch to Secondary Language (Spanish)
6. Pages > Add Page > Fill title/content with random text
7. Settings > Reading > A static page > Homepage > The created page
8. ❌ This is impossible: https://i.imgur.com/Q4aiTkX.png
=== Actual Results
1. ❌ Error condition is impossible to reproduce given the WPML
restrictions.
=== Additional Notes
- Doing reports with paid plugins it's not the best idea. Not everyone has
access to them. Providing a copy of the plugin at minimum or contact
directly with the support of the plugin, inform about this issue, and ask
them to come with the issue and at least, the section of code that is
causing all the trouble.
- Probably this trouble was noticed by the WPML team and solved it with
this mechanism
- @jstepak we don't have any hints currently on what is provoking this
issue. It could perfectly be an issue between plugins. If you could
inspect the variable `$path` and the full callback when that error
happens, we could try to analyze if this is actually a problem of
WordPress core or a problem caused by a wrong mix of plugins.
- It seems that the patch that @jipmoors provided is providing some sanity
checks that could make sense, equivalent to:
{{{
$redirect['path'] = empty($redirect['path']) ? '' : preg_replace('|/' .
preg_quote($wp_rewrite->index, '|') . '/*?$|', '/', $redirect['path']);
}}}
But since we don't really have a reproducible case, I think that this
could be:
- A `close` candidate for `worksforme`
- Or someone could make up a random plugin that forcefully triggers this
error just for the sake of testing it.
Either of the two options will work to close this ticket
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39827#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list