Problem/Motivation
Drupal 11.3 introduces the possibility to deprecate theme suggestions by adding the keyworded array "__DEPRECATED" to the suggestions. See https://www.drupal.org/node/3535678
Additionally some deprecations are introduced, e.g. "Views based theme suggestions for node and comment templates deprecated" in https://www.drupal.org/node/3541462
This new possibility creates the following warning when deprecations are present:
Warning: Array to string conversion in Drupal\bootstrap\Plugin\Alter\ThemeSuggestions->alter() (line 93 of themes/contrib/bootstrap/src/Plugin/Alter/ThemeSuggestions.php).
I added a first draft for a solution as a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3560258-5.patch | 954 bytes | styx1983 |
Issue fork bootstrap-3560258
Show commands
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:
- 3560258-drupal-11.3-warning
changes, plain diff MR !66
Comments
Comment #2
styx1983 commentedComment #3
styx1983 commentedComment #4
styx1983 commentedComment #5
styx1983 commentedComment #6
f1mishutka commentedConfirm: patch
3560258-5.patchworks fine with D11.3-rc1 and bootstrap v3.39 (checked under both PHP 8.4 and 8.5).Comment #9
priyansu18 commentedI have updated the ThemeSuggestions file. Please check the MR.
Comment #10
carlitus commentedThe patch from #5 works for me, but not the MR (drupal 11.3.1)
Comment #11
flyke commentedI noticed that the project where I had this error first has an old version of the bootstrap contrib module (8.x-3.39)
Both the MR and patch #5 apply without error to:
- bootstrap (8.x-3.39)
- drupal core (11.3.2)
But:
- the MR does NOT fix the errors for me
- patch #5 DOES fix the errors for me
Comment #12
f1mishutka commentedComment #13
saganakat commentedThe patch from #5 fix the error for me (drupal 11.3.5)
Comment #14
kburakozdemir commented#5 (3560258-5.patch) worked for me while upgrading drupal/core from 10.6.5 to 11.3.5. thanks.
Comment #15
joseph.olstadchecking, might have noticed but I believe a cache rebuild fixed this? I'm using Drupal 11.3.5, have upgraded.
Comment #16
joseph.olstadMR needs to get the changes as per patch #5 which has positive feedback. Maybe close MR66, open a new one and do verbatim patch 5
https://www.drupal.org/files/issues/2025-11-27/3560258-5.patch
Comment #18
joseph.olstadComment #21
joseph.olstadSee the release notes and please report related issues (if any noticed).
https://www.drupal.org/project/bootstrap/releases/8.x-3.40