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.

CommentFileSizeAuthor
#5 3560258-5.patch954 bytesstyx1983
#4 3560258-2.patch933 bytesstyx1983
#2 3560258.patch842 bytesstyx1983

Issue fork bootstrap-3560258

Command icon 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:

Comments

styx1983 created an issue. See original summary.

styx1983’s picture

StatusFileSize
new842 bytes
styx1983’s picture

Issue summary: View changes
styx1983’s picture

StatusFileSize
new933 bytes
styx1983’s picture

StatusFileSize
new954 bytes
f1mishutka’s picture

Confirm: patch 3560258-5.patch works fine with D11.3-rc1 and bootstrap v3.39 (checked under both PHP 8.4 and 8.5).

priyansu18 made their first commit to this issue’s fork.

priyansu18’s picture

Status: Active » Needs review

I have updated the ThemeSuggestions file. Please check the MR.

carlitus’s picture

The patch from #5 works for me, but not the MR (drupal 11.3.1)

flyke’s picture

I 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

f1mishutka’s picture

Status: Needs review » Reviewed & tested by the community
saganakat’s picture

The patch from #5 fix the error for me (drupal 11.3.5)

kburakozdemir’s picture

#5 (3560258-5.patch) worked for me while upgrading drupal/core from 10.6.5 to 11.3.5. thanks.

joseph.olstad’s picture

checking, might have noticed but I believe a cache rebuild fixed this? I'm using Drupal 11.3.5, have upgraded.

joseph.olstad’s picture

MR 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

  • joseph.olstad committed 3fc71d16 on 8.x-3.x
    maintenance: #3560258 [Drupal 11.3] Warning: Array to string conversion...
joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joseph.olstad changed the visibility of the branch 3560258-drupal-11.3-warning to hidden.

joseph.olstad’s picture

See the release notes and please report related issues (if any noticed).
https://www.drupal.org/project/bootstrap/releases/8.x-3.40