When trying to apply the Adaptive image format and adjust settings on a Display Suite layout for a view mode the AJAX request either timesout or returns 500 error for premature end of script headers.
Full error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Internal Server Error
ResponseText:
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
[no address given] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.
Steps to reproduce
-Choose "Manage Display" from a content type.
-Add an image field to the content region of the display and select "Adaptive Image" format.
-Save display then edit the settings for Adaptive Image and you'll be able to edit.
-Try again but this time choose a view mode and then choose the "Display Suite: One column layout" for your layout. By default this is set to None.
-Add an image field to the content region of the display and select the "Adaptive Image" format.
-Save display then try to edit settings for the Adaptive Image.
-The above error occurs or a memory timeout.
Testing with Display Suite dev version: 7.x-2.0-beta1+5-dev in ds.info.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1728524-cs_adaptive_image-ds_layout-5.patch | 2.86 KB | markhalliwell |
Comments
Comment #1
kbasarab commentedUpdate to this. Did some testing on a vanilla Drupal install tonight. With stable release of Ctools and Display Suite this works fine. With the 2.x version of Display Suite the errors I mentioned above are happening. Downgrading to DS 1.5 everything works as expected. Not sure if that keeps the issue with Adaptive Image or Display Suite though for the issue queues.
Comment #2
thierry.beeckmans commentedImportant: Switching back to DS 1.5 will cause you to loose all your styling / formatting. The 1.x and 2.x versions are not compatible.
A temporary workaround could be to setup the adaptive image styles in the standard drupal layout for your display mode, save the settings. Switch the layout to the display suite layout of your choice and don't try to alter the image formatter.
Comment #3
ducdebreme commentedsubscribing
Comment #4
itaine commentedRunning into the same problem.
Comment #5
markhalliwellTook a stab at this, because I was having this issue as well. Took me a while to figure out what the problem was exactly, but after reading hook_field_formatter_settings_form() I noticed how
cs_adaptive_image_field_formatter_settings_form()was returning the entire form instead of just the formatter settings, which was probably the cause of the recursion.From the hook_field_formatter_settings_form() page:
Attached is a patch that changes everything to a separate
$elementvariable and returns that instead.Comment #6
ducdebreme commentedGreat! - Thank you!
The patch fixed the problem.
Comment #7
thijsvdv commentedBrilliant! Works just fine, thanks!
Comment #8
markhalliwellPlease commit.
Comment #9
sk33lz commentedI just ran into this issue, and the patch in #5 fixes the ajax error. I have downloaded the latest 7.x-1.x-dev release, and this has not been committed yet apparently. Please commit the patch.
Thanks!
Comment #10
Jānis Bebrītis commented#5 fixes it for me too.
Comment #11
jnettik#5 works great. Thank you
Comment #12
david lesieur commentedGood catch, Mark!
Committed.