Closed (fixed)
Project:
Belgrade
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2025 at 06:21 UTC
Updated:
9 Feb 2026 at 15:09 UTC
Jump to comment: Most recent
When the Belgrade theme is installed together with the Bootstrap theme, it throws an error:
PHP Fatal error: Cannot redeclare _hex2rgb() (previously declared in /var/www/html/web/themes/contrib/belgrade/includes/html.inc:104) in /var/www/html/web/themes/contrib/bootstrap/bootstrap.theme on line 862
This happens, because both Belgrade and Bootstrap use the same function name.
The proposed fix is to add a belgrade_ namespace to this function to prevent such conflicts.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
murzCreated a MR with fix, please review.
Comment #4
majmunbog commented@murz, great work! Since we're on this subject, we could update Belgrade to use a single helper function:
_belgrade_hex2rgba($color, $opacity). This function will return RGB when no opacity is provided and RGBA when it is.Comment #6
majmunbog commented