If you have a style plugin that has a field with '#type' => 'managed_file', panopoly_magic will break it and make it impossible to upload a file - the error given is:

An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports.

This is caused by overzealously moving some internal form elements (like 'form_build_id') under the 'General Settings' fieldset.

By the same token, it also moves the 'Cancel' button under the 'General Settings' fieldset, which looks wierd:

And there are some PHP notices when editing region styles (as opposed to pane styles).

I'll upload a patch to fix soon, but it needs tests before we can commit!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Status: Active » Needs review
FileSize
1.65 KB

Patch is attached!

dsnopek’s picture

FileSize
3.6 KB

Here is a more comprehensive patch that eliminates a bunch of PHP warnings when editing a Region style (which doesn't have a Pane available to preview).

dsnopek’s picture

Title: Style settings form breaks 'managed_file' elements and puts 'Cancel' button in 'General Settings' fieldset » Style settings form breaks 'managed_file' elements, puts 'Cancel' button in 'General Settings' fieldset, and gives PHP notices on region style settings
Issue summary: View changes
dsnopek’s picture

Issue tags: +Needs tests

This needs tests before we can commit: adding tag!

mglaman’s picture

Assigned: Unassigned » mglaman

Working on the tests now, patch fixes issue.

mglaman’s picture

Here is the test for the working patch in #2

dsnopek’s picture

FileSize
3.16 KB

This is the same patch from #6 except renamed to 'panopoly_test' (with no 's') so my Travis script will catch it.

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/62756906

dsnopek’s picture

Status: Needs review » Needs work

The tests pass and the Behat feature looks good!

Two points of quick review:

  1. Let's also check that there is a "Cancel" button on region style settings form
  2. And, let's also make sure that the style settings form works on the pane style too
mglaman’s picture

Assigned: mglaman » Unassigned
FileSize
4.33 KB

Ok! So here's the pane test, which this patch is in fact breaking. Clicking "next" to visit the pane style closes out the modal.

mglaman’s picture

Status: Needs work » Needs review
FileSize
4.4 KB

:) Test failed because test style did not have pane settings callback, only region.

dsnopek’s picture

Trying the tests on Travis one last time: https://travis-ci.org/panopoly/panopoly/builds/62778272

If this passes, I think it's ready to commit!

dsnopek’s picture

Here's the same patch from #10, but renamed to start with panopoly_test so that my script for running the tests on Travis will work.

EDIT: Here is the Travis-CI build: https://travis-ci.org/panopoly/panopoly/builds/63023303

dsnopek’s picture

Status: Needs review » Fixed

Thanks, @mglaman, for the tests! Committed. :-)

  • dsnopek committed 075fc7e on 7.x-1.x
    Update Panopoly Magic and Test for Issue #2477469 by dsnopek, mglaman:...

Status: Fixed » Closed (fixed)

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