Support » Plugin: Custom Post Type UI » Apply CPT changes immediately on submit

  • Resolved Epsiloncool

    (@epsiloncool)


    I found an epic bug after 1 week of Googling, Stackoverflowing and finally the plugin code exploring by myself.

    There is no flush_rewrite_rules() call in the function of form submitting when someone creating/modify existing custom post type. There is only flush_rewrite_rules() at edit form “show” stage.

    This will make next BAD behaviour:
    1. I am creating new post type, set up its properties, set up some not default values (for example, Has Archive = true).
    2. I am pressing Submit and post type added and page of list of post types shown.
    3. But these specific properties DOES NOT still activated. To activate them I have to just open “edit post type” form again (without submitting). Because I need for flush_rewrite_rules() to be called.

    So here is my proposition:
    PLEASE call flush_rewrite_rules() in the code, which adds or applies custom post type changes, NOT “show form” routine.

    Thanks!

    https://wordpress.org/plugins/custom-post-type-ui/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi Epsiloncool,

    thank you for the feedback and reminder about this topic. It was definitely in my radar as an issue of being in an inefficient spot, and it will be fixed in the next version, 0.9, which is still a little ways off, sadly. Tons of details to figure out :).

    Hope the rest of the plugin is working as you need it to though, but let me know if you run into any other issues.

    Hi Michael

    There is a little hard-to-understand thing which I’ve noticed when I’ve used plugin for first times. Why you showing both add-custom-post-type and add-taxonomy forms at the same page? For a beginner is not obvious that it is necessary to use only one form, depending on whether he would like to add.

    I would suggest to separate these forms on different pages, and to show “Add New Post Type” and “Add New Taxonomy” items in the left menu (instead of common Add New item). You could actually use free room at the right to put Advanced Label Options or/and Advanced Options in the always unfolded state, or use tabs to switch between them.

    BTW thanks for the plugin, it is great and it magically converts WordPress from just “blog engine” to powerful universal CMS.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    All things I am aware of 🙂

    Some quick history, i’ve only been a part of the development of CPTUI since, I believe, spring of 2013. About half a year after I was hired by WebDevStudios. The plugin, in its current state, has been like that for a long time, definitely longer than I’ve been a part of the company.

    While I have to admit it’s been a year since I first started it, I do have big things in mind for CPTUI 0.9, including a UI overhaul. Other things include underlying code optimization and just better experience overall. Separating out the post types and taxonomies is definitely a part of it. The only issue is that I haven’t finished a lot of details, as mentioned earlier. Given the popularity of the plugin, I need to make sure I’m not breaking anyone’s existing installs and that everything transitions fine.

    If you are really curious to see how things are shaping up visually, you can check out the “dev” branch at https://github.com/WebDevStudios/custom-post-type-ui/ but I do not believe it’s in a state of properly saving values at the moment, so the registration won’t work right now.

    Hoping for awesome things once finished 😀

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Apply CPT changes immediately on submit’ is closed to new replies.