Custom permalinks slug conflicts
-
Hi,
I recently found an issue that apparently causes some sort of name conflict between permalinks with similar slugs. For instance, if I have two distinct custom permalinks ‘new-york’ and ‘new-york-city’ the first one will work as expected but the second one will redirect me to an unrelated post. As far as I could find, the source of the problem seems to be happening during the permalink matching on the custom_permalink_table, on the ‘custom_permalinks_request($query)’ function:
$permalink == substr($request_noslash, 0, strlen($permalink)Replacing it with an exact string match seems to solve my problem.
I was wondering if this was an intended behaviour and if so, what’s the reason why it is not using an exact string match to find the correct permalink.
Thanks,
The topic ‘Custom permalinks slug conflicts’ is closed to new replies.