Hello folks,

here is a strange issue we encountered with the featuring of a block restricted by role, I couldn't find any duplicate in the issue queue here so I'm trying my chance here around if you guys have the same thing.

We have a multilingual website EN/FR, our block is restricted for authentificated users only. We generate the feature on the EN version of the backoffice, everything is fine but on FR where the role restriction is not set.
If we regenerate the block feature on FR it works on FR but not on EN.

We check the code and it makes sense as in EN we have this :

'roles' => array(
  'authenticated user' => 2,
),

In FR the code looks like this :

'roles' => array(
  'utilisateur authentifié' => 2,
),

So as you can see the role name is being translated and somehow this is causing a problem somewhere.

Now there is a second thing that bothers me.
We tried installing role_export module which allows to export roles as machine_names, to prevent rid mismatch between platforms, but it seems the module here doesn't take it into account and still export rids instead of machine_names. Do you think we should take care of such compatibility ? I think it would help keeping things clean.

I hadn't time to review this on the latest dev version, but as I couldn't find a similar bug in the queue I guess a fix may not be part of the current branch.
I'll try to check the code myself when I'll have time but I post the issue in case someone already know where it comes from.
Thanks !

Comments

nicoloye created an issue.