As introduced in #897694: taxonomy_term_path not working drupal 7, render_link for taxonomy term fields is using entity_uri(). But there is the 'options' part missing in the current implementation.

Additionally it would help, for some entity_uri implementations (e.g. entity_path), if there was more information on the term, and not only the pseudo term object. For most purposes the term name would be fine. So I'd propose to add the name column to the field too. (see #1388684: Can't use [term:name] for a term path replacement).

I'll post a patch for that in the first comment.

May be related to:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derhasi’s picture

And there is the patch.

derhasi’s picture

Status: Active » Needs review
BWPanda’s picture

Status: Needs review » Reviewed & tested by the community

I was experiencing the issue in #1388684: Can't use [term:name] for a term path replacement and this patch fixed it for me.

dawehner’s picture

+++ b/modules/taxonomy/views_handler_field_taxonomy.incundefined
@@ -65,9 +66,13 @@ class views_handler_field_taxonomy extends views_handler_field {
+      if (isset($uri['options'])) {
+        $this->options['alter'] = array_merge($this->options['alter'], $uri['options']);
+      }

This change feels odd, because we don't do that even in core, but yeah it seems to be better to do it.

jordan8037310’s picture

I can report that this patch helped with my implementation of entity_path as well. Thanks!

siefca’s picture

This patch helped me too. Please merge it into master.

dawehner’s picture

Status: Reviewed & tested by the community » Needs review

... need some response for #4 :(

ZoeN’s picture

Patch from #1 fixed the problem with entity_path for me too.

divined’s picture

term fields support?

dawehner’s picture

So you suggest to load the full taxonomy term?

ashii’s picture

#1 Patch works for me too

geek-merlin’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

This patch applies cleanly, does what it announces, and fixes #1498560: Query pattern not used in taxonomy View for me.

Getttitin yah!

colan’s picture

We've recently switched our testing from the old qa.drupal.org to DrupalCI. Because of a bug in the new system, #2623840: Views (D7) patches not being tested, older patches must be re-uploaded. On re-uploading the patch, please set the status to "Needs Review" so that the test bot will add it to its queue.

If all tests pass, change the Status back to "Reviewed & tested by the community". We'll most likely commit the patch immediately without having to go through another round of peer review.

We apologize for the trouble, and appreciate your patience.

geek-merlin’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.26 KB

  • dawehner committed 9227dc9 on 7.x-3.x authored by axel.rutz
    Issue #1806266 by derhasi, axel.rutz: Complete entity_uri support for...
dawehner’s picture

Status: Needs review » Fixed

Thank you all!

Status: Fixed » Closed (fixed)

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