Strange Issue with displaying information of the current term

I have built a series of views to build a Drupal Commerce display for products based on the Taxonomy terms of those products. These terms have a hierarchy. There are nearly 40,000 products being imported through Commerce Feeds, the taxonomy terms are attached to the products during the import.

Currently I have a series of 3 views working together to achieve what I want and am attempting to build a fourth view that I am having a strange problem with. View http://cde.gttechlife.com/products for reference.

View 1(Product Taxonomy Children) pulls in all Taxonomy terms based on the Parent Term context in the URL. (Term Alias is the name displayed, Product Code for Image pulls in an image based on product code) It pulls that in through Term Name converted to ID and turns term name spaces into dashes. See Below:

View 2((Top Level Products) Pulls in all Taxonomy Terms that do not have Parents and displays them. View 2 is attached to view 1 if View 1 has no results based on the Contextual URL, this is the only time view 2 is displayed. So no contextual filter on the URL it displays all terms with no parents.

If View 2 DOES have a contextual URl, there it displays a no results attachment View 3. View 3 pulls in all products with that Term Name in the URL.

All of these views work exactly as needed. But I want to add another view. I want View 4 to also be pulled into view 2 with view 3. View 4 (Taxonomy Description). View 4 pulls in the Taxonomy Term Description and the custom field Category Alias, and Product image of the current term in the URL. Oddly enough this ONLY works for contexts with no dashes. Just like the other Views I made sure to check “Transform dashes in URL to spaces in term name filter values” but for some odd reason it still only works for one word terms. For example (cde.gttechlife.com/products/vibratite) works fine but (cde.gttechlife.com/products/Gasket-Flange-Sealant) does not. It seems like such a simple problem to have but I have hit a wall looking for the solution. Any help would be appreciated.

Also trying to figure out the best way to get the Breadcrumbs to reflect the parent terms and even ideally in the url, but I still have some effort to put in on that end. Have been using the Crumbs module thinking I will be able to do what I need if I put in the time. But the problem stated above has me stumped because I can’t think of why it wouldn’t work correctly.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Strange Issue with displaying information of the current term

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.