• Resolved kenzik

    (@kenzik)


    Version 3.0.0 exhibits the following issue after an upgrade from 2.1.4.

    If you modify (eg. change the name) a taxonomy term assigned to a CPT (in my case, a custom hierarchical taxonomy) using the WP back-end, the permalink for that category is reverted to an unexpected /index.php/taxonomy-slug/term-parent-slug/term-parent-slug/term-child-slug rather than the expected permalink as configured using your plugin, eg. /cpt-slug/term-parent-slug/term-child-slug/cpt-item.

    If I re-save the WP Better Permalink settings (they were preserved during the upgrade), the issue still exists.

    I easily duplicated this on a clean WP instance using Toolset Types to create a custom post type and taxonomy using the defaults.

    If I delete the plugin and upload 2.1.4, the issue does not present itself.

    • This topic was modified 6 years, 10 months ago by kenzik.
    • This topic was modified 6 years, 10 months ago by kenzik.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @kenzik,

    Please send me screenshots with configuration and PHP codes.

    Thread Starter kenzik

    (@kenzik)

    There is no code that I need to provide. It’s an obvious bug. To reproduce on a clean/new WP install:

    – Create a custom post type
    – Create a custom taxonomy and assign it to CPT
    – Add a new term (to be parent)
    – Add a new child term (of previously created parent)

    – Install v.3.0.0 of your plugin
    – Use plugin to configure new permalink for your CPT selecting the new taxonomy
    – Click on view on the child term. The archive URL is wrong.
    – Uninstall 3.0.0

    – Install 2.1.4
    – Use plugin to configure new permalink for your CPT selecting the new taxonomy
    – Edit one of the terms (eg. change it’s name)
    – Click on view. The URL is correct.

    I thought I was very clear in my initial report, so I hope the step-by-step helps you, or at least lets others who may have the same issue know that they are not alone.

    In any case, if you do not want to dig into this on your own, which in my experience is usually the case with low-use (but valuable) plugins, then I’ll just continue to use 2.1.4. I currently have it configured to not prompt me to upgrade, so I’m go to go.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @kenzik,

    Do you use Custom Post Type UI plugin? Can you send me screenshot with configuration Custom Post Types and Taxonomies?

    Thread Starter kenzik

    (@kenzik)

    Again, my description of the problem twice was very clear to me.

    I created a CPT and Taxonomy using Toolset types, using their default settings, on a new/stock WP install.

    I do not believe this has anything to do with Toolset Types.

    Here is a very easy to follow set of screenshots. Some screenshots are annotated to help you understand this very obvious bug.

    CPT Config 1: https://prntscr.com/jfvbv6
    CPT Config 2: https://prntscr.com/jfvc1o
    CPT Config 3: https://prntscr.com/jfvc5y
    (Spans multiple screenshots due to scrolling.)

    Tax Config 1: https://prntscr.com/jfvbif
    Tax Config 2: https://prntscr.com/jfvboi
    (Spans multiple screenshots due to scrolling.)

    Plugins (v.2.1.4): https://prntscr.com/jfvcd3

    Category URL without permalink (WP DEFAULT) config: https://prntscr.com/jfvd6w

    Permalink config: https://prntscr.com/jfvdyt

    Category URL with 2.1.4 with permalink config (EXPECTED): https://prntscr.com/jfveq3

    Upgraded plugin (v.3.0.0): https://prntscr.com/jfvf3x

    Upgraded plugin config (no changes made): https://prntscr.com/jfvf9k

    Category URL with 3.0.0 immediately after upgrade (EXPECTED): https://prntscr.com/jfvfkc

    Category URL after changing category name or description (REPORTED BUG): https://prntscr.com/jfvgbx

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @kenzik,

    Thanks you for instruction! This error applies only to your plugin. Edit taxonomy and uncheck this option: https://imgur.com/a/MElJgcz

    The problem is that the plugin adds hierarchy of URLs, and my plugin does the same.

    Thread Starter kenzik

    (@kenzik)

    @mateuszgbiorczyk – Thanks for this, I’ll give it a try.

    I want to be clear that I made no configuration changes after upgrading to 3.0, so the 3.0 version did have a breaking change.

    I would recommended either updating your readme.txt file to make the point about the potential issue with setting hierarchical URLs twice (such as with Toolset Types’ defaults) and/or having your plugin detect if a taxonomy is already hierarchical before your plugin does the same.

    Thanks for your asssistance and thanks for the plugin. It’s been helpful.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @kenzik,

    I am glad that I could help you. I’ve added your suggestion to readme.txt.

    Are you happy with using my plugin? Could you add a review? I will be grateful for 5 stars. This gives me motivation to continue working.

    Hi there!

    I have this bug too! I’m not using a plugin though, my custom post types are all created by the theme. I’ve tried removing the “heirachical”=>true from the array, but it either results in my taxonomy having no heirachy, or the problem persisting. Any help wold be appreciated.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @shelleyphant,

    Do you use Toolset Types plugin? If yes please uncheck this option: https://i.imgur.com/szyPjME.png

    This is only solution. You can use another plugin or register Post Types using your code. This is a strange solution in Toolset Types plugin and I can’t change it.

    Hey @mateuszgbiorczyk. As stated above, I’m not using any plugin, Toolset Types or otherwise. All my custom post types are generated by me. What setting do I need in my array to disable this bug? Setting “heirachical”=>false hasn’t worked. Yes, I saved all my settings and flushed the permalinks after testing this.

    Hi again @mateuszgbiorczyk,

    I’ve actually found the solution for those who are using their own code. For a taxonomy that needs to be heirachical, use

    $args = array(
            'hierarchical' => true,
            'rewrite' => array('hierarchical' => false)
    );
    register_taxonomy('custom_post_type', 'custom_taxonomy', $args);

    You have to have both heirachicals AND have them set differently. You should update your documentation to include this, because it’s a weird bug on your end. Normally, I would set both to true and move on. This is very unusual behaviour, and not really great from a developers standpoint.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Bug after Recent Update to 3.0.0 from 2.1.4’ is closed to new replies.