Problem/Motivation
Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Config\Entity\Query\Condition->compile() (line 39 of core/lib/Drupal/Core/Config/Entity/Query/Condition.php).
Drupal\Core\Config\Entity\Query\Condition->compile(Array) (Line: 85)
Drupal\Core\Config\Entity\Query\Query->execute() (Line: 302)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 207)
Drupal\filter\Entity\FilterFormat->preSave(Object) (Line: 562)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 517)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 608)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 214)
Drupal\filter\FilterFormatFormBase->submitForm(Array, Object) (Line: 33)
Drupal\filter\FilterFormatEditForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('filter_format_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)Steps to reproduce
Unsure how to reproduce this issue , but for me this occurs with D9.5.10 when saving a text format such as full text or rich text , I'm not sure what layout_builder is doing in this case.
Proposed resolution
TBD
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Release notes snippet
TBD
Issue fork drupal-3374182
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:
- 3374182-deprecated-mbstrtolower-triggered
changes, plain diff MR !6964
Comments
Comment #2
joseph.olstadactually, this occurs in D9.5.10
I haven't noticed this when using D10.0.10 in another site, perhaps it's fixed in D10.0.10
Comment #3
joseph.olstadComment #5
samitk commentedComment #7
samitk commentedComment #8
smustgrave commentedIssue summary is still incomplete
But proposed solution should be based on a little research to find where/why that key is empty. Just putting a simple check could be masking a larger issue.
Comment #9
ccarnnia commentedJust saw it on `10.2.6`.
++ on #8 @smustgrave
given 2 sites in a multisite structure with almost identical config I see this error on one and not the other.
It displays when saving a view mode.
looking ...
Applying this patch silences the message but probebly not the final fix [https://www.drupal.org/files/issues/2023-05-15/3302838-25.patch].
Comment #10
danielvezaCould you post the backtrace?
Is there any contrib or custom Layout Builder/view mode modules that might be causing an issue here? Echoing @smustgrave in #8 I think we need to find the cause before we can say if this is the right fix or not. I suspect something else might be at play here.
Comment #11
joseph.olstadrelated solution mentioned in comment#9 linked here:
#3302838-25: Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated
Comment #12
joseph.olstadComment #13
joseph.olstadClosing this as a duplicate of #3302838: Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated