custom-post-type-ui icon indicating copy to clipboard operation
custom-post-type-ui copied to clipboard

How to handle import of CPTUI settings that have clashing post type or taxonomy slugs.

Open tw2113 opened this issue 9 years ago • 4 comments

Reject outright with a message? Import and leave a note afterwards?

tw2113 avatar Dec 24 '16 00:12 tw2113

I'm voting reject all outright with an appropriate admin message. I'd rather not deal with imports that partially worked and was a partial import.

"This import attempt failed because the following slugs clashed with already existing slugs: $1, $2"

tw2113 avatar Oct 24 '18 04:10 tw2113

We run our import on init priority 8 which is likely much sooner than 99% of the post types are registered on, so our post_type_exists() and taxonomy_exists() checks will return false.

Storing in 583-import-content-type-clash for the moment while I consider possible routes. At the moment I can't recall the reasoning for the priority 8. However, I don't want this to hold up 1.7.0

tw2113 avatar Aug 16 '19 17:08 tw2113

This has a branch already https://github.com/WebDevStudios/custom-post-type-ui/tree/583-import-content-type-clash

tw2113 avatar Jul 25 '22 18:07 tw2113

Relevant commit https://github.com/WebDevStudios/custom-post-type-ui/commit/ec4b2af4cf89e7bf06790eed830f80aac36fd631

tw2113 avatar Jul 25 '22 18:07 tw2113