Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rayjamesdev opened this issue Apr 27, 2023 · 7 comments
Open

Comments

@rayjamesdev
Copy link

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

  • Backdrop CMS Version: 1.24.2
  • Boostrap 5 Lite Version: 1.x-1.0.0
  • Platform: Windows/XAMPP PHP 7.2.24
@rayjamesdev
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants