Problem/Motivation
At the moment metatags are stored in a serialized blob with cardinatlity of 1.
This has the following problems:
- Lack of queryability - everything in the database is in one large blob
- No views integration
Proposed resolution
- Leave the UI as is. Have it render as a custom multi-value widget bypassing the default behaviour in Field API.
- Change MetatagItem to have the following properties
- plugin_id => reference to the tag plugin
- value => metatag value
- scheme => meta element attribute (see #1970362: Support all attributes of the meta element)
- lang => meta element attribute
- dir => meta lang attribute
- Add a MetatagItem::isEmpty that filters out tags that have the same value as the default (see #2581351: API flaw - modified defaults don't affect existing records)
- Write an upgrade path
This gives us
- views support
- views bulk operations ability to bulk edit tags
- queryability
Note this does not mean site builders will need to add multiple values or fields. The UI remains as is, only the storage model changes.
Remaining tasks
The lot
User interface changes
None
API changes
Storage change
Data model changes
From a blob to discrete values.
The idea of this story is to get general buy in before coding starts.
I think this would be 2.x territory as the data model changes significantly.
Thoughts?
Comments
Comment #2
larowlanComment #3
juampynr commentedI think that this collides with the global configuration system. Damien, what do you think?
Comment #4
damienmckennaYeah, I don't foresee doing this, I think there are a lot of other tasks that would be useful (and lots of other contrib work that needs to be done), and I'd be concerned that it would ultimately be over-engineering something that should be relatively simple.
Comment #5
larowlan#2628934: Full support for meta tags that allow multiple values could use this.