Problem/Motivation

hook_field_attach_validate() allows modules to add their own validation for field values. However, the hook is not provided with the original values for the field, which means that in order to validate changes to values, one has to load the entity in the validation hook, something like the following:

 function mymodule_field_attach_validate($entity_type, $entity, &$errors) {
   // Check for a pre-existing entity (i.e., the entity is being updated).      
   list($entity_id, , $bundle) = entity_extract_ids($entity_type, $entity);
   if ($entity_id) {
    // This is gross.
     $orig_entity = entity_load($entity_type, array($entity_id));
     $orig_entity = $orig_entity[$entity_id];
   }
   else {
     $orig_entity = FALSE;
   }

  // Now do stuff.
}

Furthermore, even the above workaround will not work for user profile forms, because the $entity does not even include the uid in that case.

Proposed resolution

Pass the original values to hook_field_attach_validate() in $entity->original.

The orignal values are not directly available in field_attach_validate(), but they were presumably available to that function's caller. The only caller in core is field_attach_form_validate(), which has both new and original values in the form data.

Remaining tasks

Review proposed solution and patch.

Related issues:

User interface changes

None.

API changes

None. (The actual entity is not being altered; only the "pseudo entity" used during validation.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcingy’s picture

You could even append the old entity onto $entity in a similar way to node_save -

if (!empty($node->nid) && !isset($node->original)) {
  $node->original = entity_load_unchanged('node', $node->nid);
}

Using this approach would remove the need for an api change.

xjm’s picture

Edit: I think I misunderstood what you were saying. You are suggesting that the entity be in $entity->original before it gets passed on to field_attach_validate()?

marcingy’s picture

Yes given that is the pattern already used in core.

xjm’s picture

Just noticed that when editing user profiles for existing users, the uid isn't even in the entity during field validation. So the example in the original post won't even work in all cases, because the entity object is not necessarily complete.

xjm’s picture

Issue summary: View changes

Purely cosmetic markup change.

xjm’s picture

Status: Active » Needs review
FileSize
720 bytes
xjm’s picture

Issue tags: +Needs backport to D7

Tagging.

xjm’s picture

Issue summary: View changes

Added note that it doesn't even work for users; updated with new recommended solution.

xjm’s picture

xjm’s picture

Issue summary: View changes

Added clarification as to why this is not a true entity property addition.

xjm’s picture

By the way, I think that $form_state['build_info']['args'][0]; is not a good solution--or at least needs a better comment--but unsure yet what a better fix might be.

BTMash’s picture

Status: Needs review » Needs work

Much like for #1170198: The build variable name for the entity should be the same regardless of type of entity., having a variable with the original entity would be an easier way to go than what looks a bit like magic. What if the various entities on their form() functions added in a form_state['previous_entity'] = $form_state[$entity_type] = $entity. Some logic of $form_state[$entity_type] = $entity seems to already be in place so adding this seems pretty trivial. I'm marking as 'needs work' just to get more ideas about.

BTMash’s picture

Status: Needs work » Needs review
FileSize
2.78 KB

To get conversation going further, here is an initial patch. Hopefully, it helps in getting things going in the right direction. One caveat that I see is that any non-core modules that implement forms for their entities will also need this piece in there. So we'll need to figure out a way to document this for other developers as well.

sun’s picture

if at all, then it would have to be in $form_state, not in the $form structure

BTMash’s picture

Let's give this another try :) This now has the change to common.inc to be able to utilize the previous values of entity.

xjm’s picture

I think this is a pattern that could hold us over until we (hopefully) have some standardized entity form handling from some of the core initiatives. It's also something we could build on to fix #1261310: uid is not available in hook_field_attach_validate() (by merging in the default values from the entity, thereby providing the uid in the field attach hooks). Certainly it's a lot better than using some bizarre, obscure thing from the build args. :) Interested to see what sun thinks.

xjm’s picture

Issue summary: View changes

Updated issue summary.

sun’s picture

