Hi,

I've updated to drupal core 8.3.0 (with the new layout discovery module) and the latest version of display suite.

Something strange I notice is that the site itself shows the node and user display view correctly (as in: before the upgrade), but when I look at the manage display page the fields are scrambled. The chosen layout (e.g. 3 column layout) is still active, but all/most fields are for example listed under the header region.
When I start moving fields, it happens that they suddenly reset or move spontaneously before I've saved.

Clearing the cache changes nothing about this situation.

Is there a way to recover the original region settings for my fields in the manage display pages?

Comments

ChristopheDG created an issue. See original summary.

svdhout’s picture

I'm experiencing the same behaviour

In the config yml files it used to be:

third_party_settings:
  ds:
    regions:
      region-name:
        - field-name

After upgrading to 8.3, there also is a region set inside the content part of the yml file:

content:
  fieldname:
    region: region-name

looks like the second piece is always set to 'region: content', even if that field does not need to be in the content region (and even if the content region does not exist)

aspilicious’s picture

Category: Support request » Bug report

Interesting, I will check this with swentel and timplunkett.
This possibly needs a new update function.

benjy’s picture

Status: Active » Needs review
FileSize
710 bytes

I think we've run into this as well, any fields that were previously in the "content" region now just end up in the first region of your layout in 8.3, even if your layout actually has a "content" region.

Attached patch doesn't reset the region if the content region also exists in your layout.

ChristopheDG’s picture

This patch doesn't seem to change anything for me.
It's not a complete reset in my case btw. Most fields are in the header. Left and footer region are empty, and then in the right region I have my token fields + my group headers (which were indeed all assigned to that region before the upgrade).

swentel’s picture

Hmm interesting, I'll have a look at it this evening.

ayalon’s picture

I have the same issue.

ayalon’s picture

If I apply the patch in #4 before upgrading, it works. Thx benjy!

ChristopheDG’s picture

So correcting this after the core upgrade is not possible then?

jaarong’s picture

Trying to follow this but I just wanted to add that my particular problem doesn't only deal with the content region. I have several regions in my content types and everything is being shifted to the top region.

Having said that, I'd like to know if there is any danger in simply updating the fields back to their original positions? This is a basically a blocking issue for us to upgrade to 8.3. Will another patch reset it again?

benjy’s picture

There could be two separate issues here, to clarify, the patch I posted solved an issue where after the upgrade, regardless of what we did, we could not place a field in the content region, it would simply jump back to the first region defined in the layout.

We aren't sure if we had issues with the upgrade or whether developers saved and re-exported the entity displays after the upgrade and the bug I described here simply caused fields to be moved to the content region. We only had a small site so we just put the fields back and everything was OK.

ChristopheDG’s picture

I understand. It's unfortunate though, putting all the fields back is quite a task for me. I'll wait a little bit more just to see if anyone could still come up with a solution. If not, then I guess it's going to be labor time...

aspilicious’s picture

I can't reproduce the problem @ChristopheDG has.
There shouldn't be anything changed causing a complete reorder of the fields...
Did you "uninstall" a module and than reinstall it? Or did you run a regular upgrade?

Can people recreate a scenario for me?

We need at least:
1) The entity view mode config before the upgrade
2) The entity view mode config after the upgrade
3) List of layout modules installed + versions (before and after)

tamarpe’s picture

#4 works for me before upgrading, Thanks !

ChristopheDG’s picture

Unaware of all the layout changes, I first upgraded core to 8.3.0.
Then I replaced all the modules that had a dependency on the old Layout module.
Then I could install the old Layout module, but while doing this my site crashed. After that, the only solution for me was to enable the Layout Discovery module using Drush.

At this moment my display suite node views still look fine, but on the manage display pages the fields remain listed under the header section (except field groups and token fields).

aspilicious’s picture

