• Resolved Dirkje Evers

    (@straccia)


    Hi there,

    I need to import a CPT, coming out of the current WP installation of a client, into a new WP install. I’ve exported the cpt with the export function of her current site.

    However, this old cpt has a slug with dashes, so I can’t make the CPT ready for the import because CPT UI forces me to use underscores for the slug. Rewriting the slug from the CPT UI name ‘my_work’ to ‘my-work’ does create the CPT in my dashboard, but the import fails and I get the error ‘Failed to import: invalid post type my-work’.

    So this workaround: https://docs.pluginize.com/article/135-dashes-in-post-type-taxonomy-slugs-for-url-seo didn’t work in my case. I’ve tested it more than once.

    Then I installed the plugin WP Rollback and I went back to CPT UI version 1.2.4, which is the version who allows me to use dashes. The import went flawlessly with that version!

    My question: is it possible that in the recent version of the plugin you give us the choice between using dashes or underscores from the beginning? This would solve a lot of problems when an old cpt needs to be imported.

    I hope to hear from you soon,
    Thanks and kind regards,
    Straccia

    • This topic was modified 7 years, 10 months ago by Dirkje Evers.
    • This topic was modified 7 years, 10 months ago by Dirkje Evers.
    • This topic was modified 7 years, 10 months ago by Dirkje Evers.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Dirkje Evers

    (@straccia)

    I’ve solved it in a different way, through making the CPT in the current version, then copying the code with the underscore in it from the export tab, then deleting the CPT and then pasting the code in the import tab and replacing the underscores in it with dashes…

    • This reply was modified 7 years, 10 months ago by Dirkje Evers.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    As far as I can recall and think of, this screen shouldn’t be rejecting based on slug dashes vs underscores: https://cloudup.com/c-mDY4gJJEI Should be taking what’s provided, but I’m willing to be wrong in case I’ve forgotten a recent development detail.

    The link you reference would be for frontend viewing and urls, and not for import issues, as you note.

    Nonetheless, sounds like you got things taken care of since then. Let us know if you need any other help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘rewrite slug not accepted – import fail’ is closed to new replies.