Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [taxonomy-terms]

"Taxonomy" refers to Drupal's content classification mechanism, organised into vocabularies and terms.

1
vote
1answer
29 views

Vocabulary terms deleted but still visible

I work on a D7 website where some taxonomy terms were created and then deleted. I’ve build a search form with views based on taxonomy terms (filter criterion: Content: Term name (field_term_name)) ...
0
votes
1answer
88 views

Issue in taxonomy term with hyphen(-) in url drupal7

I have a taxonomy called free-choices.But the contents are not listed when hyphen(-) in the taxonomy name.The pages with taxonomy name without hyphen is listing contents.How to solve this issue?I ...
0
votes
3answers
103 views

Remove duplicate values in a column after join in drupal 7

I am using this db_select query. $query = db_select('taxonomy_index', 't1'); $query->distinct(); $query->join('node', 't2', 't1.nid = t2.nid'); $query->join('taxonomy_term_data', ...
0
votes
1answer
70 views

Migrating only articles with a specific taxonomy term

In the source D7, i have a content type 'article' containing a reference to a 'category' taxonomy vocabulary term. In the target D8, I have a content type 'article' as well, but i only want to ...
-1
votes
1answer
26 views

How to restrict term view page for respective user roles programatically? is it possible?

I tried to using hook_menu_alter but it doesn't work. It doesn't call page callback function. function mymodule_menu_alter(&$items) { $items['taxonomy/term/%taxonomy_term']['page callback'] = ...
1
vote
1answer
4k views

What is causing “Object of class stdClass could not be converted to string”

I'm receiving the following error: Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 2227 of includes/database/database.inc)....
1
vote
1answer
49 views

Visibilities permissions of children links in the Toolbar

In a project started with the Thunder distribution, I'm currently managing the permission of the "editor" group. By default, it only have access to the content menu, and it's a good thing. But what ...
0
votes
1answer
102 views

Views REST Endpoint With paragraph field

I've created a REST export view to get a paragraph field in a JSON format but I cannot get the result properly, so I used Rest Views module but I got the results including something like these ...
0
votes
1answer
13 views

How do I display category items in a view content pane?

I created an Events content type. I created a vocabulary that has two category terms, Events and Plays. I have a view that contains a list of all content of type Events. Each Events listing displays ...
0
votes
2answers
48 views

How do I display a view pane with all items of a category?

I created an Events content type. I created a vocabulary that has two category terms, Events and Plays. I have a view that contains a list of all content of type Events. Each Events listing displays ...
0
votes
1answer
561 views

Facets hierarchical taxonomy terms not working

I use the Facet module version 8.x-1.x-dev. I have a list of taxonomy terms with parents and childs. The taxonomy term facet is an Entity reference field. I can't get the hierarchical structure ...
0
votes
1answer
498 views

Entity Query Condition for the referenced entity's type

According to the documentation for the condition() function, you can append columns to a field name, but I haven't found a way to make a condition on the referenced entity's type. // Something like ...
0
votes
1answer
15 views

How can I add a taxonomy-based view to a page?

I created a taxonomy with a vocabulary called Series. The Series vocabulary contains a list of terms x, y, z. I created a content type called Events, which has a field to tag the content with a term ...
0
votes
1answer
14 views

Forbid or autocorrect a certain term in a vocabulary

I am looking for a way to prevent a certain term to be created in a vocabulary. I don't know if there exists a contrib module with this functionality yet. Searches on Google did not deliver so far. ...
0
votes
0answers
18 views

How to show terms that haven't been selected in a view?

I have a vocab called 'Mounting Options' and I have selected a certain number of terms from this vocab on each Camera node type. The ones I have selected show on the front-end but I want to show ...
0
votes
2answers
82 views

Bulk Generating URL aliases for taxonomy terms doesn't do anything

In D7, I've imported ~8000 taxonomy terms. All these need to have a url alias, based off their names. I can check the 'Generate automatic URL alias' checkbox when editing each taxonomy term ...
0
votes
1answer
10 views

Enforce URL rules when posting content types

so I created a content type "Regions" - This includes the 13 provinces in Canada listed as individual terms. When creating a new post with the content type "Regions", you have to choose which term to ...
1
vote
1answer
33 views

How can I handle the user access to specific taxonomy terms?

There is a node form with a term reference field which's terms list I want to filter based on users/ permissions. I've tried several modules in which I can grant access either user- or role-based for ...
3
votes
2answers
469 views

How to correctly modify Taxonomy Term selection Plugin

I want some slight modifications of Drupal\taxonomy\Plugin\EntityReferenceSelection\TermSelection::getReferenceableEntities(), for example to not use - to indicate term hierarchy. How can that be ...
0
votes
0answers
53 views

Views block to list all terms in homepage and list child terms in taxonomy page

I have a views block of taxonomy terms. I want the block to display all terms when it is on homepage, and to list child terms when it is on a taxonomy page (contextual filter: Taxonomy term: Parent ...
0
votes
1answer
25 views

Multipart Form Fields - Taxonomy Included

I'm starting out a new project and I think I've come across something like it before but I can't think of the right search terms or something along those lines... What I'd like is a module to add ...
0
votes
1answer
58 views

Trying to make a filter taxonomy menu with multiple vocabularies

I'm currently having trouble getting a taxonomy menu to act as a product display filter. Actually I think I may need multiple menus as my products need to be filtered by: category, price, and color. ...
0
votes
2answers
690 views

Taxonomy term listing of nodes with the term in a paragraph

I found similar questions but not an actual answer... This is my setup In Drupal 8: Node Paragraph Taxonomy term reference I would like to use the default ...
1
vote
2answers
82 views

Looping through taxonomy terms and adding them to term reference field with Rules

I have a content type called Items. Within the items I have 3 unlimited term reference fields. Location (field_location_pi) Phase (field_phases_pi) Structure (field_structure_type_pi) I am ...
0
votes
1answer
29 views

How to display all the terms of a vocabulary with a list of the items associated to the term below in a view?

In a view in D8, I want to achive something like : term 1 -item 1 -item2 term 2 -item 3 -item 4 term 3 - item 5 - item 6 Is it possible ? If yes, how ?
0
votes
1answer
181 views

Sort grouping field associated with taxonomy term by weight on drupal 8 views

I'm currently trying to figure out how I can sort the grouping fields(Taxonomy Term) by weight that I have setup on my views. As shown in this screenshot below I have a grouping field that is ...
-1
votes
1answer
56 views

How to display custom text for entity reference field, depending on vocabulary term.

This must be simple, but I can't find how to do it .. Say I have a custom content type of 'staff' which, among other, has an entity reference field linked to a taxonomy vocabulary which has the ...
0
votes
1answer
27 views

How can I display node fields contextually in a block with terms from two separate vocabularies based on node ID?

I've got a content type that has a file field and as part of custom content type that we use to display document links. As part of that content type I have taxonomy 1 "site section" that I'm using to ...
-1
votes
1answer
74 views

viewswith multiple taxonomy fields with the same vocabulary, filters should show just selected terms

I have a content type with two taxonomy fields using the same vocabulary, I need a view with two exposed filters that, when both set to the same term, show just the nodes with that term in both ...
-1
votes
1answer
142 views

How to Display Taxonomy image field on node page

I need to display Taxonomy term image field on the node display page instead of the term name. Other fields are being printed like below and the $content variable is not printed any where. Any ...
-1
votes
1answer
27 views

Problem with taxonomy [closed]

I created a "Science" category, which shows up at the bottom of the add content page. But I also created a "History" category and that doesn't show up. Any ideas?
0
votes
1answer
61 views

Add trailing slash to taxonomy term. Issue with relative URL

We were trying to create relative links by using href="Link" or href="./Link" This works on all browsers, but in Drupal we are running into a problem becasue Drupal removes trailing slash from ...
1
vote
2answers
727 views

Adding a taxonomy term translation changes the original language value!

I have an issue when I try to add a translation of a taxonomy term using the site UI. The original language value changes to the translation value that I added. How can I prevent that from happening? ...
0
votes
1answer
340 views

How to show more terms in the “Parent terms” select list when adding taxonomy term?

When adding terms to a taxonomy vocabulary, the "Parent terms" scrolling selector list in the "RELATIONS" section only displays 4 items. When dealing with large, complex, hierarchical taxonomies, this ...
0
votes
1answer
435 views

How to print a taxonomy term's field value alongside a Views grouping header?

In Drupal 8.4.4 I have a "Living Things" taxonomy vocabulary. One field on the terms in the vocabulary is "Most Common Name", with machine name field_most_common_name. On my "Animalia" term its value ...
0
votes
2answers
853 views

Term Reference field as checkboxes, not auto-complete?

I have a brand new Drupal 8 installation (my first D8 site). I've created a new content type with a Term Reference field. When adding content, it appears that the only way to select a term is via ...
0
votes
0answers
341 views

Taxonomy vocabulary in breadcrumbs / url

I have a menu with some items that link to some views which filter content type associated with vocabulary terms. Navigation Menu ITEM -> views page vocabulary Result : my-site.com/vocabulary ...
-1
votes
1answer
22 views

get menulink id from enitity id?

Id like to be able to get a link content ID from an entity id. Not sure how to best do this? I'm trying to render a menu tree and use a specific taxonomy term as the menu tree root. I have access to ...
0
votes
1answer
28 views

Why the menu items to edit a specific vocabulary and terms does not show up in administration tool bar?

I created a new user with specific role and permissions to CRUD 1 content type and 1 taxonomy vocabular and terms. The thing is that the administration menu item does not show up for the taxonomy ...
0
votes
1answer
137 views

How do I load taxonomy terms basing on the current language?

I am using the following code. $language = \Drupal::languageManager()->getCurrentLanguage()->getId(); $terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree('...
1
vote
1answer
699 views

How do I the add vocabulary name or the ID to the <body> CSS classes?

For theming purpose, I would like to add in body class the vocabulary name (or ID) of the current taxonomy. I know how to add a class based on the taxonomy term ID. For example, I have the following ...
1
vote
2answers
234 views

Is it better to create a taxonomy term using the 'create' method of the base Entity class or the entity storage manager?

I've seen multiple ways to programmatically create entities. In this case I'm creating a taxonomy term. One is using this method $term = \Drupal\taxonomy\Entity\Term::create([ 'name' => $name, ...
1
vote
1answer
464 views

How to display all media that references this taxonomy term and its immediate children?

I have a hierarchical taxonomy vocabulary, "Living Things". A simplified excerpt looks like this: Plants --Roses ----Red Rose ----Pink Rose --Orchids ----White Orchid ----Yellow Orchid I have a ...
1
vote
1answer
401 views

Display parent term based on child term in views

I have a vocabulary with the following structure: Vocabulary Parent term 1 Child term 1.1 Child term 1.1.1 Child term 1.2 Child term 1.2.1 Parent term 2 Child term 2.1 ...
0
votes
1answer
63 views

How to add contextual fields to breadcumb links?

How can contextual fields be added to breadcrumb links? For example, I have a hierarchical taxonomy vocabulary like this: Animalia --Chordata ----Vertebrata On the Vertebrata page, the default ...
1
vote
2answers
500 views

How to modify the value of a taxonomy field of a node using hook_node_view()?

I'm using Drupal 8 and I have a taxonomy field in a content type. I have created a node and added the term reference value to this node. Now the node shows up the link to the term. I want to show ...
0
votes
1answer
117 views

Importing Taxonomy from CSV

I know that there are a couple of modules to import taxonomy from CSV but my taxonomy has many term references inside it. Attached is a screenshot of my taxonomy, how can I import the excel sheet ...
-1
votes
1answer
33 views

Views PHP Filter buggy for Taxonomy name

I'm trying to show specific contents for specific users based on the taxonomy term. Variables explanation: webauth variable I am using these variables to setup my PHP filter. $_SESSION['company']; ...
-1
votes
1answer
19 views

Loop Custom Content based on the taxonomy term they are in

I created a taxonmy vocabulary, added 3 terms in it Term1, Term2, Term3 Then I created a custom content type, and I associated it with that vocabulary term, so now everytime I create a page I check ...
0
votes
1answer
98 views

Have Select Dropdown of Taxonomy but allow user to enter new term

Is there a way to have my Taxonomy Terms in Dropdown but also allow the user to enter a new term (Like autocomplete widget does) if they don't see their term in the select list? So essentially I ...