Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #47552, comment 3


Ignore:
Timestamp:
09/05/2025 04:20:28 PM (6 months ago)
Author:
SirLouen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47552, comment 3

    v1 v2  
    2929Replying to [comment:2 domslee]:
    3030> Should we consider a UNIQUE constraint on (post_name, post_type, post_status)?
    31 There could be matching names as long as they are hierarchically in different levels. So we could have two `post_type` = `page`, two `post_status` = `publish` and two `post_name` identical. At best this could be done only if `post_type` = `post` (or for non hierarchical post types). But definitely not as a SQL `UNIQUE` key. I think that this specific casuistry is what brings all this havoc with many reports having this trouble.
     31There could be matching names as long as they are hierarchically in different levels. So we could have two `post_type` = `page`, two `post_status` = `publish` and two `post_name` identical. At best this could be done only if `post_type` = `post` (or for non hierarchical post types). But definitely not as a SQL `UNIQUE` key. I think that this specific casuistry is what brings all this havoc with many reports having this trouble under this scenario.
    3232
    3333To test this I've added two files, one to add for a php 8.2 image in `wpdev-docker-images` and little tweak for the current `docker-compose.yml` to run the semaphores. Main problem here is that the default images are not well prepared to run scripts with extra libraries. I've added these two files, in case I have to refer back to this ticket, and I'm able to test this without having to spend the time I have spent to learn how to set up this in the `wordpress-develop` environment`.