Closed (fixed)
Project:
Registration role
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2019 at 12:34 UTC
Updated:
27 May 2020 at 18:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
YurkinPark commentedComment #3
YurkinPark commentedSorry, one problem was detected in previous version
Comment #4
mlncn commentedLooks good.
Comment #6
mlncn commentedComment #8
gnugetThis still needs work.
Running tests while using this module triggers this error:
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for registration_role.setting with the following errors: registration_role.setting:role_to_select.administrator variable type is integer but applied schema class is Drupal\Core\Config\Schema\StringThis is because the configuration looks like this:
So, when the schema is applied
contributor(the selected role) is indeed a string butadministratoris0which is integer and breaks the expected schema.I'm going to create a new issue with the fix.
Comment #9
andypostIt needs follow-up to fix form and provide post update hook to remove keys with 0 values, as discussed in slack
@gnuget nice catch!
Comment #10
gnugetI asked in the Drupal Slack and it seems that given that we cannot know the type of the values it is better to fix the configuration to make it match with the schema.
So in my fix instead to fix the schema I will fix how is store the configuration :-)