Closed (fixed)
Project:
Orange DAM
Version:
1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Aug 2023 at 15:58 UTC
Updated:
25 Sep 2023 at 22:49 UTC
Jump to comment: Most recent
Config Inspector reports the following when analyzing `orange_dam.settings.yml`
Name Label Type Validatable Value Error Validation error asset_formats.TRX Undefined undefined No missing schema asset_formats.TR1 Undefined undefined No missing schema
Enable config inspector module and check orange_dam.settings.yml.
Add the following to the schema file:
orange_dam.asset_format:
type: string
content_types:
type: sequence
label: 'Content Types'
sequence:
type: string
label: 'Content Type'
(untested)
And rewrite the asset_formats key to:
asset_formats:
type: mapping
label: 'Content Type <> Asset Format Mapping'
mapping:
label: 'Asset Format'
type: string
content_types:
type: orange_dam.asset_format
Alternatively, an improvement could be to remove the `asset_formats` key all together and add it to the configuration of the content types, since that is actually what this config key is doing.
Decide whether to remove asset_formats and add it to content type config.
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:
Comments
Comment #2
adamzimmermann commentedThank you for submitting this. I like the proposed solution+++
Comment #3
apotek commented> I like the proposed solution+++
@adamzimmerman, I do too :).
so then the settings would look like this:
The schema would need this added:
Though it would be more elegant if the asset_format type were not a string but an enum type so it could be validated.
This is the easy part. The harder parts:
1. Refactor the parts of the code that were using the`asset_format` key.
2. Write update hook to remove end users' `asset_format` config and move the values into their `content_types` config.
Comment #4
adamzimmermann commentedI believe this is what you showed in your comment above, and I'm liking it!
You are correct.
Comment #6
adamzimmermann commentedComment #8
adamzimmermann commented