Problem/Motivation

We have \Drupal\node\ContextProvider\NodeRouteContext that can be used in ConditionPlugin(for example).
But we haven't analogs to another entities. Taxonomy term is very essential page/route and this Context can be useful for Drupal DX.

Proposed resolution

Provide new service in taxonomy module.

Remaining tasks

  1. Write code
  2. Write tests

User interface changes

No.

API changes

New service.

Data model changes

No.

Release note snippet

A taxonomy term route context provider has been added, see the change record for more details.

CommentFileSizeAuthor
#93 core-Term_route_context-2998826-93.patch12.58 KBjames.williams
#2 drupal-term_route_context-2998826-initial.patch2.72 KB5n00py
#3 drupal-term_route_context-2998826-3.patch2.72 KB5n00py
#7 2998826-7.patch2.76 KBhctom
#10 term_route_context-2998826-10.patch2.79 KBchipway
#12 term_route_context-2998826-12.patch2.76 KBchipway
#14 term_route_context-2998826-13.patch2.74 KBhctom
#14 interdiff-12-13.txt549 byteshctom
#16 term_route_context-2998826-16.patch2.76 KBhctom
#16 interdiff-12-16.txt988 byteshctom
#17 interdiff-12-17.txt1.14 KBhctom
#17 interdiff-16-17.txt583 byteshctom
#17 term_route_context-2998826-17.patch2.8 KBhctom
#22 interdiff-17-22.txt955 byteshctom
#22 term_route_context-2998826-22.patch3.06 KBhctom
#27 term_route_context-2998826-27.patch3.08 KBmpolishchuck
#28 interdiff-22-27.txt755 byteshctom
#30 term_route_context-2998826-30.patch3.1 KBevilehk
#30 interdiff-27-30.txt1.1 KBevilehk
#31 term_route_context-2998826-31.patch5.58 KBevilehk
#31 interdiff-30-31.txt2.91 KBevilehk
#38 2998826-38.patch5.58 KBhctom
#38 interdiff-31-38.txt1.37 KBhctom
#39 interdiff-31-38.txt1.37 KBhctom
#43 2998826-term-43.patch12.42 KBtim.plunkett
#43 2998826-term-43-interdiff.txt12.78 KBtim.plunkett
#44 2998826-term-44.patch12.55 KBevilehk
#44 interdiff-43-44.txt1.39 KBevilehk
#46 core-Term_route_context-2998826-d9-45.patch12.52 KBpaulocs
#48 core-Term_route_context-2998826-d9-46.patch12.53 KBpaulocs
#48 interdiff.txt548 bytespaulocs
#51 interdiff.txt764 bytespaulocs
#51 core-Term_route_context-2998826-d9-51.patch11.45 KBpaulocs
#59 2998826-59.patch11.96 KBravi.shankar
#61 interdiff-51-59.txt2.51 KBpaulocs
#63 core-Term_route_context-2998826-d9-63.patch12.53 KBevilehk
#63 interdiff-51-63.txt2.42 KBevilehk
#65 core-Term_route_context-2998826-d9-65.patch12.57 KBevilehk
#65 interdiff-63-65.txt837 bytesevilehk
#68 inerdiff-63-65.txt1.9 KBpaulocs
#74 2998826-by-hctom-evilehk-paulocs-5n00py-chipwa.patch13.05 KBsylus

Issue fork drupal-2998826

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

5n00py created an issue. See original summary.

5n00py’s picture

5n00py’s picture

StatusFileSize
new2.72 KB
cilefen’s picture

cilefen’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: drupal-term_route_context-2998826-3.patch, failed testing. View results

hctom’s picture

Status: Needs work » Needs review
StatusFileSize
new2.76 KB

The provided patch is not applyable via Composer because it was created relative to the core directory. Here is a new patch that should work with Composer

hctom’s picture

Status: Needs review » Needs work

The last submitted patch, 7: 2998826-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

chipway’s picture

Status: Needs work » Needs review
StatusFileSize
new2.79 KB

