Closed (works as designed)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2017 at 03:01 UTC
Updated:
29 Apr 2020 at 10:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johnrosswvsu commentedThe #icon_position index is not always defined so it may be better to put a check first. Will this patch be enough to fix this?
Comment #3
johnrosswvsu commentedOr is this a better approach?
Comment #4
markhalliwellThis is already added to every element: https://git.drupalcode.org/project/bootstrap/-/blob/a0cca7d11cfd1b269e2a...
Comment #5
rosk0I'm still seeing this randomly after cache clear. PHP 7.2, Bootstrap 3.26 , Drupal 7.69
Comment #6
tce commentedI also see this. Drupal core 7.69, Bootstrap 7.x-3.26. Patch fixes the issue.
Comment #7
markhalliwellAs I stated in #4, this is already added to every element:
https://git.drupalcode.org/project/bootstrap/-/blob/a0cca7d11cfd1b269e2a...
If you're receiving this error, it's likely due to something not using render arrays properly. For example: calling theme functions manually or using
#themeinstead of using#typeas buttons (in D7) are expected to be elements; not theme hooks (that's how core implemented them at the time).If you get this error, it only means that it's an error with either your custom implementation or some other contrib module.
Please track down that code and fix/file an issue with it instead.
This is not a "bug" in this project, it is designed and implemented the correct way.
Comment #8
tce commentedThanks for your help @markcarver. Your reply lead me to the offending code in a custom module..
I changed it to the below and no longer get the error.
Comment #9
markhalliwellChanging
'#theme' => 'button'to'#type' => 'button'should have also worked.