Php Fatal error in MercuryEditorLiveEditModuleHandler::isMercuryEditorActive

Created on 29 July 2025, 3 months ago

This error is flooding my dblog, but it doesn't seem to result in any failure of function by the module:

TypeError: str_ends_with(): Argument #1 ($haystack) must be of type string, null given in str_ends_with() (line 274 of /var/www/html/docroot/modules/contrib/mercury_editor_live_edit/src/MercuryEditorLiveEditModuleHandler.php)

line 274 is

elseif (str_ends_with($route_name, '.mercury_editor_preview')) {

So $route_name is null. this function returns false meaning "don't attach the live editor to this field" then I think the easy fix is to just check if $route_name is null and return false. I will make an MR with such code.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ransomweaver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024