Breadcrumb NavXT and bbPress Compatibility Revisited

Since the last time the topic of Breadcrumb NavXT and bbPress Compatibility was investigated, almost 6 years ago, a little has changed in how both plugins operate. In fact, due to a change in how bbPress operates internally, Breadcrumb NavXT now supports post type jumping.

What Works

Out-of-the-box, forums and topics should work well. However, the settings recommendations have changed since the last visit of this topic. The current settings recommendations are:

  • Forum Root Page and Topic Root Page – Set these to be equal and to whatever page you have set as ‘Forum Root’ under Settings > Forums.
  • Forum Archive Display – Unchecked
  • Forum Hierarchy Display – Checked
  • Forum Hierarchy – Post Parent
  • Topic Archive Display – Checked
  • Topic Hierarchy Display – Checked
  • Topic Hierarchy – Post Parent

What Doesn’t Work

Out-of-the-box, topic tag archives still won’t work as expected. Additionally, the search page, search results page, and user pages do not work. These all require custom, bbPress specific code.

The Solution

Recently, Breadcrumb NavXT bbPress Extensions was updated to include support for the search page, search results pages, and user pages (at least the landing page for user pages, the various sub-pages are not supported yet). This is in addition to fixing the how topic tag archives show up in the breadcrumb trail.

-John Havlik

Breadcrumb NavXT 6.6.0

Holy post type jumping Batman! This second feature release of 2020 changes how post type archives are handled when following a post parent hierarchy. Additionally, a bug introduced in 6.5.0 was fixed where an error that would be thrown in the WordPress dashboard if the administrator role does not exist.

Previously, if the post type changed while following the post parent hierarchy, the post type of the current item was used for the post type archive. In 6.6.0, this behavior changed to use the post type of the highest level post in the post parent hierarchy. The old behavior just didn’t make sense and causes problems with plugins that use multiple custom post types in the same hierarchy. A side benefit of the change is improved bbPress and BuddyPress support.

-John Havlik

Mapping Terms to Posts in Breadcrumb Trails

In certain site configurations, it makes sense to replace the WordPress built-in term archives with a post (an instance of some post type). Typically, a page (instance of the page post type) is used in place of the term archive. Since version 1.5, Breadcrumb NavXT Paths supports mapping terms to pages (with regards to where the breadcrumb links to). To facilitate this, Breadcrumb NavXT Paths provides a metabox in the term editor for establish this mapping.

Sometimes, the page post type does not make sense for this mapping. In that case, the bcn_paths_map_term_post_args can be used to change the post type that the term editor metabox added by Breadcrumb NavXT displays. Note that this filter was introduced in Breadcrumb NavXT Paths 1.6.0.

The Code

Placing the following code into a site specific plugin, will allow Breadcrumb NavXT Paths to map terms to the post post type:

add_filter('bcn_paths_map_term_post_args', 'my_bcn_paths_map_term_post_args', 10, 3);
function my_bcn_paths_map_term_post_args($args, $term, $taxonomy)
{
     $args['post_type'] = 'post';
     return $args;
}

Naturally, this can be modified to specify post types other than post. Should multiple post types be desired, just replace the string 'post' with an array of the post type names. Since this filter affects the arguments sent to get_post, other arguments may be set as well.

-John Havlik

Breadcrumb NavXT Paths 1.6.0

Announcing the immediate availability of Breadcrumb NavXT Paths 1.6.0. This version adds a new filter, a new function, and the ability to enable/disable the referrer influenced term selection feature from the settings page.

Users with valid and activated license keys should receive an update notification within the WordPress dashboard and be able to use the update mechanism to update (just like with any plugin in the WordPress.org repository).

-John Havlik

Notes on LUKS + EFISTUB

Running off of an encrypted root filesystem has been one of those things that never seemed to float to the top of the todo list. However, back in December (2018, this article lived in the drafts bin for quite some time), it finally made it to the top of the todo list. At the time, one was preparing the Dell XPS 15 9550 to replace the Ideapad s405 for travel. Encrypting everything seemed prudent for a travel laptop.

As of the writing of this article, LUKS is the standard way of encrypting a filesystem in Linux. Generally, a boot loader is used to kick off an initramfs which loads the basics (need LVM, dm-crypt, and LUKS) and prompts for the passphrase for decrypting the root filesystem. If you’re fine with running a boot loader, most guides will get you going with LUKS quite quickly.

However, running a full boot loader on UEFI systems feels archaic. There is just something about using the kernel’s built-in EFISTUB that feels more elegant. And, this is where things divert from the bog-standard path. Typically, when using the EFISTUB, one does not bother with an initramfs (compile the kernel for you known hardware set and you’re good to go). However, an initramfs is integral to having an encrypted root partition.

initramfs Woes

The first problem started with trying to get a working initramfs. Since one had not used an initramfs with EFISTUB previously, there were a few hurdles to overcome. Initially, one tried to use an external initramfs. However, the 9550 does not allow/pass UEFI parameters nicely, and using the built-in kernel command line to specify an external initrfamfs in the EFI boot partition did not work. So, the initramfs needs to be built into the kernel for the XPS15 9550. This lead to a second problem.

Initially, the initramfs that genkernel builds was tried. Unfortunately, it appears this is (as of late 2018) broken/not-suitable for situations where the initramfs needs to be bundled into the kernel. Luckily, betterinitramfs can be bundled into the kernel.

Naturally, there is one gotcha to keep in mind regarding betterinitramfs. As distributed, betterinitramfs does not populate /dev/disk/by-uuid et al. as it does not provide udev (or eudev). The end result is real root needs to be specified using /dev/BLOCKDEVICENAME rather than using PARTUUID.

Conclusion

While the setup of using EFISTUB with an LUKS encrypted root partition is a little esoteric, it is possible to get working. There are a bunch of UEFI related pitfalls waiting to snare you—different platforms will have a different mix of issues. Then again, all UEFI systems should be able to use the initramfs embedded in the kernel when using the EFISTUB boot loader. Regardless, this path is not advised for those learning about/using LUKS for the first time.

-John Havlik