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

Make usage of book.settings:allowed_types consistent

$
0
0

Problem/Motivation

The format in the book.settings.yml file initially is:

allowed_types:
  - book
block:
  navigation:
    mode: all pages
child_type: book

After saving the form, looking at the file in sites/default/files/hash... it is:

allowed_types:
  book: book
  article: '0'
  page: '0'
block:
  navigation:
    mode: 'all pages'
child_type: book

The format of saving the "sequence" is different.
Before it uses - content_type
and after: content_type_allowed: content_type_allowed
or: content_type_not_allowed: 0

Also... the mode string is missing quotes initially.

Proposed resolution

Add quotes around the string that has a space in book.settings.yml

Fix the book config set to only save allowed types, and to match the format of the sequence with the -

Remaining tasks

discuss proposed resolution
implement

User interface changes

No UI changes.

API changes

No API changes.

Steps to reproduce

  1. clean out a possible previous site: sudo rm -r sites; git checkout sites;
  2. install site
  3. open in an editor: core/modules/book/config/book.settings.yml
  4. enable book module under Extend
  5. save the book settings form at admin/content/book/settings
  6. open in an editor the yml file saved under the config hash, for example: sites/default/files/config_NrobAyuHYCIoR5CIio_mXfe6zna5HJ1qO3tsEp1eJ5g/active/book.settings.yml

Original report by @YesCT

Follow up for #1912302-11: Create configuration schemas for book module


Viewing all articles
Browse latest Browse all 291302

Trending Articles



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