#2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI deals only with nodes. This issue does the same for taxonomy and aggregator modules. Fix preprocess and templates to bypass special processing of base fields if the new setting is enabled:

  • taxonomy term 'name'
  • aggregator feed 'title'
  • aggregator feed 'description'
  • aggregator feed 'image'
  • aggregator item 'title'
  • aggregator item 'description'

Solution

Copy everything done in #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI.

Release notes snippet

It is now easier to make taxonomy and aggregator base fields configurable via the field UI due to a mechanism to disable preprocessing of base fields, matching the existing mechanism for node base fields. This a step towards making base field display configurable in Drupal Core and in the meantime there is a contrib module to enable it. These changes are fully back-compatible.

CommentFileSizeAuthor
#60 entity-base-display-2993642-interdiff-58-60.txt3.78 KBadamps
#60 entity-base-display-2993642-60.patch34.62 KBadamps
#58 entity-base-display-2993642-interdiff-57-58.txt7.59 KBadamps
#58 entity-base-display-2993642-58.patch33.64 KBadamps
#57 entity-base-display-2993642-interdiff-55-57.txt3.53 KBadamps
#57 entity-base-display-2993642-57.patch30.48 KBadamps
#55 entity-base-display-2993642-interdiff-53-55.txt1.27 KBadamps
#55 entity-base-display-2993642-55.patch27.42 KBadamps
#53 entity-base-display-2993642-interdiff-49-53.txt1.1 KBadamps
#53 entity-base-display-2993642-53.patch27.43 KBadamps
#49 entity-base-display-2993642-interdiff-48-49.txt14.04 KBadamps
#49 entity-base-display-2993642-49.patch27.4 KBadamps
#48 entity-base-display-2993642-interdiff-42-48.txt4.12 KBadamps
#48 entity-base-display-2993642-48.patch19.82 KBadamps
#42 entity-base-display-2993642-interdiff-35-42.txt2.98 KBadamps
#42 entity-base-display-2993642-42.patch20 KBadamps
#35 entity-base-display-2993642-interdiff-32-35.txt8.03 KBadamps
#35 entity-base-display-2993642-35.patch18.79 KBadamps
#33 entity-base-display-ONLYTESTS-2993642-32.patch11.03 KBadamps
#32 entity-base-display-2993642-interdiff-22-32.txt6.36 KBadamps
#32 entity-base-display-2993642-32.patch18.49 KBadamps
#23 entity-base-display-ONLYTESTS-2993642-22.patch8.94 KBadamps
#22 entity-base-display-2993642-22.patch16.42 KBpancho
#22 2993642_17-22_interdiff.txt7.46 KBpancho
#17 entity-base-display-2993642-interdiff-15-17.txt901 bytesadamps
#17 entity-base-display-2993642-17.patch7.42 KBadamps
#15 entity-base-display-2993642-interdiff-4-15.txt4.64 KBadamps
#15 entity-base-display-2993642-15.patch7.42 KBadamps
#4 entity-base-display-2993642-4.patch5.42 KBadamps

Comments

AdamPS created an issue. See original summary.

adamps’s picture

adamps’s picture

Title: Manage display of base fields for other entity types » Framework for manage display of base fields in other entity types
adamps’s picture

Status: Postponed » Needs review
StatusFileSize
new5.42 KB
adamps’s picture

Issue summary: View changes
adamps’s picture

Issue summary: View changes
adamps’s picture

This is outdated now compared with #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI. Once that finally gets committed, we can make updates here to match.

adamps’s picture

Title: Framework for manage display of base fields in other entity types » Mechanism to disable preprocessing of base fields in other entity types so they can be configured via the field UI
adamps’s picture

Issue summary: View changes
Status: Needs review » Postponed
jonathanshaw’s picture

Title: Mechanism to disable preprocessing of base fields in other entity types so they can be configured via the field UI » Mechanism to disable preprocessing of base fields in non-node entity types so they can be configured via the field UI
Version: 8.7.x-dev » 9.x-dev
Status: Postponed » Active
pancho’s picture

Are you sure we don't want to get this done consistently in D8, at least until LTS?
This may be some work, but once #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI is committed, it's mainly copy/paste, add/fix tests, fix themes.

jonathanshaw’s picture

