Problem/Motivation

I'm facing an AJAX error when I configure the column size of a section

<b>Deprecated</b>: substr(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/var/www/web/modules/contrib/bootstrap_layout_builder/src/Entity/Breakpoint.php</b> on line <b>124</b>

Screencast showing Ajax error and deprecated message

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

carolpettirossi created an issue. See original summary.

carolpettirossi’s picture

Status: Active » Needs review
StatusFileSize
new589 bytes

Attaching a patch to use in composer.json

keshavv’s picture

I am doubtful, that you getting an error because $strucutre_id is a required parameter, It will never be null.

luke.stewart’s picture

I've also manage to generate this. I'm unclear if there was some additional config missing but can confirm that manually updating getClassByPosition such that it defaults to sufix = 12 and only checks $strucutre_id if it's not empty removes the error.

Happy to submit a MR for this if helpful - but you seem to think perhaps this should not be the case? And am wondering if I've done something wrong - missed a step in configuration after install?

I'm using this with Layout Builder on a paragraph if that sheds some light on this?

jaypan’s picture

I'm seeing this in my console as well.

chike’s picture

I encountered this issue in Drupal 10.3.1. Patch #3 got me over it. There seems to be other opinions about the patch on this page.

Also not sure if it is related to this issue, but the module still had other problems after I got over the first issue. I then opened this issue.

rajab natshah’s picture

rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.