Here is a new patch to change deprecated ContextDefinition to EntityContextDefinition.

Please review.

Status: Needs review » Needs work

The last submitted patch, 10: term_route_context-2998826-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

chipway’s picture

StatusFileSize
new2.76 KB

New patch.

chipway’s picture

Status: Needs work » Needs review
hctom’s picture

StatusFileSize
new2.74 KB
new549 bytes

Just found an unused use statement, that I removed as well with this updated patch

Status: Needs review » Needs work

The last submitted patch, 14: term_route_context-2998826-13.patch, failed testing. View results

hctom’s picture

Status: Needs work » Needs review
StatusFileSize
new2.76 KB
new988 bytes

I just found some more occurrences of node in the comments, so here is a new patch, also fixing them - so forget about the last submitted patch.

hctom’s picture

StatusFileSize
new2.8 KB
new1.14 KB
new583 bytes

I finally made it to use the context in one of my projects and found a missing use statement. So here is an updated patch fixing the associated PHP error

5n00py’s picture

Looks good.
Do we need some tests ?

hctom’s picture

I guess so. I tried to figure out how the node module tests its context provider, but I did not find any clue about it. If you have any idea, please let me know ;)

rlhawk’s picture

I don't see any tests specific to the Node Route context.

One thing I noticed about the definition for that context, though, is that there is special consideration given for the node.add route:

    elseif ($this->routeMatch->getRouteName() == 'node.add') {
      $node_type = $this->routeMatch->getParameter('node_type');
      $value = Node::create(['type' => $node_type->id()]);
    }

Perhaps this should be implemented for the Term Route context also, although the route would need to be "entity.taxonomy_term.add_form".

andyg5000’s picture

Issue tags: +Needs tests

Commerce module provides good examples of testing context. #2984280: Allow SKU to be used in loadFromContext has an example of a test I wrote to extend their context. Thanks for the work on this!

hctom’s picture

StatusFileSize
new3.06 KB
new955 bytes

Okay, so first, here is an updated patch with the context for the entity.taxonomy_term.add_form route.

@andyg5000: Thanx for your input regarding tests, but isn't that a completely different scenario in your patch? It takes a value from an URL query string parameter there and calls a variation storage method to get the comparison value. I think this does not cover the context provider case we have here, or am I wrong?

hctom’s picture

Reorder files correctly ;)

andyg5000’s picture

Hey @hctom, you're correct, sorry for the confusion. I forgot that test is expecting a query parameter. I couldn't find an example in the node module either. If I find a better example or can hack out the test myself, I'll report back.

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mpolishchuck’s picture

Hello everyone.
Glad to see that somebody has created this issue already (I mean I'm not only who needs it).
After reading the patch in #22 I have only one question.
Why does context provider create context named term, but not taxonomy_term? The entity type is named taxonomy_term. And if we look in contrib modules (I've looked into webform and commerce), the contexts always named the same as entity type. Is there specific reason to name it term, but not taxonomy_term? Or it is just mistake?

mpolishchuck’s picture

StatusFileSize
new3.08 KB

Adding updated version of the patch. It's exactly the same as #22, but creates taxonomy_term instead of term.

hctom’s picture

StatusFileSize
new755 bytes

That's a good point and I am not really sure, why this was in the code like that ;) I guess it was a leftover from the initial patch. But I just checked your patch and it still seems to work without problems, so I am just uploading the missing interdiff here, to allow easy code comparison between patches.

hctom’s picture

...and lets hide some old patch versions ;)

evilehk’s picture

StatusFileSize
new3.1 KB
new1.1 KB

The patch from #27 rebased against 8.8.x.

evilehk’s picture

StatusFileSize
new5.58 KB
new2.91 KB

Adds Kernel test covering TermRouteContext class.

5n00py’s picture

Looks good. +1 for rtbc.

fallenturtle’s picture

I can confirm path 31 worked for me. Does something else need to happen before its changed to RTBC?

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.

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Good job here! This looks really good to me. It has tests and works well so let's go RTBC!

I did a side-by-side comparison with \Drupal\node\ContextProvider\NodeRouteContext and these two classes are quite similar. It should open a way to a standardisation in a follow-up (that might already exist).


One nitpick that can be fixed on commit, though: uses are supposed to be sorted alphabetically.

+++ b/core/modules/taxonomy/src/ContextProvider/TermRouteContext.php
@@ -0,0 +1,74 @@
+use Drupal\Core\Plugin\Context\Context;
+use Drupal\Core\Plugin\Context\EntityContext;
+use Drupal\Core\Plugin\Context\EntityContextDefinition;
+use Drupal\Core\Plugin\Context\ContextProviderInterface;

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 31: term_route_context-2998826-31.patch, failed testing. View results

hctom’s picture

Give me a second, and I'll give you an updated patch ;)

hctom’s picture

Status: Needs work » Needs review
StatusFileSize
new5.58 KB
new1.37 KB

...and here it is ;) Use statements should be sorted correctly now and deprecation notices should be gone.