Per the IS it is definitely doable in D8, but @AdamPS is not planning to do it as part of his one man initiative here, and no one else has shown much interest; whereas it's straightforward for D9.

pancho’s picture

I don't think that nobody would be interested. I rather think everybody's waiting for #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI to finally arrive, so we can fix it for all other entities consistently, 1:1. If in the end we should be missing the D8 LTS target (which I'm not excpecting), then we can still move on to D9.

adamps’s picture

If someone is keen to work on this in D8 that's great. The patch itself is fairly simple, and the one in #4 just needs a bit of tidy up to match #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI. It also needs tests, CR and so on. In comparison, fixing in D9 would be almost free as part of #3015623: [PP-many] Remove outdated code relating to "Expose Title in Manage Display" as then it doesn't need BC. Anyway I think the IS is fairly clear in case anyone wants to take on the job.

adamps’s picture

Version: 9.x-dev » 8.7.x-dev
Category: Feature request » Task
Issue summary: View changes
Status: Active » Needs review
Issue tags: +Needs tests, +Needs change record
StatusFileSize
new7.42 KB
new4.64 KB

Here is a new version of the patch that matches title.display-2923701-305.patch

I have set this back to a D8 task. Sorry for going round in circles, but I had misunderstood the plan for D9. If I understand correctly, we need to get this fix into D8, then deprecate the old way in D9.

Status: Needs review » Needs work

The last submitted patch, 15: entity-base-display-2993642-15.patch, failed testing. View results

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new7.42 KB
new901 bytes
adamps’s picture

Status: Needs review » Needs work

Needs work for tests and CR. If we are quick and get this into D8.7 then can share the same CR as the node one.

For the tests, will have to test a teaser view. On the entity own page, the entity label gets stolen by the title block.

adamps’s picture

@Pancho

it's mainly copy/paste, add/fix tests, fix themes.

It's all done apart from the tests. I would be very happy if you had time to help with that.

Also useful if anyone can review the code.

pancho’s picture

@AdamPS
Sure, as soon as I’m back from vacations, I will look into what’s missing plus do a first code review.

I’m not assigning as everyone who gets to it earlier, is welcome!

pancho’s picture

Assigned: Unassigned » pancho

Currently working on the tests.

pancho’s picture

Version: 8.7.x-dev » 8.8.x-dev
Assigned: pancho » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new7.46 KB
new16.42 KB

Here are the tests. Please review whether everything works the way it was meant to be.

adamps’s picture

Great thanks @Pancho I will review.

Here is an only tests version of your patch to confirm the tests fail without the patch

pancho’s picture

Here is an only tests version of your patch to confirm the tests fail without the patch

Good idea. Indeed I wasn't 100% sure we're getting the title/name fields right, neither am I on #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI which hardly tests the title field at all.

I was also unsure whether we're allowed to combine the three quite similar helper modules aggregator_feed_display_configurable_test and taxonomy_term_display_configurable_test with node_display_configurable_test into a single one. Finally, we opted for a single 'enable_base_field_custom_preprocess_skipping' flag.

Needs work for tests and CR. If we are quick and get this into D8.7 then can share the same CR as the node one.

I guess we're too late for D8.7, right?

Status: Needs review » Needs work

The last submitted patch, 23: entity-base-display-ONLYTESTS-2993642-22.patch, failed testing. View results

pancho’s picture

While the tests should be properly testing the impact of the toggle, I'm a bit disappointed to see the tests aren't specific enough. :/

TermDisplayConfigurableTest fails in line 55 with an exception, but shouldn't it fail on the assertions in line 48 or 49?
Even worse, FeedDisplayConfigurableTest doesn't fail at all. Or should it?

I need to figure out better how we're expecting things to be today vs. after the patch. Finally, out-of-the-box behavior shouldn't change at all.

adamps’s picture

#2923701 hardly tests the title field at all.

True, fair point. But there we had some other fields we could test on and here we don't.

I guess we're too late for D8.7, right?

Probably, although the committers are allowed to cherry pick. True, normally that's only for bugs, but we could see if they could view this as an extension to #2923701. I think it would be easier for the community to understand if all entities come in the same release and CR. Anyway we need to get it committed to D8.8 before worrying about D8.7:-).

@Pancho:

