• Resolved superaktieboy

    (@superaktieboy)


    I’m getting the following HTML output:

    <li class="breadcrumb bc-site-home"><a href="https://hosh.info" title="Go to Home.">Home</a></li><li class="breadcrumb bc-bug-library-bugs-root post-bug-library-bugs"><a title="Go to Bug Tracker." href="https://hosh.info/bugs/">Bug Tracker</a></li><a title="Go to Menu Management Enhancer." href=""><li class="breadcrumb bc-bug-library-products"><a title="Go to the Menu Management Enhancer Products archives. test" href="https://hosh.info/bugs/products/mmenhancer/">Menu Management Enhancer</a></li></a><li class="breadcrumb bc-post-bug-library-bugs current-item bc-no-link">Test some issue</li>

    Which when shown properly translates to:

    <li class="breadcrumb bc-site-home"><a href="https://hosh.info" title="Go to Home.">Home</a></li>
    <li class="breadcrumb bc-bug-library-bugs-root post-bug-library-bugs"><a title="Go to Bug Tracker." href="https://hosh.info/bugs/">Bug Tracker</a></li>
    <a title="Go to Menu Management Enhancer." href="">
    <li class="breadcrumb bc-bug-library-products"><a title="Go to the Menu Management Enhancer Products archives. test" href="https://hosh.info/bugs/products/mmenhancer/">Menu Management Enhancer</a></li>
    </a>
    <li class="breadcrumb bc-post-bug-library-bugs current-item bc-no-link">Test some issue</li>

    As you can see it somehow adds an extra anchor for no reason.
    I’m using the latest version..

    It’s probably a bug? If you need more info let me know.
    For the configuration everything is same except:
    I’ve added <li class="breadcrumb bc-%type%"> and </li> to all the templates
    And Current Item > Paged Breadcrumb has been selected.

    And I’m using the latest stable version.

    Hosh

    PS: It would be good to add some actions/filters to all elements and a prepend and append text/html feature.

    https://www.ads-software.com/extend/plugins/breadcrumb-navxt/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author John Havlik

    (@mtekk)

    Don’t manually add the li elements to the templates. Instead use the bcn_display_list() function in place of bcn_display().

    As for what is actually happening, I’m going to need to ponder this a bit.

    Prefixes, suffixes, and anchor templates for all breadcrumbs were dropped in favor of just breadcrumb templates for all breadcrumbs to simplify things (breadcrumb templates happen to be more powerful as well).

    Thread Starter superaktieboy

    (@superaktieboy)

    Aah I see! Thanks for that, will use it.

    Thread Starter superaktieboy

    (@superaktieboy)

    My bad, still doing the same thing, except it would show properly in the user’s eyes, would probably hurt in SEO. See below.

    <li class="home"><a href="https://hosh.info" title="Go to Home.">Home</a></li>
    <li><a title="Go to Bug Tracker." href="https://hosh.info/bugs/">Bug Tracker</a></li>
    <li><a title="Go to Menu Management Enhancer." href=""><a title="Go to the Menu Management Enhancer Products archives." href="https://hosh.info/bugs/products/mmenhancer/">Menu Management Enhancer</a></a></li>
    <li class="current_item">Test some issue</li>

    Again, it’s in the same place for Menu Management Enhancer (custom taxonomy tag like).

    Plugin Author John Havlik

    (@mtekk)

    Hmm, that doesn’t look correct. Somehow you have a nested anchor, not good and not acceptable. Just for verification, did you get this output by doing a “View Page Source” or using a browser tool (e.g. firebug, or Chrome’s built in dev tools)?

    Thread Starter superaktieboy

    (@superaktieboy)

    I’m pretty sure it was “View Page Source”, but just to double check, here’s the various different ways:

    View page source (chrome)

    <!-- Breadcrumb NavXT 4.1.0 -->
    <li class="home"><a href="https://hosh.info" title="Go to Home.">Home</a></li>
    <li><a title="Go to Bug Tracker." href="https://hosh.info/bugs/">Bug Tracker</a></li>
    <li><a title="Go to Menu Management Enhancer." href=""><a title="Go to the Menu Management Enhancer Products archives." href="https://hosh.info/bugs/products/mmenhancer/">Menu Management Enhancer</a></a></li>
    <li class="current_item">Test some issue</li>

    Chrome’s dev tools:

    <ul class="container">
    ????????		<!-- Breadcrumb NavXT 4.1.0 -->
    <li class="home"><a href="https://hosh.info" title="Go to Home.">Home</a></li>
    <li><a title="Go to Bug Tracker." href="https://hosh.info/bugs/">Bug Tracker</a></li>
    <li><a title="Go to Menu Management Enhancer." href=""></a><a title="Go to the Menu Management Enhancer Products archives." href="https://hosh.info/bugs/products/mmenhancer/">Menu Management Enhancer</a></li>
    <li class="current_item">Test some issue</li>
            </ul>

    Just double checked the configuration, none of the templates are nested.

    Here’s the definition of the taxonomy (maybe helps since it’s only happening with this one?) (modified version of bug library):

    register_taxonomy(
    		'bug-library-products',
    		'bug-library-bugs',
    		array(
    			'hierarchical' => false,
    			'label' => 'Products',
    			'query_var' => true,
    			'rewrite' => array( 'slug' => 'bugs/products', 'with_front' => false ),
    			'add_new_item' => 'Add New Product',
    			'new_item_name' => "New Product Name",
    			'show_ui' => false,
    			'show_tagcloud' => false
    		)
    	);

    Note: Only the with_front has been changed, and the slug is set to bugs/products.

    Now I go over that again, I have a feeling the slug is the one causing the problem.

    EDIT: nevermind, tried it with the standard slug (just products), and still nothing.

    Plugin Author John Havlik

    (@mtekk)

    Can you do a settings export in Breadcrumb NavXT and then either send it to me in an email, or post it to something like pastbin (will be too long to post here, the mods will just delete it).

    To do a settings export: on the Breadcrumb NavXT settings page, click on the help tab. In the drop down click the “Import/Export/Reset” link on the left side, then click the “export” button.

    Plugin Author John Havlik

    (@mtekk)

    Also, what is “Menu Management Enhancer” that the incorrect anchor is referring to?

    Thread Starter superaktieboy

    (@superaktieboy)

    Right so the export is here: https://pastebin.com/gZ6yCpFa

    And the Menu Management Enhancer is a custom taxonomy term, namely the taxonomy “bug-library-products” and is part of the bugs library plugin (https://www.ads-software.com/extend/plugins/bug-library/)

    Plugin Author John Havlik

    (@mtekk)

    Thanks, that should be enough information for me to figure out what is causing it. I think I know the area in my plugin that is causing it, but I’ll need to reproduce the issue locally before fixing it.

    Plugin Author John Havlik

    (@mtekk)

    Ok, I was able to reproduce it locally, it is a bug in my non-hierarchical taxonomy term handling code. A fix will be included in the next release (I’ll let you know when a fix is on SVN Trunk/Git Master)

    Thread Starter superaktieboy

    (@superaktieboy)

    Thanks! Let me know ??

    Plugin Author John Havlik

    (@mtekk)

    Found the cause, fixed is in git master, available here: https://github.com/mtekk/Breadcrumb-NavXT/zipball/master

    Let me know if it fixes the issue for you as well.

    Thread Starter superaktieboy

    (@superaktieboy)

    Thanks ?? I’ll try it out later and keep you posted.

    Thread Starter superaktieboy

    (@superaktieboy)

    Okay so, here’s some bugs for you ??

    • Max Title Length requires a setting to be set, even if Title Length isn’t checked.
    • The importing/migration of settings somehow reset the settings.
    • This was also in the older version, but some custom taxonomies and custom post types don’t have the public have a front end (I’m pretty sure there’s a setting that’s set when registering) and these still have an option, probably better to hide these since they’re irrelevant??

    Outside the above, all seems to be working. ??

    Plugin Author John Havlik

    (@mtekk)

    Thanks for the feedback, the max title length checkbox is a new thing, so my testbed probably has a vestigial value in it (needs more testing). The other gotcha is you’re using the master branch, I’m developing against ‘actor’ which has a revamped settings page. Things seem to work properly in ‘actor’ but I should look more into it.

    The settings migrator, e.g. the banner you see on entering the settings page? I’ll look into that as well, it didn’t seem to cause the issue for me, but there is a chance it isn’t behaving correctly in all cases.

    Hiding non-public CPTs and Taxonomies may be a smart thing to do. The only reason I haven’t yet is Breadcrumb NavXT can work in custom queries, which still exist for non-public CPTs and Taxonomies. However, I could probably hide them by default and have a filter someone can hook into to show them (more or less just flipping a switch).

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] Wrong HTML output’ is closed to new replies.