Review and remove the NULL return in getRegionForComponentInstance

Created on 11 July 2025, about 1 month ago

Overview

In the issue πŸ› ApiLayoutController::getRegionForComponentInstance doesn't work well with nested components if there are multiple regions. Active , this NULL return was the reason of the issue.

Besides of fixing the issue, we've added...

      if ($regionForComponentId !== XbPageVariant::MAIN_CONTENT_REGION && NULL !== $regionForComponentId) {

...to avoid breaking the code.

The error happened in...

        if (!$page_regions[$regionForComponentId]->access('edit')) {

for being $regionForComponentId NULL

Proposed resolution

Review if this NULL makes sense and, if not, remove it appropriately.

User interface changes

N/A

πŸ“Œ Task
Status

Active

Version

0.0

Component

Internal HTTP API

Created by

πŸ‡ͺπŸ‡ΈSpain isholgueras

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