I need to figure out better how we're expecting things to be today vs. after the patch.

@Adam #18:

For the tests, will have to test a teaser view. On the entity own page, the entity label gets stolen by the title block.

Yes it's tricky. You are seeing #2941208: Title formatting broken due to flawed EntityViewController->buildTitle scenario 2. Currently Core has no way to disable the "title stealing" on the entity own page. So the only option is to test viewing of the entity indirectly. It could be a node with an entity reference to taxonomy with formatter "rendered entity", or it could be a view of taxonomy with "Show: Taxonomy term". Once you have tests like that it should all work as you expect:

  • Current behavior: the taxonomy term name always gets printed as h2, ignoring the display settings
  • Correct behavior: the taxonomy term name obeys the display settings

I was also unsure whether we're allowed to combine the three quite similar helper modules aggregator_feed_display_configurable_test and taxonomy_term_display_configurable_test with node_display_configurable_test into a single one

I like the way you have done it. It's easier for us working on patches if you can leave node_display_configurable_test as it is because some other issues have patches that make changes to that file.

adamps’s picture

PS If you have time to review some other issues that would be very useful thanks.

  1. Top priority: #2993647: Correctly determine when to display fields as inline
  2. #2941208: Title formatting broken due to flawed EntityViewController->buildTitle
pancho’s picture

Assigned: Unassigned » pancho

For the tests, will have to test a teaser view. On the entity own page, the entity label gets stolen by the title block.

Ouch, I missed that hint. Indeed that is what we should be doing. Reassigning to rework the tests. I will also take a look at the other two issues.

adamps’s picture

@Pancho, yes I have had a few "ouch" moments on this work. Sure it will be a bit harder, but hopefully not too much work.

I can't do this whole area all by myself so I will be very happy if you can finish the issue. If you are not going to work on it then please can you un-assign yourself in case someone else wants to do it?

adamps’s picture

Assigned: pancho » adamps

I guess you have moved on Pancho so I will have a go.

adamps’s picture

Changed the taxonomy term part to use a view. Not yet done aggregator.

adamps’s picture

Status: Needs review » Needs work

The last submitted patch, 33: entity-base-display-ONLYTESTS-2993642-32.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new18.79 KB
new8.03 KB

Here is the full patch including aggregator

adamps’s picture

Issue tags: -Needs change record

Done CR

adamps’s picture

Assigned: adamps » Unassigned

OK I think that's done. Please can somebody from the community review and set RTBC? NB only the tests have changed.

jonathanshaw’s picture

Status: Needs review » Reviewed & tested by the community

I edited the CR very slightly for clarity. Fix & tests look good to me.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

I think the code change itself is fine. I don't think this patch makes it clear enough that users are expected to make changes before Drupal 9. The patch doesn't mark anything deprecated and doesn't trigger any warnings.

jonathanshaw’s picture

Status: Needs work » Reviewed & tested by the community

@lauriii Thanks for the feedback.

I don't think this patch makes it clear enough that users are expected to make changes before Drupal 9. The patch doesn't mark anything deprecated and doesn't trigger any warnings.

The only change the patch expects users to make before D9 is explained in the CR in this way:

The special variables representing the preprocessed base fields are now optional in templates. ... Contrib theme developers should make the corresponding changes to their templates so that they work correctly if configurable display of base fields is enabled. However the changes are fully back-compatible, so that existing sites that do not enable configurable display of base fields do not need to change templates.

However, I'm guessing this is NOT you're concern. I'm imagining you're thinking that maybe we want to remove these special variables altogether in D9, and you're concerned that we're not properly warning developers about this.

This is a relevant concern, as ultimately we are building towards #3015623: [PP-many] Remove outdated code relating to "Expose Title in Manage Display". The meta issue #2353867: [META] Expose Title and other base fields in Manage Display explains the sequence of steps necessary to get that stage.

The key point for this issue though is that:

1) This issue does nothing for taxonomy and aggregate that has not already been done for node in #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI; this issue simples makes core intenally consistent, and this is worth doing now even if the solution already committed for node is imperfect.

2) If we need to find a way to deprecate or warn about the use of (now optional) variables being supplied to templates, we should create a follow-up issue to figure out how to do that and apply it not only to taxonomy and aggregate but also to node. This is a similar approach to that you recently requested in #2993647: Correctly determine when to display fields as inline where you asked for a follow-up issue to establish how to deprecate templates.

