Problem/Motivation
Whilst working testing on some recipes today I noticed that the schema file for this module is not valid. The mapping for roles is of type "checkboxes", which isn't a valid property in schema documents.
Steps to reproduce
I was running a functional test for a recipe and this issue came to light.
Proposed resolution
I've fixed this by changing the schema type to "string", which matches how some other role configurations work in Drupal. In addition to this I also needed to set the default configuration file to store strings (ie. instead of 0 it is '0').
This allowed the test I was working on to pass.
I'll get a MR in asap for this :)
Remaining tasks
I'm assuming that tests will pass with this in place. I'll create an MR and investigate if they don't.
User interface changes
n/a
API changes
n/a
Data model changes
This shouldn't effect the model. Role machine names are strings.
Issue fork content_access_by_path-3572762
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3572762-schema-of-configuration
changes, plain diff MR !11
- 1.0.x
changes, plain diff MR !10
Comments
Comment #3
philipnorton42 commentedLooks like that failed the tests for the module. Let me look into that.
Comment #4
philipnorton42 commentedThe test failure was unrelated to my change, and is something that Drupal 11 introduced. Apparently, I needed to add the content type name to the creation of the content type or it will crash the page on the content edit screen.
Unit tests are now passing.
I also added a change based on https://www.drupal.org/node/3548485 to remove a deprecation error.
There are some coding style issues picked up by the automation, but they are outside the remit of this issue.
Comment #5
markconroy commentedThanks for this @philipnorton42
I'm getting an error when trying to checkout the branch with
git checkout -b '1.0.x' --track content_access_by_path-3572762/'1.0.x'since 1.0.x already exists as a branch.
I think it should be something like
git checkout -b '3572762-schema-of-configuration' --track content_access_by_path-3572762/'3572762-schema-of-configuration'The code itself looks fine, so I'll be happy to merge it once we have that fixed.
Comment #8
philipnorton42 commentedI think that sorted the issue. The MR is now using the branch`3572762-schema-of-configuration` on my issue fork.
Comment #9
markconroy commentedThanks @philipnorton42
That's merged now.