Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By 4toddt on
I was having trouble with contextual links, so I created a test view of taxonomy terms with the following settings:
FORMAT
Format:Semantic Views | Settings
Show:Semantic Views : Fields | Settings
FIELDS
Taxonomy term: Term edit link
Global: Contextual Links
Taxonomy term: Name
FILTER CRITERIA
Taxonomy vocabulary: Machine name (= Service types)
Under Format:Semantic Views | Settings
I added contextual-links-region
to the Class attribute
of each ROW
. I also excluded the Taxonomy term: Term edit link
from the display. For some reason there are no contextual links.
The preview outputs the following HTML:
<div class="preview-section">
<div class="contextual-links-region first odd">
<a href="/beta/service-types/business" class="views-ajax-processed-processed">Business</a>
</div>
<div class="contextual-links-region even">
<a href="/beta/service-types/estate-planning-probate" class="views-ajax-processed-processed">Estate Planning & Probate</a>
</div>
<div class="contextual-links-region odd">
<a href="/beta/service-types/personal-bankruptcy" class="views-ajax-processed-processed">Personal Bankruptcy</a>
</div>
<div class="contextual-links-region last even">
<a href="/beta/service-types/real-estate" class="views-ajax-processed-processed">Real Estate</a>
</div>
</div>
I have no idea how to troubleshoot this issue, and this website needs to be finished tomorrow. Any help would be greatly appreciated.
Comments
Additional info
I am getting the following error from the page I created:
Notice: Undefined index: edit_term in template_preprocess_semanticviews_view_fields() (line 32 of /home/lawlorai/public_html/beta/sites/all/modules/semanticviews/semanticviews.theme.inc).
It is repeated once for each item returned by the view.
Never mind the additional info
The errors don't seem to be related to the primary issue.
Solution that works
I found the solution listed here https://www.drupal.org/node/1019486#comment-7774649 worked for me - I now get a contextual link for taxonomy terms in my views.