Therefore I'm tentatively suggesting this should be be RTBC; if you concur I will create 2 follow-ups: one to establish a policy on deprecating variables supplied to templates, one to implement it for these base fields.

adamps’s picture

Status: Reviewed & tested by the community » Needs work

I think @laurii has a good point that the todo comments specifically mention code to be removed in D9, yet nothing has been deprecated. We are still quite far from doing any deprecation so this is misleading. I will adjust the comments to remove the specific reference to D9 in the same way that we did on another related issue recently. The new comments will say something like "code will eventually be removed".

Personally I don't favour any more new issues relating to deprecation at this stage because the actual deprecation is so far away and any discussion now would be highly speculative. We are in stage A "preparation". Stage B will add the option to core to enable manage display. Finally stage C "deprecation" will drop support for the old way, remove the option and manage display is always on (hooks can override). So the real challenge will be "how to deprecate a GUI config option". The template, variable and so on will naturally go away once the config option goes away.

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new20 KB
new2.98 KB

New patch removes specific mention of D9. I also fixed the exact same comment for node.html that was added in the related issue #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI.

jonathanshaw’s picture

Status: Needs review » Reviewed & tested by the community

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 42: entity-base-display-2993642-42.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

adamps’s picture

Status: Needs work » Reviewed & tested by the community

Random fail

plach’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update, +Needs change record updates

The patch code looks good to me, aside from a few non-blocking issues (see review below), however I was expecting to see more entity types covered by this patch.

Specifically I was expecting:

  • aggregator item
  • block content (although I can imagine this might be tricky)
  • comment

Can we at least update the IS to explain the rationale behind not addressing those? Given that we have the node part of this already in and that this has a BC-layer in place, I think it should be possible to commit the patch during the alpha window, but we need to make sure core is in a consistent state once beta lands.

