xb_page using a url alias without a leading slash crashes hard

Created on 9 May 2025, 3 days ago

Overview

To reproduce, open an xb_page in the XB UI and change the url alias to something without a leading slash (and not an empty value)

After the preview attempts to refresh there will be a crash. For me it's pretty conclusive - I get the unexpected error popup and an otherwise gray screen.

The error logged is

AssertionError: assert(str_starts_with($autoSavePath, '/')) in assert() (line 136 of                          
                                                      /Users/ben.mullins/Sites/drupal/modules/custom/experience_builder/src/Controller/ApiContentControllers.php).  

Once this occurs, XB will not open for any entity as the error occurs when building the page list.

Commenting away that assertion allows it to work, but I imagine the assertion is there for a good reason.

If the same steps are performed with an article node (when it can still load), there is an error message in the preview, but nothing crashes

Proposed resolution

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

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

Comments & Activities

Production build 0.71.5 2024