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
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
Comment #3
omarlopesinoPleas review the MR with the solution proposed, thanks!
Comment #4
crzdev commentedComment #5
crzdev commentedLGTM, thanks!
Comment #7
crzdev commented