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.

Comments

aspilicious’s picture

The 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.

danielbeeke’s picture

if 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?

danielbeeke’s picture

maybe not related,
but fields inside the hidden region don't have settings untill you click the cog of other fields.

stevieb’s picture

I'm seeing this in 7.x-2.10 and the 7.x-2.x-dev

stevieb’s picture

I'm using a bootstrap subtheme and changing my admin theme from seven to bootstrap fixed the issue for me...

danielbeeke’s picture

stevieb what are you seeing in the 7.x branch? all of the errors?

danielbeeke’s picture

When switching to bartik or a custom theme this does not go away,
Maybe the issue stevieb is having is not related.

stevieb’s picture

I 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

danielbeeke’s picture

Hello 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.

aspilicious’s picture

I can confirm this is broken. It will take some time to fix this, I did some quick debugging but I didn't get far.

danielbeeke’s picture

Thanks for checking out!
how can I help?

I will try if I can create a how to reproduce steps list.

aspilicious’s picture

Status: Active » Needs review
StatusFileSize
new7.29 KB

In 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...

aspilicious’s picture

StatusFileSize
new8.95 KB

Progress...
1) core fields work
2) DS field plugins work again.

But templates are still not saved. That will be a task for tomorrow :)

aspilicious’s picture

StatusFileSize
new10.26 KB

More 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.

aspilicious’s picture

danielbeeke’s picture

wow great :D

will try them out tomorrow

aspilicious’s picture

StatusFileSize
new13.05 KB

ANother patch that removes some more broken code. Makes everything a lot more readable.

  • aspilicious committed 1bcaf29 on 8.x-2.x
    Issue #2512030 by aspilicious: Custom field display settings and field...
aspilicious’s picture

Status: Needs review » Fixed

Tested with Brecht, seems to work fine (in combination with the core patch)

Status: Fixed » Closed (fixed)

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

ewout goosmann’s picture

Status: Closed (fixed) » Needs work

This 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.

danielbeeke’s picture

StatusFileSize
new539 bytes

I hope this patch is right,
it fixes our problem with DsField implementation formatter settings not being shown when the form is loaded again.

danielbeeke’s picture

Status: Needs work » Needs review
danielbeeke’s picture

StatusFileSize
new742 bytes
aspilicious’s picture

Patch could be OK...
Thank you for diving in that "sea of code"

aspilicious’s picture

StatusFileSize
new868 bytes

Your patch will throw warnings when 'settings' doesn't exist.
Can you test this new patch?

Anonymous’s picture

I 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

aspilicious’s picture

Status: Needs review » Fixed

  • aspilicious committed 2b6c810 on 8.x-2.x
    Issue #2512030 by aspilicious, danielbeeke: Custom field display...

Status: Fixed » Closed (fixed)

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