Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kennethrg

    (@kennethrg)

    I identified that the problem was with the focalPoint attribute of the Featured Item block. For some reason, I think, $attributes['focalPoint']['x'] and/or $attributes['focalPoint']['y'] was being read as a string rather than an integer. After going into the editor and editing the block by picking a new focal point, the code worked as intended.

    So, I’m not sure if these values got corrupted somewhere along the way or if a previous version of the block editor wrote this out in a format that is not identified as an integer, but either way it was causing a type mismatch. Without doing a full debug, I would guess that either checking for an integer value or explicitly casting to integer would be necessary to avoid an error getting thrown.

    Saif

    (@babylon1999)

    Hello @kennethrg,

    Thank you for sharing your findings!

    I didn’t find any similar reports, probably just a random bug caused by a conflict. ??</img>

    Either way, I’m glad you’ve figured it out! I will mark the thread as solved, feel free to open a new one if you have any other questions!

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Critical Error displaying or editing a page with a Featured Item block’ is closed to new replies.