Add save to library link to the built section preserve array key

Created on 15 April 2022, over 2 years ago
Updated 12 September 2023, over 1 year ago

Problem/Motivation

In SectionLibraryRender.php you do:

$last_item_section = array_pop($sections[$key]);

This will pop the lost item of the array in my case:
['layout-builder__section' => [allSections]

Propose to preserve array key

Patch attached.

Todo

Review & double test/check

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium mschudders

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024