hctom’s picture

StatusFileSize
new1.37 KB

Whoops.. I created the interdiff the wrong way around, so here is the correct one!

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community

Still looks good and tests are green so back to RTBC!
Thanks

catch’s picture

+++ b/core/modules/taxonomy/src/ContextProvider/TermRouteContext.php
@@ -0,0 +1,74 @@
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getRuntimeContexts(array $unqualified_context_ids) {
+    $result = [];
+    $context_definition = EntityContextDefinition::create('taxonomy_term')->setRequired(FALSE);
+    $value = NULL;
+    if (($route_object = $this->routeMatch->getRouteObject()) && ($route_contexts = $route_object->getOption('parameters')) && isset($route_contexts['taxonomy_term'])) {
+      if ($term = $this->routeMatch->getParameter('taxonomy_term')) {
+        $value = $term;
+      }
+    }
+    elseif ($this->routeMatch->getRouteName() == 'entity.taxonomy_term.add_form') {
+      $vocabulary = $this->routeMatch->getParameter('taxonomy_vocabulary');
+      $value = Term::create(['vid' => $vocabulary->id()]);
+    }
+
+    $cacheability = new CacheableMetadata();
+    $cacheability->setCacheContexts(['route']);
+
+    $context = new Context($context_definition, $value);
+    $context->addCacheableDependency($cacheability);
+    $result['taxonomy_term'] = $context;
+

Is there logic here that we could move to a trait or base class and re-use in the node route context or other ones? Not sure it's worth the effort of making it generic, but maybe?

catch’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs change record, +Needs release note
tim.plunkett’s picture

StatusFileSize
new12.42 KB
new12.78 KB

Trait didn't work as well as a base class did. Maybe it's overkill, idk.

evilehk’s picture

StatusFileSize
new12.55 KB
new1.39 KB

I think the recent changes to move the entity route context into a base class is great and not an overkill at all! It prevents the mostly duplicate code between NodeRouteContext and TermRouteContext. There was a variable named 'term' in EntityRouteContextBase that I changed to 'entity'. I also added a @throws tag to the getEntityType() method in EntityRouteContextBase. The tests pass on my machine. Patch and interdiff attached.

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

paulocs’s picture

StatusFileSize
new12.52 KB

Patch #45 looks good.
I really think this issue is important.
Here is the patch re-rolled for 9.1.x-dev.

Status: Needs review » Needs work

The last submitted patch, 46: core-Term_route_context-2998826-d9-45.patch, failed testing. View results

paulocs’s picture

Status: Needs work » Needs review
StatusFileSize
new12.53 KB
new548 bytes

New patch.

evilehk’s picture

Status: Needs review » Reviewed & tested by the community

Tests pass and the patch and interdiff look good. Setting back to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/node/node.post_update.php
@@ -34,3 +34,10 @@ function node_post_update_configure_status_field_widget() {
+/**
+ * Clear caches to update the node context provider service definition.
+ */
+function node_post_update_update_context_provider() {
+  // An empty update will flush caches.
+}

+++ b/core/modules/taxonomy/taxonomy.post_update.php
@@ -253,3 +253,10 @@ function taxonomy_post_update_configure_status_field_widget(&$sandbox = NULL) {
+/**
+ * Clear caches to discover new taxonomy term context provider.
+ */
+function taxonomy_post_update_add_context_provider() {
+  // An empty update will flush caches.
+}

Are these necessary? A container rebuild will occur when this is shipped in the new minor - the drupal version is part of the container cache key. I think only a container rebuild is necessary here.

paulocs’s picture

Status: Needs work » Needs review
StatusFileSize
new764 bytes
new11.45 KB

Follow a new patch without code from comment #50.
This was only inserted to refresh cache because it was needed to add an argument in the service definition file, but if

A container rebuild will occur when this is shipped in the new minor

, it makes sense to remove it.

Change to needs review again.

Cheers,
Paulo!

thalles’s picture

Status: Needs review » Reviewed & tested by the community

Works fine to me!
Thanks every one!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

We still need a change record and a release note snippet as per #42.

paulocs’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

Just created the change record.
See in: https://www.drupal.org/node/3160602

alexpott’s picture

@paulocs it would be great if the CR could also cover what this change enables.

paulocs’s picture

Hey @alexpott,

I edited the CR and added this line:

This change enable taxonomy terms to have a context plugin based on their route like nodes already had.

Is it enough? If there is any other problem with the English or any suggestion, please let me know.

Cheers,
Paulo.

tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
ravi.shankar’s picture

Assigned: Unassigned » ravi.shankar
ravi.shankar’s picture

Assigned: ravi.shankar » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new11.96 KB

Here I have tried to reroll patch #51.

hctom’s picture

Status: Needs review » Needs work

@ravi.shankar can you please provide an interdiff for the reroll so it is possible to track down the changes? See https://www.drupal.org/documentation/git/interdiff for more information.

paulocs’s picture

Status: Needs work » Needs review
StatusFileSize
new2.51 KB

Attached interdiff between patch #51 and #59

hctom’s picture

Status: Needs review » Needs work

Hmmm something is strange here. @paulocs: Your interdiff looks broken, check the "--", "+-" etc. at almost all lines. So I tried to create a corrected interdiff and I can't even get one done with the patch from #59.

I'm not really sure what the problem is here, but when I take a quick look at the interdiff from #61, there definitely happened a failure during the reroll:

+++ 2998826-59.patch	2020-07-24 14:12:37.279250594 -0300
@@ -161,7 +161,7 @@
-+class NodeRouteContext extends EntityRouteContextBase {
++class NodeRouteContext implements EntityRouteContextBase {

The "implements" is wrong here, because NodeRouteContext still has to extend EntityRouteContextBase.

So all in all with the interdiff problems and the reroll failure, I guess it is better to try a completely new reroll of the patch and hide the patch from #59 in the file list.

evilehk’s picture

Status: Needs work » Needs review
StatusFileSize
new12.53 KB
new2.42 KB

Attached is the rerolled patch from #51 and an interdiff. In this reroll, the logic from issue #2890758 was moved from NodeRouteContext to EntityRouteContextBase and modified slightly to be compatible with any entity type. Locally the tests PagePreviewTest and TermContextTest run successfully.

Status: Needs review » Needs work

The last submitted patch, 63: core-Term_route_context-2998826-d9-63.patch, failed testing. View results

evilehk’s picture

Status: Needs work » Needs review
StatusFileSize
new12.57 KB
new837 bytes

This patch resolves the test failures.

hctom’s picture

I'm totally lost currently with the last 2 patches and their interdiffs ;) My dreditor extension for can not really display them correctly as a nice diff output and so I can't see what changed. Did you create the interdiffs the way it is described at https://www.drupal.org/documentation/git/interdiff ?

evilehk’s picture

Hi hctom. I do reference that page when creating interdiffs. The last section called "What about rerolled patches" recommends just a diff, which is what I did. Perhaps the interdiff between 63 and 65 could have been something other than a diff.

paulocs’s picture

StatusFileSize
new1.9 KB

Just to clarify, the interdiff #61 was just a diff because it was a re-rolled patch.The interdiff between patch #65 and #63 should not be only a diff because they are not re-rolled patch, so it must be an interdiff.

Just attached the interdiff between #63 and #65

Cheers,
Paulo.

berdir’s picture

  1. +++ b/core/lib/Drupal/Core/Entity/Plugin/Context/EntityRouteContextBase.php
    @@ -0,0 +1,132 @@
    +    $value = NULL;
    +    if (($route_object = $this->routeMatch->getRouteObject())) {
    +      $route_contexts = $route_object->getOption('parameters');
    +      // Check for a entity revision parameter first.
    +      // @todo https://www.drupal.org/i/2730631 will allow to use the upcasted
    +      //   node revision object.
    +      if ($revision_id = $this->routeMatch->getRawParameter($this->getEntityType()->getRevisionTable())) {
    +        $value = $this->entityTypeManager->getStorage($this->entityTypeId)->loadRevision($revision_id);
    +      }
    +      elseif (isset($route_contexts[$this->entityTypeId]) && $entity = $this->routeMatch->getParameter($this->entityTypeId)) {
    +        $value = $entity;
    +      }
    +      elseif (isset($route_contexts["{$this->entityTypeId}_preview"]) && $entity = $this->routeMatch->getParameter("{$this->entityTypeId}_preview")) {
    +        $value = $entity;
    +      }
    +    }
    

    This does make things a bit more generic than they are in reality, node_preview is a node specific feature. I guess it doesn't hurt and is very unlikely to conflict, although in theory it is possibly that someone has a foo_preview entity type where foo also exists.

    Note that #2730631: Upcast node and node_revision parameters of node revision routes will change this logic once again in the node context provider.

  2. +++ b/core/modules/node/src/ContextProvider/NodeRouteContext.php
    @@ -2,82 +2,17 @@
    +  public function __construct(RouteMatchInterface $route_match, EntityTypeManagerInterface $entity_type_manager) {
    +    parent::__construct($route_match, $entity_type_manager, 'node', 'node.add');
       }
    

    not sure if passing these arguments through the constructor is really the best option, we could also do abstract methods. That might be easier to handle in the future if we ever have to change the constructor and add ore remove some argument, that could get painful.

  3. +++ b/core/modules/taxonomy/src/ContextProvider/TermRouteContext.php
    @@ -0,0 +1,21 @@
    +   * {@inheritdoc}
    +   */
    +  public function __construct(RouteMatchInterface $route_match, EntityTypeManagerInterface $entity_type_manager) {
    +    parent::__construct($route_match, $entity_type_manager, 'taxonomy_term', 'entity.taxonomy_term.add_form');
    +  }
    +
    

    the second value could also have a default implementation, because there's a standard pattern for it that the node entity type (currently) doesn't follow.

joseph.olstad’s picture

Patch applies cleanly to 9.1.x
patch does not apply cleanly to 9.0.x - needs a reroll for 9.0.x

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

pcambra’s picture

Status: Needs review » Needs work

Setting as NW as per #69, I think this is a good idea but it's taking the feature out of scope for the past 2 patches or so, IMHO there should be a Taxonomy context provider and then a follow up for a centralized entity API context provider, or maybe adding that to entity api first even: https://www.drupal.org/project/entity

berdir’s picture

-1 on adding it to entity.module first, this isn't just a class that you can deprecate, it's a context identifier that's then in block and other configurations and is painful to update. Similar to the entity condition plugin that is in ctools and I've tried to get into core.

At most, we could add a base class that people have to expose for a specific entity type with a subclass, but not sure that there's much benefit.

sylus’s picture

I needed a compatible patch for 9.0.x so just attaching a reroll for that branch.

joseph.olstad’s picture

I haven't followed along here but just fyi, this patch conflicts with :

#2890758-69: Block visibility node type not working on preview/revision routes

joseph.olstad’s picture

sylus’s picture

Yup that patch is pretty important to fix up context_definitions, maybe just adjust your patch to work with it :D

hctom’s picture

I just read through the comments and to get this issue rolling, I also think we should go back to the "context provider only without a base class" solution in the first step. The base class may make sense in the future, but this is quite an overkill for now and results in many conflicts with other patches.

I will work on this today for the DrupalCon Europe contribution day so we can get moving on.

hctom’s picture

First of all, I created an issue fork that has all the latest changes from patch in comment #65. Additionally I created another issue fork for the "no base class" approach (with changes of patch from #38 applied, which is the latest patch before reworks started towards a base class).

hctom’s picture

Status: Needs work » Needs review

I double-checked the term route context provider code with the node router context code and unified some nitpicks. 2998826-term-route-context--no-base-class branch now should have all that's needed to get the context provider in (including the tests and merge request). Let's see what the pipelines say...

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#3186343: Taxonomy custom condition plugin not working

For me it looks good.
I tested it creating a condition like context_definitions = {"taxonomy_term" = @ContextDefinition("entity:taxonomy_term", label = @Translation("Taxonomy Term"))} and integrate it with context module.

It is working as expected.

quietone’s picture

Status: Reviewed & tested by the community » Needs work

I was wondering what this issue is about and reading the Issue Summary and I am not any wiser. I then looked at the Change Record and that didn't help either. Now, I know that I live in a migration silo so I don't expect to grasp everything. I do find that change records with a before and after example really helpful. If that is possible here, can that be added?

In #53 a release note snippet was asked for and I don't see that in the IS. So, sorry, setting NW for at least that.

hctom’s picture

Issue summary: View changes

@quietone: Good catch - the Change record definitely has to be rewritten, because it still talks about the base class approach. But I think there will be no before/after examples possible, because the functionality provided by this patch just didn't exist before ;)

I updated the issue summary to add a basic release note snippet.

I also cleaned up the issue a little by hiding all patch files, because the issue fork branches already contain all their changes.

hctom’s picture

wongjn’s picture

Status: Needs work » Needs review
Issue tags: -Needs release note

Edited the release note; please take a look.

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs release note

The change record looks good.

A release note is different from a change record @Wongjn.
I'm not sure but I think only core maintainers can create a release notes (for drupal core). Please correct me if I'm wrong...

Moving back to RTBC as CR looks good.

wongjn’s picture

Oops, yes that's my bad; Freudian slip!

catch’s picture

Status: Reviewed & tested by the community » Needs work

Found a couple of things - see comments on the PR.

hctom’s picture

Status: Needs work » Needs review

Rebased the branch and changed the variable name as suggested by catch - just to note: This naming change is also necessary for the node route context, but that should be done in another ticket (if needed).

cdesautels’s picture

Applied patch #65 to core v.9.1.5. The patch applied, but made no difference. Taxonomy Term context is still not recognized.

hctom’s picture

Patch #65 is quite outdated. You should use a patch based on the current issue fork.

james.williams’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new12.58 KB

Just to help those of us out that use patches (e.g. with composer), here's a patch file downloaded from the merge request as it currently stands.

Meanwhile, catch's comment has been addressed, so I think it's correct to put this back to RTBC?

catch’s picture

Issue tags: +Needs followup

Ideally I think we would have a plugin derivative that generates these for entity types. However, we don't at the moment, and I couldn't find an issue to have one.

So, I think it is fine for this to go in (caveat I need to review it one more time), but it'd be good to open a follow-up to look at feasibility of using derivatives instead.

paulocs’s picture

Hello @catch,
I tested it integrating the new feature with context module and ctools.
The code and test coverage look good as well.
So RTBC+1 for the 2998826-term-route-context--no-base-class branch.

  • catch committed 0e272ad on 9.2.x
    Issue #2998826 by hctom, evilehk, paulocs, 5n00py, chipway, tim.plunkett...
catch’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs release note, -Needs followup

Committed/pushed to 9.2.x, thanks! (removed the redundant parentheses mentioned above on commit)

Opened the follow-up and tidied up the release note.

Status: Fixed » Closed (fixed)

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