backdrop-contrib / bootstrap5_lite

GNU General Public License v2.0
2 stars 6 forks source link

backdrop_set_breadcrumb() not working properly in Bootstrap 5 Lite #28

Open rayjamesdev opened 1 year ago

rayjamesdev commented 1 year ago

Issue Description

In Basis theme, I can use custom variables in backdrop_set_breadcrumb() function to set the breadcrumb. In Bootstrap 5 Lite, that doesn't seem to work.

Expected Behavior

Using the following code should result in the following breadcrumb:

$cname = 'Company Name';

// Build Breadcrumbs
$breadcrumb = array();
$breadcrumb[] = l($cname, 'dev/company/overview'); // DOES NOT WORK
$breadcrumb[] = 'current page';
backdrop_set_breadcrumb($breadcrumb);

Result should be: image

Actual Behavior

Missing the breadcrumb: image

Steps to Reproduce the Problem

  1. Install my devtest custom module located here: https://github.com/rayjamesdev/devtest
  2. Install and enable/set to default the Bootstrap 5 Lite theme
  3. navigate to: dev/company/overview
  4. confirm error
  5. switch back to Basis theme to confirm that it works properly in that theme

Specifications

rayjamesdev commented 1 year ago

Found the issue: Had to set the Show "Home" breadcrumb link on the base theme. Wouldn't save on my sub-theme though. Not sure if this is a bug or not. If not, we can go ahead and mark as resolved. Thx

image

bugfolder commented 1 year ago

Had to set the Show "Home" breadcrumb link on the base theme. Wouldn't save on my sub-theme though. Not sure if this is a bug or not.

I have a sub-theme of Bootstrap Lite with its own settings added to the BSL settings, and the 'Show "Home" breadcrumb link' saves properly when I check and uncheck it and save.

Does your sub-theme add its own settings using MYTHEME_form_system_theme_settings_alter() to add its values?

rayjamesdev commented 1 year ago

Hi, I do not have a theme-settings.php file in my sub-theme which is where MYTHEME_form_system_theme_settings_alter() would be called correct?

Lemme run some quick tests to make sure I can reproduce that problem with a freshly created sub-theme. brb.

bugfolder commented 1 year ago

Hi, I do not have a theme-settings.php file in my sub-theme which is where MYTHEME_form_system_theme_settings_alter() would be called correct?

Correct.

rayjamesdev commented 1 year ago

Ok, I screen recorded so you can see what it's doing. All on a fresh install of Backdrop. Video of error: https://youtu.be/dNHrlQakXdU Thoughts?

rayjamesdev commented 1 year ago

Ok, I just made another video of me using a completely fresh build from the Backdrop CMS demo sandbox. Still showing same problem: https://youtu.be/ivbBPPC1hCE

bugfolder commented 1 year ago

OK, color me puzzled. I just used Devel Themer to create a subtheme of BSL5 on my local test system, and the settings worked just fine.

I'll be away for a few weeks so can't investigate further on this one (possibly @docwilmot will have some ideas), but two things to suggest in trying to track down the issue: (1) does subtheming Basis (or other themes) give the same issue; (2) does enabling/disabling the base theme affect the subtheme's behavior? (Grasping at straws a bit here...but this doesn't seem like something peculiar to BSL5.)