- πΊπ¦Ukraine Anna D
Any ideas on continuing work on this issue?
I found that a user:id (node author) cache tag is added to every node. However, the author display is disabled, and a small investigation led me to template_preprocess_node().
By default this function performs special preprocessing of some base fields so they are available as variables in the template. For example 'title' appears as 'label'. This preprocessing is skipped if:
a module makes the field's display configurable via the field UI by means of BaseFieldDefinition::setDisplayConfigurable() AND the additional entity type property 'enable_base_field_custom_preprocess_skipping' has been set using hook_entity_type_build().This is unclear to me because $submitted_configurable is FALSE in my case (the date and UID fields are not displayed in the view display). As a result, the condition if (!$skip_custom_preprocessing || !$submitted_configurable) is always TRUE.
Additionally, I would separate the date and UID in this case. If only the date is needed, the author (and consequently, the user cache tags) is still added.
- π¬π§United Kingdom catch
That comment suggests that $submitted_configurable needs to be TRUE in order for that logic to be skipped, that might be the specific problem you're seeing?
I think we need to add a 'computed' (extra) field for 'submitted', once we have that, we can deprecate adding it directly in templates.
Adding another related issue.
- πΊπ¦Ukraine Anna D
Yes, and this is not clear to me.
$submitted_configurable = $node->getFieldDefinition('created')->isDisplayConfigurable('view') || $node->getFieldDefinition('uid')->isDisplayConfigurable('view');
The Created On (date) and Created By (uid) fields are not configured to be displayed. However, I need to display them in order to avoid adding a related author cache tag. Is that correct?
- π¬π§United Kingdom catch
You need to alter the field definitions to allow them to be displayed (or install the manage fields module which does this), they don't actually need to be displayed.
All of this logic is in desperate need of updating but several of the issues around it are stalled.
- π¬π§United Kingdom adamps
All of this logic is in desperate need of updating but several of the issues around it are stalled.
Unfortunately yesπ. β¨ Add a tag select list in string Formatter Needs review is the likely next step, and it was moving well. But now the next step is a quite complex update hook.
@catch is there any chance of any funding being available? It probably wouldn't take a huge number of hours to make real progress on the whole META area. Unfortunately it's often too much to do for free.
- π¬π§United Kingdom catch
@adamps there is still no way to get direct funding for core development except via individual employers.
The two routes I can think of would be:
1. If there's a demonstrated need for Drupal CMS, then a company might sponsor work via the starshot contribution credits system.
2.Experience Builder must need to control where 'submitted' gets placed in an entity layout at some point, possibly before it can have a stable release, so will hit this problem soon. Likely the same for the title.
Even if not funding, those would be two potential ways to get extra reviewers.
For me personally I think that 'submitted' would be the best place to focus short term efforts rather than title (which I assume β¨ Add a tag select list in string Formatter Needs review is blocking) because it is a bit more self-contained.
- π¬π§United Kingdom adamps
Thanks @catch. Let's hope that someone needs this issue enough to be willing to fund it.
The sequence of events as I understand it is described in β¨ [META] Expose Title and other base fields in Manage Display Active .
It proposes we next work on phase B stage 1 which is covered by issue β¨ Add formatters and other mechanisms as alternative to base fields directly in entity templates Active . That will involve β¨ Add a tag select list in string Formatter Needs review as the solution for 'title', and it seems quite close to completion. The equivalent for 'submitted' is more complex, however working code does exists in "Manage Display" contrib; it doesn't have its own Core issue yet as far as I know.
- π©π°Denmark ressa Copenhagen
Thanks so much for working on this, having "Title", "Authored on", etc. directly available under Display would be such a great feature.
We could consider adding a new header "Funding" in the Issue Summary of important Drupal core issues such as β¨ [META] Expose Title and other base fields in Manage Display Active , with a text like this?
Funding
Drupal relies on the community for resources, and the Drupal core developers working on this task are looking for funding. Please contact @developerA or @developerB for further details on timeline and budget.
The companies who sponsors the completion of this task will be listed as sponsors of this feature in the Issue Summary, as well as on drupal.org/issue-sponsors/display-title and receive eternal gratitude from the Drupal community.
It has previously been seen to work, to gently make the users aware, that this great software needs real humans to spend time building it, for example in π± Plan for stable release Fixed .