Problem/Motivation

In #2801889: Parameter "filter" for route "diff.revisions_diff" must match... crash we fixed an update function that didn't enable any plugin which lead to an exception.

Proposed resolution

Validate the form to prevent any layout to be enabled.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

yongt9412 created an issue. See original summary.

johnchque’s picture

StatusFileSize
new819 bytes
johnchque’s picture

Status: Active » Needs review

This should make it better.

dhendriks’s picture

I don't know much about PHP, but wouldn't using a Boolean variable be cheaper than using an array? And you can break the loop as soon as you find an enabled layout plugin, right?

miro_dietiker’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Committed, with some comment added.

Still back to needs work to provide test coverage...

ModernMantra’s picture

Status: Needs work » Needs review
StatusFileSize
new871 bytes

Adding test coverage :)

dhendriks’s picture

A question about the test from #7: why do you only need to disable the 'unified fields' and 'split fields' layout plugins, and not the 'Visual Inline' layout plugin?

dhendriks’s picture

I see the code patch is already committed (see #5 and #6). Was my comment (see #4) considered?

miro_dietiker’s picture

Status: Needs review » Fixed
Issue tags: -Needs tests

Because the visual plugin is technically initially disabled by default and is not enabled because the library doesn't exist on test bot.

Committed. :-)

Status: Fixed » Closed (fixed)

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