Problem/Motivation

Currently, the optional regions of the layouts from the vlsuite_layout module are being rendered twice in their twig templates: one to check the layout has content, another one to render it.

This may produce unexpected bugs as duplicated form submissions (this problem has happened in projects using webform). Also, content should be rendered once as is only printed once. Consequently, it improves the performance as fewer renders are done.

Steps to reproduce

Use any layout from vlsuite layout module.

Proposed resolution

Instead of rendering twice, store the rendered content in a variable and use it for both cases.

Issue fork vlsuite-3414097

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarlopesino created an issue. See original summary.

omarlopesino’s picture

Status: Active » Needs review

Pleas review the MR with the solution proposed, thanks!

crzdev’s picture

Version: 1.1.x-dev » 1.1.1
crzdev’s picture

Status: Needs review » Reviewed & tested by the community

LGTM, thanks!

  • CRZDEV committed 00a6cbb8 on 1.1.x authored by omarlopesino
    Issue #3414097 by omarlopesino: Optional vlsuite layout regions are...
crzdev’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.