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!
Comment | File | Size | Author |
---|---|---|---|
#12 | panopoly_test-style-form-2477469-12.patch | 4.4 KB | dsnopek |
#2 | panopoly_magic-style-form-2477269-2.patch | 3.6 KB | dsnopek |
Comments
Comment #1
dsnopekPatch is attached!
Comment #2
dsnopekHere 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).
Comment #3
dsnopekComment #4
dsnopekThis needs tests before we can commit: adding tag!
Comment #5
mglamanWorking on the tests now, patch fixes issue.
Comment #6
mglamanHere is the test for the working patch in #2
Comment #7
dsnopekThis 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
Comment #8
dsnopekThe tests pass and the Behat feature looks good!
Two points of quick review:
Comment #9
mglamanOk! So here's the pane test, which this patch is in fact breaking. Clicking "next" to visit the pane style closes out the modal.
Comment #10
mglaman:) Test failed because test style did not have pane settings callback, only region.
Comment #11
dsnopekTrying 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!
Comment #12
dsnopekHere'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
Comment #13
dsnopekThanks, @mglaman, for the tests! Committed. :-)