When you currently install the module, the List
field formatter doesn't show up on the view mode configuration form. This patch attempts to fix that, i.e.:
- It makes sure that all the list_formatter
plugins have appropriate field_types
set in their annotations.
- It filters out the language
and path
fields in the ListFormatter
formatter plugin - there's probably a better/cleaner way to do this (not sure why they're showing up in the first place).
- It adds a config schema for the formatter configuration (see https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-fi..., under 'Formatter settings').
Pretty sure there is more to do, but with this patch applied, it looks like it's possible to use the list formatter again.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2942348-14.patch | 17.91 KB | jhedstrom |
Comments
Comment #2
brunodboComment #3
brunodboSide note: I think that the
language
andpath
fields might also be causing the issue in #2862347: Clearing cache and installing modules causes field types to throw warnings. Somehow they end up in the plugin definitions, while they shouldn't.Comment #4
brunodboComment #5
brunodboA few more improvements:
- Separated out the list_formatter plugin loading in the formatter plugin to a separate method (
getListFormatter()
).- I'm not using the
taxonomy_term
plugin (TaxonomyList.php) here anymore, since it looks like we can just use theentity_reference
plugin (EntityReferenceList.php) for that. I left the taxonomy plugin in place for now though, as well as commented code which would load a separate plugin based on the target entity type. Perhaps we could extend theentity_reference
plugin with support for view modes in its additional configuration method.Comment #6
brunodboThis fixes some things with the list_formatter contrib config.
Comment #7
brunodboBetter patch.
Comment #8
brunodboFixing another error that slipped in.
Comment #9
brunodboAnd removing some dev cruft.
Comment #10
brunodboThis passes only the settings to list_formatter_theme(), since we don't need the full $formatter in there. This patch should be applied together with the latest one at #2942617: Replace 'list_formatter_comma' theme function with template.
Comment #11
brunodboThis gets link fields working again with
list_formatter
.Comment #12
brunodboSome tweaks to the way we get the
$provider
ingetListFormatter()
, in order to get option fields working again.Comment #13
DuneBLThis is the patch that make this module working!
Comment #14
jhedstromThis updates the patch in #12 to fix this exception that happens for
text_long
items.Comment #15
fskreuz CreditAttribution: fskreuz at Portland Webworks commentedUpdated
Comment #17
_shYThanks, everyone for your work and time.
Patch #12 looks awesome, you did a great job!
Re-rolled the patch and made some minor changes.
Merged to 8.x-2.x-dev!
Comment #18
brunodboGlad to see this merged, thanks!