Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299521

D6->D8 migration: User role based block visibility settings not migrated properly

$
0
0

Problem/Motivation

When a D6 block with role-based visibility settings is migrated, the roles selected in the "Show blocks for specific roles" settings are not properly migrated. Currently, when a block with role-based visibility settings (in this case, "authenticated") is migrated, the resulting D8 configuration is:

visibility:
  user_role:
    id: user_role
    roles:
      - '2'
    context_mapping:
      user: user.current_user
    negate: false

When it should be:

visibility:
  user_role:
    id: user_role
    roles:
      authenticated: authenticated
    negate: false
    context_mapping:
      user: user.current_user

I'm thinking that the D6 core roles (anonymous, authenticated) should be handled in the BlockVisibility process plugin. Any D6 custom roles will need to be leverage the d6_user_role migration, I suppose?

Proposed resolution

Figure out how to properly handle core roles (anonymous, authenticated) and custom roles properly.

Remaining tasks

The work.

User interface changes

None.

API changes

None.


Viewing all articles
Browse latest Browse all 299521

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>