"Entities" is the term that in Drupal 7 is used for nodes, comments, taxonomy terms, and users. Third-party modules can then define new entity types.

learn more… | top users | synonyms (2)

1
vote
0answers
9 views

Field data modelling

I have a content type PLACE with simple text and image fields. Now I need to add a field to this content type where the user needs to select something for each month (he can select good OR bad or ...
0
votes
0answers
12 views

Entity Metadata Wrapper: set Date Field with unknown Timezone

I need to create nodes programmatically and I chose to use the helpful EntityMetadataWrappers. But I have a real doubt about setting datefields. I found in this thread (and checked on my code) ...
0
votes
0answers
41 views

Changing a node's content type

In Drupal 7, I can easily switch a node's content type by using Node convert. Node Convert, however, has not been ported to Drupal 8, nor does there appear to be much enthusiasm for the port. If I ...
0
votes
0answers
13 views

Entity / Entity reference

I made a custom module with one Entity content : Commandes Entity Before the payment i ll create one line in Commandes Entity for the bill. But i need to add all the products for this bill. This ...
0
votes
0answers
6 views

Can I change an entity machine name without losing the views and panels related to it?

I need to change the machine name of an entity, but my experience is that this results in loss of views and entity references and panel configurations. What would be a way to change the entity ...
0
votes
1answer
12 views

How to access referenced entities programmatically

I have an entity (a node) with a term reference field. I'd like to access the referenced term entities programmatically, i.e. the fully loaded term objects. Note that my question could equally apply ...
0
votes
0answers
2 views

How to have a:active class on links to referenced entities (entity references)

I am using two view as menu navigation panel panes: The first is a view of all parent referenced entities "A" through an entity reference field. The second view lists all grandparent entities "B" that ...
0
votes
0answers
19 views

How to display more fields in an autocomplete reference field in Drupal 8

In an autocomplete field only the title of the entity reference is displayed to select it. I would like to display more fields to be more accurate in the selection, but after many research and try ...
0
votes
0answers
7 views

Is it possible to display Entityform Types using Page Manager and Panels in D7?

Currently, I have a D7 site and my main Content region is displayed using Page Manager and Panels variants. I've created an Entityform Type that allows users to request an appointment, and I'd like ...
0
votes
0answers
26 views

How load only some node fields?

entity.query service is very handy when it comes to finding nodes with specific field values. Unfortunately all it returns are entity IDs and revision IDs. In case in which result set is big it's ...
3
votes
1answer
31 views

Drupal as Framework

I am working on a project where I decided to use Drupal as the backend, but I didn't wanted to use anything else, but the entities API. The project is working like a charm and everything is working ...
0
votes
2answers
31 views

How can I print out large variables in hook_entity_presave for debugging?

I'm trying to print out the $entity variable im hook_entity_presave because I want to see all of the properties and their values at the time of saving. The problem is that every way I have tried to ...
0
votes
1answer
17 views

Entity query - wrong nid

Hi i have following querry: $query = \Drupal::entityQuery('node')->condition('type','article'); $result = $query->execute(); Then i want to access all content: $nodes = ...
0
votes
1answer
17 views

How would I store a reference in a custom FieldType in Drupal 8?

I am developing a module for Drupal 8 and want to make a field on one entity that references another along with some additional data. e.g. Library A has a copy of Book B (of Edition 2). There will be ...
0
votes
1answer
13 views

How can I mass-delete duplicate entities based on the entity title and bundle

There is a module for removing duplicate nodes, but how to delete duplicate entities (in my case ECK entities) based on title and bundle that are the same?
0
votes
1answer
31 views

Query - Content type [closed]

i want to get all created content of some content type by query. By now i can acces nodes by their ID. $MyNode = \Drupal\node\Entity\Node::load(1) I tried some query, but none of them worked for ...
3
votes
2answers
45 views

Related Content View with multiple Entity Reference Fields

I am trying to create a View to display related content based on shared taxonomy terms from multiple vocabularies. For example: I have two content types called Car and Parts. I have two ...
5
votes
3answers
46 views

How can I programatically prevent users from saving the same entity twice in a row?

My server sometimes gets overloaded, and sometimes people press the "Save" button on an entity creation page several times, which results in multiple versions of the same entity being created. So, I ...
0
votes
1answer
11 views

Taxonomy term reference field from custom database table

I am trying to create a taxonomy term reference field or the equivalent in a View that uses the uuid of a field in a custom table. This field can contain multiple uuids. My first approach after ...
1
vote
0answers
16 views

How to display entity label using entity reference field checkbox form display

I am working with Drupal 8. And I want to create a field of entity_reference type. The field has a reference to context_question entity. And the field is displayed fine, but without any description ...
0
votes
0answers
12 views

Get all referencing entities two levels upstream

I have three content types. Content Type A, Content Type B and Content Type C. Content Type A has an Entity Reference field named field_B Content Type B has an Entity Reference field named field_C ...
0
votes
1answer
24 views

Retriving nodes by content type using Drupal::entityQuery

I created a content type named product. How can I retrive all node of such content type using the entityQuery method? I tried with this, but it doesn't works: $ids = \Drupal::entityQuery('product') ...
0
votes
1answer
42 views

Custom autocomplete field

I am trying to create an autocomplete field for users. The following code is fine for username searches but the requirement is for a search by any part of the user's first and last name. ...
0
votes
2answers
15 views

Getting entityreference field from user

I created additional field for user profile, which is a reference to node (content type - Company). How can i get values of this field for a current user? $user = ...
0
votes
0answers
16 views

How to return values back to parent form from view in ctools popup?

I'm writing custom field type and widget based on it. It allows to create custom entities from node page and add node references on existing nodes. There are no problems with custom entities they ...
0
votes
1answer
21 views

how to clone an entity

I created a custom entity type using entity_info_hook and associative hooks. Its work fine.Now I want to create a clone of the entity when I press the button Duplicate. Any method? I read Replicate ...
1
vote
2answers
31 views

Uninstalling a created custom module in drupal 8

I've created a custom module in drupal 8 and on this module i've created: Content types Fields Entities Views ... all this programmatically. But the problem when i try to uninstall it the ...
0
votes
0answers
15 views

Really Weird Static Cache Problem in entity_get_info()

Something super weird is going on with my custom entity. So there I am minding my own business querying my database for ids of my custom entities, and then loading and rendering them, and I get an ...
0
votes
0answers
15 views

Calculated field: How to calculate the sum of fieldvalues of all referencing entities

Using Drupal 7.43 Using ECK entities. This question is based on my attempt to create a simple bookkeeping system in Drupal, in which I have Account entites and Expense entities. The Expense entities ...
0
votes
1answer
15 views

How to bulk update entities using the Feeds module, without existing mappings to a “unique target”

Importing new entities with feeds using a published csv file is very handy. I use Google Sheets to publish a csv file and use Feeds to create new nodes, which then can be updated based on a unique ...
0
votes
0answers
42 views

Entity Field Query OR condition,between node title and a custom field

I am executing a query for searching in the node title and a field using LIKE.How do I use the OR condition? `function hook_somefunction($keys) { $query = new EntityFieldQuery(); ...
0
votes
1answer
7 views

Custom entity to load another custom reference entity fields

I have two custom entities (Car and Car Type) and I am using one as a reference for the other. When I load the "Car" entity I can only get the ID from "Car Type". I know I can then run entity_load to ...
-1
votes
2answers
17 views

View - change format

I cannot change "Format view: Entity" to "view: fields". When i press on "entity" the rotating circle just show for a second and disapear. Thx for help.
0
votes
1answer
19 views

Autocomplete views exposed textbox for Entity reference field

I've got 2 content types "Equipment" and "Machine" , "Equipment" content type consists of an entity reference field targeting "Machine" content types. My goal is to provide an exposed filter for user ...
0
votes
3answers
36 views

How do I find out which base fields are available for an entity type?

If I have an entity type id as a string, how I can tell which base fields are defined for that entity type? For example, how do I programatically check that an entity type has the "changed" field?
17
votes
4answers
244 views

With current Drupal 8 release status, what is the decision tree for creating a new Node-entity-type Content Type versus a new content entity type?

We have seen four years and Drupal 8's first release since the accepted answer was written for the question "When is it appropriate to create an Entity versus just adding a new content type?" And, ...
0
votes
1answer
29 views

Add a query string to Entity reference Auto complete CCK Field

I have a CCK field that is a Entity Reference with auto complete. And in the "Manage Display" Link label to the referenced entity. How can I add a query string to this URL? Is there any hook ...
0
votes
0answers
47 views

Create and update nodes via a module in Drupal 8

I have a module that is creating two new content types, one will have a title, a term reference, and a node entity reference to the 2nd content type. The second one will be composed of 2 integer value ...
0
votes
0answers
20 views

“EntityMetadataWrapperException: Unknown data property” on select field

If I print_r on the $node object for a certain field I get the following: print_r($node->field_country_of_school) Array ( [und] => Array ( [0] => Array ...
0
votes
1answer
28 views

What is an allternatve approach to many fields in an entity?

I have an entity bundle 'A' that has about 30 fields in it. This is probably affecting the page load performance of any view requiring to load these entities. As an alternative, I was thinking about ...
0
votes
2answers
18 views

Pre load entity reference fields into a node

Say I have three content types: Team member, Team and Matchday. The team content type is made up of entity reference fields, which reference team members. The Matchday content type should load ...
0
votes
1answer
27 views

8 - Product reference add to cart form shows only add to cart button

I've created a content type with a product reference field, but when I create a content with the reference to the product, it shows add to cart form with only add to cart button. I wanted to display ...
0
votes
0answers
12 views

What is best practice for the amount of entity bundles, related to performance

My site uses ECK entities In my use case it is easier to work with many bundles under one entity type instead of multiple entity types (because in Panels, Views, Flags, separate entity types require ...
1
vote
1answer
20 views

Working with a checkbox and EntityFieldQuery

So I have a custom field which is a checkbox and is called 'field_hide_panel'. The on value is '1' and the off value is '0'. But bare in mind, this field was added later so there are a lot of rows in ...
2
votes
2answers
109 views

Updated >= Drupal 8.0.5+: Rendering forms/entities programmatically on theming level

There are several attempts and questions already asked about near to that topic in combination with the new Drupal core (8), but non of them came down to the bottom of the basic question. And non of ...
1
vote
3answers
130 views

How to place Contact form in block?

I have to embed a contact form inside of a block, and I'm trying to use the entity.form_builder service, But I'm not sure which entity I should give it, I found Message and ContactForm entity, so what ...
1
vote
2answers
78 views

In views, how to create link to field visible through relationship connection?

I don’t want to link to the original piece of content (which is a join table) but to the content type which is referenced in the join table. Using: Views, Entity Reference, Entity Tokens, Token. I ...
0
votes
0answers
14 views

Create Content with entities to link to another content's sub entities

It's kind of difficult for me to phrase the question, but I'll still try: My goal is to create several pieces of content that are referencing each other. But one content type has number of entities ...
1
vote
0answers
26 views

Assigning non registered users as students to course content type

I have a content type course and I need to assign students ( nonregistered users ) to its nodes. My students list contains only the names of students. I have tried signup module and Entity ...
0
votes
1answer
9 views

How to force entity translations to load in a certain language with user_view() or entity_view()

I have a custom view mode that uses a template to print out user profiles. I am saving the HTML from this view mode in the Solr search index using Search API Solr. In user--my-view-mode.tpl.php, I ...