I have an entity with view mode "Default". The view mode uses a Display Suite layout (One column).
On another installation, I set the layout to "- None -", reverting the view mode back to the original template. I then export the settings via YML, and re-import them on my main installation.
However, after the config import, the entity's view mode still uses the DS layout. The changes from the config aren't applied.
The problem might be that this piece of config is responsible for the layout:
core.entity_view_display...default.yml
third_party_settings:
ds:
layout:
id: ds_1col
path: modules/ds
library: ''
disable_css: false
settings:
wrappers:
ds_content: div
outer_wrapper: div
attributes: ''
link_attribute: ''
link_custom: ''
classes:
layout_class: { }
entity_classes: old_view_mode
regions:
ds_content:
- field_pg_tl_teasers
When you return the display mode to DS layout "- None -", those lines are simply removed from the config. Apparently, the absence of these settings does not force them to be cleaned out.
Comments
Comment #2
yoruvo CreditAttribution: yoruvo commentedComment #3
yoruvo CreditAttribution: yoruvo commentedComment #4
swentel CreditAttribution: swentel as a volunteer commentedIf you save the field ui screen after setting back to none, the third party settings should be gone no after export ? If not, then either something went wrong during the save for some reason. Could you double check that everything is gone, because I can't reproduce this atm.
Comment #5
GaëlGI had the same problem with drupal 8.2.7 and ds 2.6. I manually changed the yml to
third_party_settings: no
and it worked.Comment #6
aspilicious CreditAttribution: aspilicious commentedComment #7
weseze CreditAttribution: weseze commented@aspilicious: Works as designed... Can you please explain then how this can be fixed? Is it a core issue? A config-contrib module issue?
Because this still isn't working on the latest D8.3 core and the latest ds versions.
Adding a line "third_party_settings: no" (as suggested by @GaëlG), importing config and everything works again. But this line is never added unless you manually put it there. So for every entity type it needs to be added manually?
Seems to me like there is still some kind of issue here, although I'm unsure if it is something with display suite itself or not...
Comment #8
larowlanI can confirm this issue.
To fix it, you have to manually change it to
third_party_settings: {}
If you do that and import, but then re-export, it keeps coming back. So there must be something awry here or in core's handling of empty third party settings.
Comment #9
larowlanStill exists in 8.x-3.x
Comment #10
aspilicious CreditAttribution: aspilicious commented"If you do that and import, but then re-export, it keeps coming back. So there must be something awry here or in core's handling of empty third party settings."
Shouldn't this be a core bug than instead of a DS bug?
Comment #11
larowlanI will need to do some debugging to find out where they come from
Comment #12
aspilicious CreditAttribution: aspilicious commentedComment #13
larowlanThis core patch #3030647: Do not add a section when editing an empty layout, or differentiate between new layouts and existing empty layouts has a possible solution/cause here - you can't call setThirdPartySettings with an empty array, you have to use unset.
So perhaps that's what is happening with a config import
Comment #14
swentel CreditAttribution: swentel at eps & kaas for MuseScore commentedI've tried reproducing this. Configured a layout, went to import screen and it showed me the differences (removing all third party settings) and the layout was reset, so not sure if this still a problem with Drupal Core 8.6.x - Or am I missing a step ?
Comment #15
swentel CreditAttribution: swentel at eps & kaas for MuseScore commentedNo response for a long time, reopen if there's more info.
Comment #16
swentel CreditAttribution: swentel at eps & kaas for MuseScore commented