Status: Needs review » Needs work
+++ b/includes/common.inc
@@ -7646,6 +7646,7 @@ function entity_form_field_validate($entity_type, $form, &$form_state) {
+  $pseudo_entity->entity_original = $form_state['entity_original'];

In _save() operations we already have a notion of "original entities", and those are consistently stored/provided in a ->original property.

+++ b/modules/comment/comment.module
@@ -1840,6 +1840,7 @@ function comment_form($form, &$form_state, $comment) {
     $comment = $form_state['comment'];
   }
+  $form_state['entity_original'] = $comment;

For D8, 'entity_original' is probably OK, as I think our goal should be to standardize entity form processing to consistently work on 'entity' instead of the '[entitytypename]'.

For D7, however, we probably want to stay consistent with current $form_state keys; i.e., 'comment_original', etc.

27 days to next Drupal core point release.

xjm’s picture

For D7, however, we probably want to stay consistent with current $form_state keys; i.e., 'comment_original', etc.

Maybe this plus something like in #1170198: The build variable name for the entity should be the same regardless of type of entity.? Or is that too much redundancy?

xjm’s picture

Status: Needs work » Needs review
FileSize
3.37 KB

Here's a D8 version that just renames the original entity to $pseudo_entity->original per #14.

xjm’s picture

Couple of potential followup issues:

  1. I noticed user_register_form() and user_account_form() use $form['#user'] instead of $form_state['user']; perhaps we should add $form_state['user'] and the same note about deprecation as in user_profile_form. Could be a good novice issue. Edit: #1267978: Clean up use of $form['#user'].
  2. Could also open a followup issue renaming stuff to $form_state['entity'] everywhere in D8; not sure if that would be worthwhile or not as a first step toward generic entity form building. Ideally I think that some generic base class would provide a $entity->form() or suchlike.
xjm’s picture

D7 variant that uses the pattern $form_state['entitytype_original'] as per #14.

Edit: just realized we need to check whether this thing is empty before setting it or it will cause notices for contrib/custom entities.

xjm’s picture

Checking that the original entity is there before setting it.

xjm’s picture

D8 version that also checks if the original entity is non-empty.

BTMash’s picture

For term (in patch #19), I believe the entity_type being passed should be 'taxonomy_term' so you have $form_state['taxonomy_term_original'] = $term; based on what I see in http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.admin.inc/f...? Other than that, the backport looks great. The D8 patch also looks sound.

xjm’s picture

For term (in patch #19), I believe the entity_type being passed should be 'taxonomy_term' so you have $form_state['taxonomy_term_original'] = $term; based on what I see in http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.admin.inc/f...? Other than that, the backport looks great. The D8 patch also looks sound.

Hmm, this would put us in the same situation as in #1170198: The build variable name for the entity should be the same regardless of type of entity., if the entity type is taxonomy_term and the form component is $form_state['term']. So we either need that extra, redundant key as in #1170198: The build variable name for the entity should be the same regardless of type of entity. that indicates what the name of the entity form component is, or to just go with the generic entity_original in D7 as well.

pav’s picture

Just tried applying the patch (#19). Returns

$ sudo patch  common.inc common.patch
patching file common.inc
Hunk #1 succeeded at 7647 (offset 2 lines).
patching file common.inc
Hunk #1 succeeded at 1870 with fuzz 2 (offset 30 lines).
patching file common.inc
Hunk #1 succeeded at 289 with fuzz 2 (offset -56 lines).
patching file common.inc
Hunk #1 succeeded at 214 with fuzz 2 (offset 118 lines).
patching file common.inc
Hunk #1 succeeded at 671 with fuzz 2 (offset 7 lines).
patching file common.inc
Hunk #1 FAILED at 3687.
1 out of 1 hunk FAILED -- saving rejects to file common.inc.rej
patching file common.inc
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 245 with fuzz 2 (offset -6 lines).

I've renamed the patch, but otherwise it is unaltered. I'm pretty new at this. Have I got something wrong?

xjm’s picture

Status: Needs review » Needs work

@pav: The messages you got indicate the patch needs to be rerolled. I'll do so. And then do so again after #22336: Move all core Drupal files under a /core folder to improve usability and upgrades. :)

xjm’s picture

Status: Needs work » Needs review
FileSize
3.46 KB

Failed hunk was due to entity code being moved into its own module. Patch below fixes this.

pav’s picture

Hi, xjm. Thanks for the reply and the trouble, but #19 was a D7 variant rather than a D8 one.

PS. I don't know if this is of any use to you, but I came to try to install this patch, because another patch for the D7 version of og_create_perms.module requires it. http://drupal.org/node/1220212#comment-5181306

xjm’s picture

Hmm, I was able to apply #19 to the 7.x branch with just offset. In any case, here's a reroll. Note that it is against the current 7.x branch, which means it's for the 7.x-dev version of Drupal.

Is there an issue for the module you mention that references this one?

BrightBold’s picture

Patch from #27 applied cleanly for me on D7.9.

I am also chasing down the set of errors reported in the OG Create Permissions issue mentioned in #26, #1321028: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids(). In that issue, mrfelton offers a patch that relies on the patch in this issue. (And the reason I care about that issue is that I'm hoping it's at the root of #1275152: EntityMalformedException error on Content Translation Upgrade with Drupal 7.8. Aah, the fun of cascading errors!)

pav’s picture

Issue tags: -Needs backport to D7 +undefined

xjm, same issue. I'm sure this is connected to how I was applying the patch - from inside the includes directory, using
patch commons inc form_orig_entity_12220212_25-d7.patch
I've tried doing it from drupal's home directory with
patch -p0 < form_orig_entity_12220212_25-d7.patch
but with even poorer results. Could you advise on the correct way to apply the patch. Thanks,

Pav

xjm’s picture

Issue tags: -undefined +Needs backport to D7

The patch was created with git. Place the file in the root of your Drupal installation and use the -p1 option:
patch -p1 < form_orig_entity_12220212_25-d7.patch
See also: http://drupal.org/patch

Also, if you are testing the patch on D7, please make note of the questions in #21 and #22.

xjm’s picture

Rerolled for core/ directory.

pav’s picture

thanks, xjm. The D7 patch applied smoothly and, so far, working like a dream. :-)

pav’s picture

Your patch, for me, fixes the problem with og_create_perms, but I've just spotted another situation which throws up a similar set of error messages, which also look like an og/entities conflict. Thought this might be of some use to you... After trying to set a group context filter for a panel layout, on page load I get

Notice: Trying to get property of non-object in og_context_create_og_group() (line 199 of /var/www/sheffieldfencing/sites/all/modules/og/og_context/og_context.module).
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 184 of /var/www/sheffieldfencing/sites/all/modules/entity/includes/entity.controller.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /var/www/sheffieldfencing/includes/entity.inc).
Notice: Trying to get property of non-object in og_context_create_og_group() (line 199 of /var/www/sheffieldfencing/sites/all/modules/og/og_context/og_context.module).
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 184 of /var/www/sheffieldfencing/sites/all/modules/entity/includes/entity.controller.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /var/www/sheffieldfencing/includes/entity.inc).
xjm’s picture

Regarding #33, you'll probably want to file that in the queue for that OG module. :)

pav’s picture

Cool. Issue in #33 filed at http://drupal.org/node/1328264.

othermachines’s picture

Patch from #27 got rid of the following issue for me in 7.8:

http://drupal.org/node/1324748

Darn. Scratch that.

xjm’s picture

BTMash’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +API addition, +Needs backport to D7

The last submitted patch, d8_form_orig_entity_12220212-POST-APOCALYPSE.patch, failed testing.

xjm’s picture

Issue tags: +Novice

Needs another reroll, I guess. Tagging novice for that task.

oriol_e9g’s picture

Status: Needs work » Needs review
FileSize
3.6 KB

Reroll

xjm’s picture

Issue tags: -Novice

Thanks @oriol_e9g!

Still needs an automated test that takes advantage of this property for various entity types.

adharris’s picture

Assigned: Unassigned » adharris

I'll work on getting some tests for this.

adharris’s picture

These should work, but I was a bit unsure the best place to put the tests for this, so if anyone has feedback on a better place to put them let me know and I'll adjust.

BrightBold’s picture

Would someone be willing to reroll for D7? Thanks!

xjm’s picture

@BrightBold: The issue is against 8.x, but it is tagged "needs backport to D7." This means that, if the patch is accepted, a D7 patch will be created and committed once the D8 change is finalized.

xjm’s picture

Status: Needs review » Needs work

Thanks @adharris! The test coverage there looks correct and thorough. I reviewed and have one remark about the placement of the tests, plus a few minor points for cleanup.

  1. +++ b/core/modules/field/tests/field.testundefined
    @@ -637,6 +637,11 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +  function setUp() {
    ...
    +    parent::setup('comment', 'taxonomy');
    

    Hmm, I'm not sure it's wise to add this to an existing class. I think we should either create our own subclass of FieldAttachTestCase, or place the tests in comment.test, taxonomy.test, etc. (The latter is probably more correct, since we are relying on specific implementations provided by these entity modules rather than the base entity class... but of course it's less practical. And also I could be totally wrong, so maybe let's go with the simpler option for now.)

  2. +++ b/core/modules/field/tests/field.testundefined
    @@ -637,6 +637,11 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +    // Comment and taxonomy are required to test hook_field_attach_validate.
    
    @@ -948,7 +953,58 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +      // The field_test module uses drupal_set_message to indicate that the
    

    drupal_set_message() and hook_field_attach_validate() should have parens in the comments here to clearly indicate that they are function names.

  3. +++ b/core/modules/field/tests/field.testundefined
    @@ -948,7 +953,58 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +   * Test hook_field_attach_validate()
    

    Should begin with "Tests" (rather than "Test") and end in a period. Reference: http://drupal.org/node/1354#functions

  4. +++ b/core/modules/field/tests/field.testundefined
    @@ -948,7 +953,58 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +    foreach($entity_types as $entity_type => $entity_create_page) {
    

    missing space after foreach here. (It's a language construct rather than a function, so it follows the standard for control structures.)

  5. +++ b/core/modules/field/tests/field.testundefined
    @@ -948,7 +953,58 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +      $this->assertNoText('Orginial entity missing in hook_field_attach_validate for ' . $entity_type, 'Original entity missing for ' . $entity_type);
    

    The assertion message here should be what is displayed when the assertion is true... so, in this case, it's actually that the original entity is present. (It's when the assertion fails that the original entity is missing.)

  6. +++ b/core/modules/field/tests/field_test.moduleundefined
    @@ -261,3 +261,14 @@ function field_test_field_widget_form_alter(&$element, &$form_state, $context) {
    +  drupal_set_message('hook_field_attach_validate runs for ' . $entity_type);
    ...
    +    drupal_set_message('Orginial entity missing in hook_field_attach_validate for ' . $entity_type);
    

    As above, in these messages (and the assertions that test for them), there should be parens on hook_field_attach_validate() to indicate that it's a function.

    Also, we should probably use format_string() to place the $entity_type in the message (both here and in the assertions that test for these messages).

adharris’s picture

Assigned: Unassigned » adharris

@xjm Thanks for the feedback, I'll make the above changes.

In response to your first point: it seems to me that if the individual tests are moved to their respective components, there would have to be a test class in each of comment, taxonomy, etc that loads field and field_test. For some reason that seems just as odd as loading those modules in field.test. I'll move the test case into it's own class and see how that looks.

adharris’s picture

This moves the tests to their own class, but leaves them in field.test. Also fixes the code style issues from #47.

adharris’s picture

Status: Needs work » Needs review

And I forgot to queue for testing.

xjm’s picture

Thanks @adharris. The latest patch looks good to me except for a few minor style issues (and one question):

  1. +++ b/core/modules/field/tests/field.testundefined
    @@ -1018,6 +1018,74 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +class FieldAttachHookTestCase extends FieldAttachTestCase {
    

    We need to add a docblock for the new class, with a summary something like: "Tests field attach hooks for multiple core entity types."

  2. +++ b/core/modules/field/tests/field.testundefined
    @@ -1018,6 +1018,74 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +   * Tests hook_field_attach_validate()
    

    Still missing a period here.

  3. +++ b/core/modules/field/tests/field.testundefined
    @@ -1018,6 +1018,74 @@ class FieldAttachOtherTestCase extends FieldAttachTestCase {
    +      $this->assertText(format_string('hook_field_attach_validate() runs for !entity_type', array('!entity_type' => $entity_type)), 'hook_field_attach_validate() runs for ' . $entity_type);
    +      $this->assertNoText(format_string('Orginial entity missing in hook_field_attach_validate() for ', array('!entity_type' => $entity_type)), 'Original entity present in hook_field_attach_validate() for ' . $entity_type);
    

    I was about to say the message texts here should also use format_string(), but, looking at this now, I realize we can probably just leave off the message parameter entirely here. The default message will be informative enough and save us this redundancy. :) (See the assertTextHelper() docs for the message it will display.) What do you think?

  4. +++ b/core/modules/field/tests/field_test.moduleundefined
    @@ -261,3 +261,14 @@ function field_test_field_widget_form_alter(&$element, &$form_state, $context) {
    +    drupal_set_message(format_string('Orginial entity missing in hook_field_attach_validate() for ', array('!entity_type' => $entity_type)));
    

    Looks like this message is missing the placeholder. (Oops!)

Leaving at NR for others to weigh in on the question of test placement. (I also probably can't RTBC this since it started out as my patch.)

xjm’s picture

Status: Needs review » Needs work

Actually I realize now my 4th point interferes with the test coverage, so marking NW for that.

adharris’s picture

Assigned: adharris » Unassigned
Status: Needs work » Needs review
FileSize
2.47 KB
7.72 KB
4.12 KB

I swear I check for the code styles before I do these. Don't know how i miss so many things like that :).

xjm’s picture

Alright, everything in #53 looks correct to me now, and the test-only patch shows the correct assertion failures.

agentrickard’s picture

Status: Needs review » Needs work

There's a typo in the test function field_test_field_attach_validate().

('Orginial entity
xjm’s picture

Issue tags: +Novice

@agentrickard also said in IRC that the patch looks good to him other than that, so let's have someone clean up that minor issue and I think this is RTBC. Thanks!

agentrickard’s picture

Yes. I had to run. But it is RTBC except for typos.

adharris’s picture

Status: Needs work » Needs review
Issue tags: -Novice
FileSize
7.72 KB

fixed the typo

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community
fago’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/comment/comment.module
@@ -1685,6 +1685,7 @@ function comment_form($form, &$form_state, $comment) {
+  $form_state['entity_original'] = $comment;
 
   $node = node_load($comment->nid);
   $form['#node'] = $node;
diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module

diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module
index 9b2b6f2..0282a63 100644

index 9b2b6f2..0282a63 100644
--- a/core/modules/entity/entity.module

--- a/core/modules/entity/entity.module
+++ b/core/modules/entity/entity.module

+++ b/core/modules/entity/entity.module
+++ b/core/modules/entity/entity.module
@@ -424,6 +424,9 @@ function entity_form_field_validate($entity_type, $form, &$form_state) {

@@ -424,6 +424,9 @@ function entity_form_field_validate($entity_type, $form, &$form_state) {
   // until we have fully validated the submitted input. Therefore, for
   // validation, act on a pseudo entity created out of the form values.
   $pseudo_entity = (object) $form_state['values'];
+  if (!empty($form_state['entity_original'])) {
+    $pseudo_entity->original = $form_state['entity_original'];
+  }

This won't be the original entity. If the form is reloaded multiple times it's the entity before the last reload.

entity_load_unchanged() should be used for retrieving the original entity, however it should be done only once. Thus $entity->original has the be already populated before doing the entity-save to avoid loading the original twice.

We could also save the original entity during the *whole* form workflow (as this patch tried too). Still, then the original entity should be pre-populated before saving so the same original is available during presave/insert/udpate hooks.

HongPong’s picture

This may be a tangent but if you have malformed files entities - see #1446440: Unable to view me media management pages (EntityMalformedException: Missing bundle property...) for my one-off SQL fix for column type in the files_managed table.

HongPong’s picture

Issue summary: View changes

Adding related meta issue to summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)

In https://www.drupal.org/node/1882428 looks like the function in question has changed.

So wonder if still a valid task?

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.