Problem / Motivation
Taxonomy Term Edit Link field handler ignoring settings from `Output this field as a link` (rewrite results).

Solution
Patch attached. Tested on latest releases of Drupal 7 on dev version of Views 7.x-3.x-dev.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bohart created an issue. See original summary.

podarok’s picture

Status: Active » Needs work
+++ b/modules/taxonomy/views_handler_field_term_link_edit.inc
@@ -44,19 +44,22 @@ class views_handler_field_term_link_edit extends views_handler_field {
+  function render_link($data, $values) {

Missed docblock

podarok’s picture

+++ b/modules/taxonomy/views_handler_field_term_link_edit.inc
@@ -44,19 +44,22 @@ class views_handler_field_term_link_edit extends views_handler_field {
+      $this->options['alter']['path'] = "user/$data/edit";

this needs to be taxonomy/../edit link

bohart’s picture

Status: Needs work » Needs review
FileSize
2.15 KB

Updated patch attached.

podarok’s picture

Status: Needs review » Reviewed & tested by the community

Code looks good. Can be merged.

abramm’s picture

FileSize
63.88 KB

Works for me; re-checked at simplytest.me to ensure it's not affected by other modules.
screenhost

MrPeanut’s picture

Patch from #4 no longer applies.

abramm’s picture

Hi MrPeanut,

Here's a re-roll for latest 7.x-3.x-dev.

DamienMcKenna’s picture

Committed. Thanks.

  • DamienMcKenna committed 9b453d6 on 7.x-3.x authored by bohart
    Issue #2742805 by bohart, abramm: Taxonomy Term Edit Link field handler...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

salbertz’s picture

Hmm - now the field is no longer rendered as link at all by default (i.e. if "output as link" is _not_ checked) - which is not what you would expect of a field called "term edit link". The path is not altered as intended by setting $this->options['alter']['path'], but a simple string returned by $this->render(). (Tested with Drupal 7.67 and views 3.23.)

vaccinemedia’s picture

@salbertz I am also seeing this issue which is what led me here to find I'm not going a bit crazy ;) I was wondering why all of my edit links had stopped working.