When using display suite (dev via git, dev and alpha10) in a drupal 8 site with < 15 contrib modules and < 15 custom modules, we experience some strange things.
https://www.youtube.com/watch?v=h_3Ebfm1MMI
* when I click on the cog of a field to change it formatter settings, a totally different field opens.
* when I change settings and save it, it does not get picked up when collapsing the field settings.
* when I hit save and reload the page nothing is saved.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | 2512030-26.patch | 868 bytes | aspilicious |
| #24 | fixing-ds-field-settings-2512030-22.patch | 742 bytes | danielbeeke |
| #17 | 2512030-17.patch | 13.05 KB | aspilicious |
| #14 | 2512030-13.patch | 10.26 KB | aspilicious |
| #13 | 2512030-12.patch | 8.95 KB | aspilicious |
Comments
Comment #1
aspilicious commentedThe 8.x-2.x version is not yet stable. SO it's possible that something went wrong.
I'll look at it as fast as I can.
Comment #2
danielbeeke commentedif i comment ds_form_entity_view_display_edit_form_alter it still persists,
the field template alter still works, but the error is not fixed,
so maybe we can conclude it is not ds_form_entity_view_display_edit_form_alter or further down.
What kind of debugging would be good to do more?
Comment #3
danielbeeke commentedmaybe not related,
but fields inside the hidden region don't have settings untill you click the cog of other fields.
Comment #4
stevieb commentedI'm seeing this in 7.x-2.10 and the 7.x-2.x-dev
Comment #5
stevieb commentedI'm using a bootstrap subtheme and changing my admin theme from seven to bootstrap fixed the issue for me...
Comment #6
danielbeeke commentedstevieb what are you seeing in the 7.x branch? all of the errors?
Comment #7
danielbeeke commentedWhen switching to bartik or a custom theme this does not go away,
Maybe the issue stevieb is having is not related.
Comment #8
stevieb commentedI use a bootstrap subtheme for the display and seven for admin
using bootstrap as the admin theme allowed me to save my field settings
.. no other theme allowed me to save the settings
- I recently updated from 7.x-2.8 where the everything worked smoothly
the error I receive when using any theme other than bootstrap is
Fatal error: Call to undefined function bootstrap_form_process() in ****includes/form.inc on line 1850
Comment #9
danielbeeke commentedHello stevieb
The issue you are having is probably unrelated, bootstrap_form_proces is maybe a function in the theme, or in some helper module.
Please create an issue for the corresponding version in the bootstrap theme issue queue. The issue here has to do something with the code of the 8.x ds module. The error you are having is probably a bug on ajaxing. If the ajax fails ds/manage display will not save.
Comment #10
aspilicious commentedI can confirm this is broken. It will take some time to fix this, I did some quick debugging but I didn't get far.
Comment #11
danielbeeke commentedThanks for checking out!
how can I help?
I will try if I can create a how to reproduce steps list.
Comment #12
aspilicious commentedIn order to make this kinda working I needed to rewrite a lot of code.
This patch doesn't work for DS field plugins nor field templates.
But at least core field settings get saved again.
I already worked 6 hours on this one, hopefully it gets faster now...
Comment #13
aspilicious commentedProgress...
1) core fields work
2) DS field plugins work again.
But templates are still not saved. That will be a task for tomorrow :)
Comment #14
aspilicious commentedMore progress
1) Core fields work
2) DS field plugins work
3) Templates get saved again
Only problem left:
* When a core field doesn't have any settings but wants to to add DS template settings the system goes nuts because it doesn't expect field template settings.
Never fixed that many problems while removing code.
Comment #15
aspilicious commentedThe last problem seems to be a core issue.
#2536906: Warning when saving third party settings while no settings available
Comment #16
danielbeeke commentedwow great :D
will try them out tomorrow
Comment #17
aspilicious commentedANother patch that removes some more broken code. Makes everything a lot more readable.
Comment #19
aspilicious commentedTested with Brecht, seems to work fine (in combination with the core patch)
Comment #21
ewout goosmannThis issue doesn't seem to be fixed for DsField implementations.
We are extending DsFieldBase with a build() and an isAllowed() function,
nothing special there.
When I change the ds template settings from default to expert and add some things,
the data get's saved but it is not viewable in the field ui.
It get's saved and it also works in the renders.
Comment #22
danielbeeke commentedI hope this patch is right,
it fixes our problem with DsField implementation formatter settings not being shown when the form is loaded again.
Comment #23
danielbeeke commentedComment #24
danielbeeke commentedComment #25
aspilicious commentedPatch could be OK...
Thank you for diving in that "sea of code"
Comment #26
aspilicious commentedYour patch will throw warnings when 'settings' doesn't exist.
Can you test this new patch?
Comment #27
Anonymous (not verified) commentedI got ds completely working on Beta15 with these patches, using ds 8.x-2.0-alpha10+31-dev and layout_plugin 8.x-1.0-alpha14+2-dev:
- https://www.drupal.org/files/issues/2563925-2.patch
- https://www.drupal.org/files/issues/2550225-28.patch
- https://www.drupal.org/files/issues/2575865-fix-field-templates.patch
Comment #28
aspilicious commented