For this reason we should either document why it's ok not to convert those entity types or update the patch to handle them.


  1. +++ b/core/modules/aggregator/aggregator.theme.inc
    @@ -34,6 +34,14 @@ function template_preprocess_aggregator_item(&$variables) {
    + * By default this function performs special preprocessing to create a separate
    + * for the title base field. This preprocessing is skipped if:
    

    separate what? :)

  2. +++ b/core/modules/aggregator/aggregator.theme.inc
    @@ -34,6 +34,14 @@ function template_preprocess_aggregator_item(&$variables) {
    + *   hook_entity_type_build().
    
    +++ b/core/modules/taxonomy/taxonomy.module
    @@ -244,6 +244,15 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
    + *   hook_entity_type_build().
    

    hook_entity_type_build() should be used to provide new entity type definitions, not to alter existing ones. For that we have hook_entity_type_alter(). We need to update the CRs (also the node one) to reflect this.

  3. +++ b/core/modules/aggregator/tests/modules/aggregator_feed_display_configurable_test/aggregator_feed_display_configurable_test.module
    @@ -0,0 +1,27 @@
    +  if ($entity_type->id() == 'aggregator_feed') {
    
    +++ b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module
    @@ -0,0 +1,27 @@
    +  if ($entity_type->id() == 'taxonomy_term') {
    

    ===

  4. +++ b/core/modules/aggregator/tests/src/Functional/FeedDisplayConfigurableTest.php
    @@ -0,0 +1,56 @@
    + * @group node
    

    Wrong group

  5. +++ b/core/modules/aggregator/tests/src/Functional/FeedDisplayConfigurableTest.php
    @@ -0,0 +1,56 @@
    +    $assert->elementNotExists('css', 'div.field--name-title');
    
    +++ b/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
    @@ -0,0 +1,59 @@
    +    $assert->elementNotExists('css', 'div.field--name-name');
    

    I'd add an assertion in both cases that the label itself does not exists in the page.

  6. +++ b/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
    @@ -0,0 +1,59 @@
    +use Drupal\Core\Entity\Entity\EntityViewDisplay;
    

    Unused

  7. +++ b/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
    @@ -0,0 +1,59 @@
    +/**
    + * Tests making aggregator_feed base fields' displays configurable.
    + *
    + * @group node
    + */
    +class TermDisplayConfigurableTest extends TaxonomyTestBase {
    

    Wrong PHP doc and @group.

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new19.82 KB
new4.12 KB

Many thanks @plach

however I was expecting to see more entity types covered by this patch...Can we at least update the IS to explain the rationale behind not addressing those?

I have looked and I agree you are right. There is no rationale for not addressing those - just no one noticed it is needed. Fixing this will take some time, maybe tight for D8.7. It would also double the size of the patch which is already fairly large. So it might make sense to add just aggregator item into this issue and alter the title/CR so that this issue covers taxonomy+aggregator. Then we can have another issue for comment/block. What do you think?

New patch fixes the other comments. Well spotted, comments all done except for:

2. According to my reading of the descriptions of those functions, the current code is correct. The comment for hook_entity_type_build() says "Modules may implement this hook to add information to defined entity types," The comment for hook_entity_type_alter() says "Do not use this hook to add information to entity types, unless one of the following is true.." and none of the 3 cases applies here.

5. Done for taxonomy but it's not possible for aggregator because the label is present elsewhere on the page:

<a href="/aggregator/sources/1" title="lO2GJ9eG5T">More<span class="visually-hidden"> posts about lO2GJ9eG5T</span></a>
adamps’s picture

Title: Mechanism to disable preprocessing of base fields in non-node entity types so they can be configured via the field UI » Mechanism to disable preprocessing of base fields in taxonomy and aggregator entity types so they can be configured via the field UI
Issue summary: View changes
Issue tags: -Needs issue summary update
StatusFileSize
new27.4 KB
new14.04 KB

New patch adds aggregator item. It's a bit strange because I can't find the "Manage Display" UI in the GUI and there isn't any default config for aggregator_item.aggregator_item.default so I had to write the tests in a slightly different way.

I have updated the IS so this issue covers taxonomy and aggregator modules. Please let me know if it's OK to use separate issues. If so, I will raise a separate issue for the other modules and update the CR.

plach’s picture

It's ok to address the other modules in separate issues, let's hope we can get that ready before beta as well, thanks!

adamps’s picture

Issue summary: View changes
Issue tags: -Needs change record updates

Thanks @plach.

I have raised #3090187: Mechanism to disable preprocessing of base fields in comment entity type so they can be configured via the field UI for the comment and custom block entity types. I'll see what I can do to get it ready for beta.

I have updated the CR to be correct for this issue. If we get the other one into the same release then I will update the one CR to cover both issues. If not then I'll create a new CR.

Status: Needs review » Needs work

The last submitted patch, 49: entity-base-display-2993642-49.patch, failed testing. View results

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new27.43 KB
new1.1 KB

Status: Needs review » Needs work

The last submitted patch, 53: entity-base-display-2993642-53.patch, failed testing. View results

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new27.42 KB
new1.27 KB

Status: Needs review » Needs work

The last submitted patch, 55: entity-base-display-2993642-55.patch, failed testing. View results

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new30.48 KB
new3.53 KB
adamps’s picture

Latest patch includes 3 more aggregator fields.

Status: Needs review » Needs work

The last submitted patch, 58: entity-base-display-2993642-58.patch, failed testing. View results

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new34.62 KB
new3.78 KB
adamps’s picture

OK this is now ready for community review then set to RTBC please.

jonathanshaw’s picture

Status: Needs review » Reviewed & tested by the community

Heroic work, Adam.

+++ b/core/modules/aggregator/aggregator.module
@@ -121,16 +119,45 @@ function aggregator_entity_extra_field_info() {
+      'weight' => 2,

Weight 2 is used for image above; not sure if this matters.

adamps’s picture

Thanks @jonathanshaw

This patch doesn't alter the weights in aggregator.module it just wraps code in if statements. The weights are different for the two different entities: item and feed.

jonathanshaw’s picture

Ah, of course.

plach’s picture

I agree with @lauriii that we need to find a way to mark the stuff that is meant to be removed in #3015623: [PP-many] Remove outdated code relating to "Expose Title in Manage Display" as deprecated and warn users about it. I don't think it will be possible to remove from D9 code that was not deprecated in 8.8, worst case it'll happen in D10.

Anyway, given that the corresponding node changes are already committed, I don't think we have good reasons to hold up this improvement. The latest patch looks good to me, thanks!

  • plach committed 9451d02 on 9.0.x
    Issue #2993642 by AdamPS, Pancho, jonathanshaw: Mechanism to disable...

  • plach committed 7848d96 on 8.9.x
    Issue #2993642 by AdamPS, Pancho, jonathanshaw: Mechanism to disable...

  • plach committed f4d334e on 8.8.x
    Issue #2993642 by AdamPS, Pancho, jonathanshaw: Mechanism to disable...
plach’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

Applied the following diff and committed/pushed 9451d02 to 9.0.x and friends. Thanks!

diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorDisplayConfigurableTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorDisplayConfigurableTest.php
index bd8f1263a7..0a2dcb652b 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorDisplayConfigurableTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorDisplayConfigurableTest.php
@@ -13,6 +13,9 @@
  */
 class AggregatorDisplayConfigurableTest extends AggregatorTestBase {
 
+  /**
+   * {@inheritdoc}
+   */
   protected function setUp() {
     parent::setUp();
plach’s picture

Published the CR.

plach’s picture

Please let's add a release notes snippet to the IS.

adamps’s picture

Issue summary: View changes

Great thanks @plach. I added the release note snippet.

I would be very interested to discuss the deprecation strategy. I don't believe that we can deprecate anything yet. The special handling of base fields is undesirable in the long term, but for now it's the default approach in Drupal Core. Currently the alternative preferred approach requires a Contrib module.

I believe the sequence of events that allows for deprecation following with the current Drupal policy is as described in the parent #2353867: [META] Expose Title and other base fields in Manage Display:

  • Phase A: Fix obstacles preventing manage display in contrib. We have now fixed 2 and there are 3 remaining. 2 of those are RTBC so if anyone can help commit them it would be great.
  • Phase B: Enable manage display in Core. This is the point where we can mark the old code as deprecated because now there is an alternative in Core. I imagine this phase could be completed in D9.
  • Phase C: #3015623: [PP-many] Remove outdated code relating to "Expose Title in Manage Display". Yes this is likely to need to be D10.

Does this make sense? Do you see any better way?

  • alexpott committed 49891d0 on 9.0.x
    Issue #2993642 follow-up: Fix test module installation
    

  • alexpott committed 7ad2889 on 8.9.x
    Issue #2993642 follow-up: Fix test module installation
    
    (cherry picked...

wim leers’s picture

AFAICT this broke 9.0.x HEAD: https://www.drupal.org/pift-ci-job/1461889, all my recent patches are failing. Ah … literally 4 minutes ago, https://git.drupalcode.org/project/drupal/commit/49891d0 was pushed to fix that 🥳

wim leers’s picture

I … don't know how I managed to credit Alex Pott without clicking anything. I guess I cross-posted?

jonathan1055’s picture

The commits in #74 have removed Core: 8.x from the new test module's .info.yml. So now when I run a test for my contrib module at core 8.9 on Drupal.org or Travis, every test fails with

Drupal\Core\Extension\InfoParserException: The 'core' or the 'core_version_requirement' key must be present in 
core/modules/aggregator/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.info.yml

I was alerted to this by Travis cron run an hour ago. See manual test run https://www.drupal.org/pift-ci-job/1462019

This is caused by the check in InfoParserDynamic parse()
https://git.drupalcode.org/project/drupal/blob/8.9.x/core/lib/Drupal/Cor...

Could you explain the reason for deleting the "core 8.x' line? Currently all my contrib testing at 8.9 is broken and I don't think my module is unique in this. Hopefully there is a good solution. Thanks.

Jonathan

  • plach committed 8daa9f4 on 8.9.x
    Revert "Issue #2993642 follow-up: Fix test module installation"
    
    This...
plach’s picture

@jonathan1055:

Thanks for the heads up, I think the previous fix was meant to be applied only to 9.0.x. I just reverted it on 8.9.x, which should start working again now.

jonathan1055’s picture

Thanks @plach, yes it did look like an incorrect deletion of that line. I have just re-run the 8.9 tests on Drupal.org and Travis, and all is back to normal, all passing. Auto e-mail alerts for test failures are a great thing.

Jonathan

xjm’s picture

Checked with @plach; this change is non-disruptive and therefore more of a release highlight.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.