I want to help but everyone with problems is completely ignoring my questions. Can *someone* provide me with the requested information? (see https://www.drupal.org/node/2868893#comment-1205105)

jaarong’s picture

I can probably help with that. I do not know how to get the entity mode config though.

I'd also like to make sure we are upgrading in the proper way given the interaction with the layout plugin. So could someone let me know exactly what order I should be doing those steps in?

dataylor1975’s picture

I recently upgraded from 8.7.2 to 8.3.1 and my DS fields were also scrambled and duplicated. I ended up uninstalling and reinstalling DS, and DS's functionality returned to normal, and then I had to re-do my region placements, field configurations, etc. Not ideal obviously, but at least was able to move past the issue.

maxilein’s picture

Since 8.3.1 I am missing the region drop down under manage display...

hkirsman’s picture

Didn't help for me. May be I have a bit old DS to upgrade. Needed all these updates before Drupal would work:

system module :
  8300 -   Add detailed cron logging configuration.
  8301 -   Add install profile to core.extension configuration.

block_content module :
  8300 -   Fix the block_content entity type to specify its revision data table.

comment module :
  8300 -   Update status field.
  8301 -   Set the 'published' entity key.

ds module :
  8002 -   Fix ds_switch being added to each content entity.
  8003 -   Uninstalls Layout plugin, then enables Layout Discovery.
  8004 -   Makes sure Layout Discovery is enabled on update, as 8003 could have failed to do so.

image module :
  8201 -   Flush caches as we changed field formatter metadata.

locale module :
  8300 -   Delete translation status data in state.

node module :
  8300 -   Change {node_access}.fallback from an int to a tinyint as it is a boolean.
  8301 -   Set the 'published' entity key.

serialization module :
  8301 -   @see hal_update_8301()
  8302 -   Add serialization.settings::bc_primitives_as_strings configuration.

block module :
  Disable blocks that are placed into the "disabled" region.

system module :
  Update entity displays to contain the region for each field.
  Force caches using hashes to be cleared (Twig, render cache, etc.).
  Force plugin definitions to be cleared.   @see https:www.drupal.orgnode2802663

user module :
  Enforce order of role permissions.

views module :
  Rebuild caches to ensure schema changes are read in
aspilicious’s picture

Question, are you guys also using fieldgroup?

ChristopheDG’s picture

I am. My fieldgroups maintained their right position through the update (not the fields listed under them though).

hkirsman’s picture

I was not using it.

maxilein’s picture

I am using field_group (https://www.drupal.org/project/field_group), too
Same as #22

cwells’s picture

I am having the issue as originally described. Applying patch in #4 prior to upgrading did not solve my issue. I am using field group, though not necessarily on the layout in question. I'm also using paragraphs. (Anyone else?)

Attached:

1. entity view mode config export for full content, basic page prior to upgrade
2. entity view mode config export for full content, basic page, after upgrade
3. a diff of those two in that order (i.e. it seems the upgrade adds 'region: content' lines to the yml config

I could provide you a composer.json before and after, or anything else you want to see, even complete drush arb backups if you need (privately).

Before upgrade (basic page, full content):

After upgrade (basic page, full content):

Module changes for upgrade (note that since I was switching from drupal-packagist repos to official repos, I 'pinned' all my module versions, only upgrading as needed), so the only modules that changed:

1. core went from 8.2.3 -> 8.3.1 (the fields started shuffling around/disappearing when I when from 8.2.8 to 8.3.1)
2. address went from 1.0-beta3 to 1.0-rc4
3. display suite went from 2.5 to 3.0-beta3
4. before the upgrade, layout_plugin was installed and was alpha22. after the upgrade, it was uninstalled.
5. layout discovery is enabled on the upgraded site.

I don't think I have any other layout modules going on. Mostly using paragraphs. Paragraphs and entity reference revisions are both at 1.0.0.

Let me know how else I can help.

aspilicious’s picture

Thnx cwells, that's what I need, I'm using the same setup and don't have any issues so I need to dig deeper....