How to Remove Breadcrumb NavXT 5.0 Migration Compatibility Layer

From version 5.0 through 5.1.1, Breadcrumb NavXT included an extra plugin named “Breadcrumb NavXT 5.0 Migration Compatibility Layer”. The purpose of this plugin was to help overcome a bug in WordPress that causes plugin updates to break if the file containing the plugin header changes. Beginning in 5.2.0, Breadcrumb NavXT no longer includes the Breadcrumb NavXT 5.0 Migration Compatibility Layer.

If you still have the Breadcrumb NavXT 5.0 Migration Compatibility layer activated when upgrading to Breadcrumb NavXT 5.2.0 you may see the following PHP warning:

Warning: fopen(…/wp-content/plugins/breadcrumb-navxt/breadcrumb_navxt_admin.php): failed to open stream: No such file or directory in …/httpdocs/wp-includes/functions.php on line 4183
Warning: fread() expects parameter 1 to be resource, boolean given in …/httpdocs/wp-includes/functions.php on line 4186 Warning: fclose() expects parameter 1 to be resource, boolean in …/httpdocs/wp-includes/functions.php on line 4189

As long as Breadcrumb NavXT is activated, the warning message above can be ignored. It is only warning that the Breadcrumb NavXT 5.0 Migration Compatibility Layer was activated but is no longer available. If Breadcrumb NavXT is activated, then the Breadcrumb NavXT 5.0 Migration Compatibility Layer was not doing anything useful.

Migration Compatibility Layer Removal

Updating to Breadcrumb NavXT 5.2 should automatically remove the Breadcrumb NavXT 5.0 Migration Compatibility Layer. However, if you are on an earlier version, you may remove the Breadcrumb NavXT 5.0 Migration Compatibility Layer by performing the following, using a FTP client (or SSH/SCP client) navigate to your WordPress install’s plugins directory. Find the breadcrumb-navxt directory. Within the breadcrumb-navxt directory, there should be a file named breadcrumb_navxt_admin.php, delete this file.

-John Havlik

[end of transmission, stay tuned]

Trimming Breadcrumb Title Lengths With CSS

Update 2015/1/24: Added CSS for Schema.org BreadcrumbList format that Breadcrumb NavXT 5.3.0+ uses.

While Breadcrumb NavXT has a setting for specifying the maximum length of a breadcrumb title, this feature has shortcomings. Namely, it does not handle HTML elements gracefully. This has been looked into in the past and is not an easy thing to fix. Additionally, from a semantical point of view, the breadcrumb trail markup should never be truncated. Thus, it is recommended that you do not use the “Max Title Length” setting. In fact, this setting will be deprecated in Breadcrumb NavXT 5.2, and removed in 5.3.

CSS offers a better solution, which will not leave you with garbled and/or truncated HTML tags, should they exist in your tile. This guide will show a way of keeping your breadcrumbs to a reasonable length without using the “Max Title Length” setting.

Continue reading

Netgear AirCard 340u (aka AT&T Beam) on Linux

Lately, I’ve found attempting to do web development on a local environment without Internet access while travelling just doesn’t cut it anymore. This is especially true for long roadtrips. Rather than dealing with tethering or a mobile hotspot, I decided to spring for a Netgear AirCard 340u. For GSM networks in the US, it happens to be the best USB wireless broadband modem currently available. It supports everything from GPRS through LTE on what appears to be most of the bands AT&T and T-Mobile currently use (a true rarity, though I can not confirm support of LTE on band 2 (1900MHz PCS), I do get T-Mobile LTE in the Twin Cities).

Continue reading

How to Implement RDFa Breadcrumbs with Breadcrumb NavXT

Update 2015-10-04: Beginning with Breadcrumb NavXT 5.3.0, RDFa Breadcrumbs are deprecated in favor of Schema.org BreadcrumbsList, which Google now prefers. Please see the new article on implementing BreadcrumbsList with Breadcrumb NavXT.

While the Google microformats for Breadcrumbs are verbose, ugly, and deprecated, to date, Google still doesn’t support Schema.org breadcrumbs. Thus, we’re going to have to live with the ugly RDFa format for the time being. While there is no ‘one click’ configuration for RDFa breadcrumbs within Breadcrumb NavXT, support for them is not too difficult to configure.

Calling Code Modifications

To begin, the wrapping div for the calling code needs to have xmlns:v="http://rdf.data-vocabulary.org/#" added to it. Below is an example calling code block for users of the regular bcn_display(); function.




<div class="breadcrumbs" xmlns:v="http://rdf.data-vocabulary.org/#">
    <?php if(function_exists('bcn_display')) { bcn_display(); }?>
</div>




Settings Modifications

In general, you need a

<span typeof="v:Breadcrumb">

wrapping around every breadcrumb, and an inner element containing property="v.title" and rel="v:url" if the breadcrumb contains a link. For the most part this will result in two replacements need to be made to all of the breadcrumb templates. For the linked breadcrumb templates, replace:

<a title="Go to %title%." href="%link%">%htitle%</a>

with:

<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to %title%." href="%link%" class="%type%">%htitle%</a></span>

Note the extra span containing the typeof declaration. This is necessary for Google to pick up on the breadcrumb objects (even though the tag is redundant as the property should work on the anchor).

For the unlinked breadcrumb templates, replace:

%htitle%

with:

<span typeof="v:Breadcrumb"><span property="v:title">%htitle%</span></span>

To jumpstart this replacement process, you can import the following Breadcrumb NavXT settings XML file. Breadcrumb NavXT RDFa Breadcrumbs settings file (Right click and select “Save As”).

One Last Thing

Depending on the version of Breadcrumb NavXT, the typeof attribute may not be accepted in the settings (it will get automatically stripped out). To fix this follow the process outlined in How to Add li and Other Tags to Breadcrumb Templates to add the typeof attribute to the span HTML tag. Otherwise, wait for Breadcrumb NavXT 5.1 (or 5.0.2) to be released.

-John Havlik

[end of transmission, stay tuned]

Help! I Can’t Save My Settings After Upgrading Breadcrumb NavXT

After upgrading from a version of Breadcrumb NavXT older than 4.2, you may see the following message when attempting to save your Breadcrumb NavXT settings:

Value must be greater than or equal to 1.

This message is caused by the value of “Max Title Length” being less than 1. Some modern web browsers, such as Chrome will display this warning (and in some cases it may appear to come from the admin bar as in the leading screenshot). While, others, such as Firefox, will not (and will not prevent you from saving your settings).

To fix this issue, change the value of “Max Title Length” to be greater than 0. If you do not want your breadcrumb titles to be restricted in length, make sure “Limit the length of the breadcrumb title.” remains unchecked. You should now be able to save your settings.

Some Background

Back in Breadcrumb NavXT 4.2, the breadcrumb “Max Title Length” setting was split into an enable switch for restricting the length of breadcrumb title and a second option for specifying the maximum length. Previously, setting the max breadcrumb title length to 0 was interpreted as disabling the title length trim feature. This was not entire intuitive hence the switch.

When this switch was made, the new “Max Title Length” was changed to the HTML5 number form input element, with a minimum value set to 1. Additionally, Breadcrumb NavXT started shipping with 20 being the default “Max Title Length” value, with the title trim feature turned off by default. Thus, new users of the plugin will never see this issue. Additionally, the next release of Breadcrumb NavXT will have a modification which will not allow Max Title Length to be 0 when a user upgrades versions (will automatically correct it to the new default of 20).

-John Havlik

[end of transmission, stay tuned]