Problem/Motivation
I've seen a handful of deprecation issues around here marked as closed/fixed, yet I'm still seeing deprecation warnings:
Deprecated function: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\webform\Plugin\WebformElementBase->prepare() (line 731 of modules/contrib/webform/src/Plugin/WebformElementBase.php).
Steps to reproduce
I'm running this on my local using Lando for the containers.
All debug stuff is enabled on local.
Create a webform, view webform, see error.
Deprecated function: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\webform\Plugin\WebformElementBase->prepare() (line 731 of modules/contrib/webform/src/Plugin/WebformElementBase.php).
Drupal\webform\Plugin\WebformElementBase->prepare(Array, Object) (Line: 49)
Drupal\webform\Plugin\WebformElement\TextBase->prepare(Array, Object) (Line: 46)
Drupal\webform\Plugin\WebformElement\TextField->prepare(Array, Object) (Line: 173)
etc...
Proposed resolution
Let's knock these out. Patch forthcoming for this one.
Remaining tasks
Find all of these. :D
Comments
Comment #2
seanrComment #3
seanrBetter one and catch some more...
Comment #4
seanrYahtzee! No more errors. :D I could use some help just to make sure this patch doesn't introduce any issues I'm not seeing...
Comment #5
jrockowitz commentedwebform.settings.element.allowed_tags should not be NULL.
I think there is something wrong with your webform.settings.yml file.
@see https://git.drupalcode.org/project/webform/-/blob/6.1.x/config/install/w...
Comment #6
seanrNot sure what I should be looking for in that file. I created the worform from a standing start and had errors off the bat - wasn't anything I imported, this is a brand new start. Anyway, adjusted patch here.
Comment #7
jrockowitz commentedI am not able to reproduce this issue via a clean installation.
Comment #8
jrockowitz commentedComment #9
phannphong commentedI'm facing the same problem and the patch at #6 can fix the problem.
I'm using webform version 6.2.0-beta6.
Comment #10
phannphong commentedAs I mentioned in the previous comment, when the patch #6 can fix the problem. However, this patch will trgger new warning message:
Therefore, I've uploaded a new patch to address this new issue.
Comment #11
phannphong commentedComment #12
jrockowitz commentedI think the
allowed_tagsis missing in your webform.settings.yml.Please run the repair command via the UI (/admin/structure/webform/config/advanced) or Drush (
drush webform:repair)Comment #13
jrockowitz commentedComment #14
jrockowitz commented