"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 (1)

0
votes
1answer
31 views

Using Entity metadata wrappers to change field value under hook_node_insert()

I am trying to change a field value inside both hook_node_insert() and hook_node_update() using EMW. It actually changes the original $node object that is passed to these hook functions but the change ...
0
votes
1answer
24 views

Custom validation rules for content entity fields

So I want to store an entity_type in a string field in my content entity. Since the list of entities can change over time, I can't use a list_string field with allowed options. I don't know if ...
0
votes
1answer
16 views

What is the difference between base tables and data tables for content entities?

Recently, Views was updated to use data tables (the data_table annotation on @ContentEntityType) by default. See the change record at https://www.drupal.org/node/2433153. This caught me out since I ...
0
votes
1answer
8 views

EntityStructureWrapper for file field is not being inflated properly while iterating

While trying to interate over file filed values, EMW cannot being created properly. using isset() for not iniated fields and then trying to set them is not helping. I get the error: ...
1
vote
1answer
9 views

Additional fields for my entity from another table in views

I have table of my entity with structure: ===================================== eid | myfield1 | myfield2 | myfield3 ===================================== And also an additional table with primary ...
0
votes
2answers
15 views

Order in entity_load

I see Documentation of entity_load but I didn't find anything about ordering of results, How can I order the results entity_load by delta? as example I fetch all product of one node by $node = ...
0
votes
1answer
21 views

Saving a particular field of a related entities with Entity Reference

Using Drupal 7, using entity and entity reference i have created 2 entities: --*Aircraft reservation (date, user, aircraft categorie) *Aircraft categories (name) I have created a view (entity ...
5
votes
4answers
190 views

How do I programatically add fields to the Media module's field tables?

I use the Media (ver, 2) module to manage a library of media assets. It allows reuse of the same media in several nodes and keeps track of media use. When reusing media (e.g.) images, I want to be ...
1
vote
0answers
62 views

hook_entity_view_alter doesn't seem to be working

I'm trying to alter a Registration entity (created by the Entity Registration module) and am using hook_entity_view_alter. I can see that my code is being called when the page loads, but it doesn't ...
0
votes
0answers
22 views

Cannot add fields to user entity

I'm getting an odd error that I've never encounter before. I'm trying to add a field to a user entity and upon adding a new (or existing) field, I don't get redirected to field options – instead I get ...
5
votes
2answers
110 views

Render a field contained inside of another field

I am using Drupal Paragraphs module that lets you create "bundles" of fields inside other fields. (It does this using entities). Each bundle has it's own tpl.php file. In addition, you can nest ...
1
vote
0answers
11 views

Drupal calculated field (ECK)

I am looking at a fairly complex problem (at least, so i think ;-)) I am working on a larger project that has ECK entities in a layout like this: Project Entity (Has an entity reference to Article) ...
0
votes
1answer
8 views

Question about users vs cck

I need to add a field to represent a person's role on a board. I have a CCK for individuals that includes a field for their position. I now need to make some changes so that I can keep track of the ...
2
votes
1answer
31 views

How can I save/load my Entity from a different database in Drupal 8?

For a custom Drupal 8 module I am integrating data from a separate database (other than the default drupal database) by defining a new Drupal entity in my module. How can I configure my Entity class ...
1
vote
1answer
35 views

Drag and Drop Sort Custom Entities

I am looking for a simple way to sort my custom entities through a drag and drop interface and display them in the custom order in my views. The best way would probably be to add a weight basefield ...
0
votes
0answers
14 views

How to transparently switch databases for queries

I need to write some modules that need data from external, non-Drupal db's. These db's can't be integrated for security reasons. However, the current code I have is littered with db_set_active ...
1
vote
0answers
22 views

How to create a custom template for entities?

I'm having a dickens of a time overriding entity.tpl.php to create custom themes for my entities. I am using ECK and Inline Entity Form. I've created entity section with bundle masthead. I've linked ...
0
votes
0answers
18 views

How to protect certain types of content from deletion on user delete

We have certain node types that we never want to be deleted except directly. Is there a way to prevent a user from being deleted if they're the owner of any content of type 'X'? Based on ...
0
votes
0answers
4 views

Advanced Entity Tokens - tokens are not rendered for none-admin users

I have advanced_entity_tokens installed. When I insert a token into a textfield, the token is rendered for the admin users fine. But not for the none-admin users. I didn't find any permission or any ...
0
votes
1answer
29 views

Correct way to render fields from Entities?

This very popular article explains correct way to render fields: http://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way According to the article, the correct way to render fields ...
0
votes
1answer
35 views

Set entity reference field to 'autocreate' directly in the entity field definitions

I'm having trouble with the two ways of defining forms for entities in Drupal (the first one being in the entity field definitions and the second one being by defining a custom form class). Now, in a ...
0
votes
0answers
6 views

Providing an entity's bundle with a custom field

My module provides its own entity. I need my entity to have a structured date field with repeating dates. The modules date and date_repeat are suitable for this. I created an example of this field ...
1
vote
1answer
20 views

How does one add a new base field to a content entity?

I'm currently porting my contributed module to Drupal 8, and sometimes I realize I've chosen the wrong field type. I also know that I will need to add additional fields later on, and it would be nice ...
0
votes
0answers
8 views

Entity_Token breaks token my tokens

I've got an issue after I installed entity_token module (Drupal 7) Now I can't really open admin interface in Drupal that contains tokens. That is how tokens are displayed without entity_token ...
0
votes
1answer
24 views

Entities, Views and frontend creation/edit - a concept question

I'm a casual Drupal-Developer and stumbled upon this problem several times: You have any kind of entity, lets say a node, and want the user to fill in field values with a form in the frontend. I.e. ...
0
votes
0answers
12 views

How do I populate an email field from a single user “Name” reference?

I have a content type in which I use an entity reference to reference a Name field in a user account. I am trying to populate an email field in the content type with the email of the entity referenced ...
0
votes
2answers
20 views

Can I add to an existing Entity schema from my own custom module

I'm extending a the Quiz module; by having taking extra data regarding the test . For this I have a custom module that redirects using a custom form . It all works fine but as its only a single ...
0
votes
0answers
12 views

How to print the url of a referenced entity

I have an entity reference field. The view mode of this field I can set to 'Label', 'Entity ID' or 'rendered Entity'. But I need the url(alias) of the referenced entity. How can I get it?
0
votes
1answer
46 views

Entity metadata wrapper - how to get field value, NOT key

I hhave field_something which is a select field with multiple options: key1|Value 1 key2|Value 2 I'm trying to get the value of this field using the Entity metadata wrapper. ...
0
votes
2answers
27 views

Anyone manage to work entity metadata wrapper with profile2 entity?

Code: $profile = profile2_load_by_user($account); $profile = $profile['main']; $wrapper = entity_metadata_wrapper('profile2_type', $profile); ...
0
votes
2answers
42 views

Create user in Drupal 8 but password not working [closed]

I tried to create user in Drupal8 using entity_create. The user is created just fine, but I can't login with the password unless I change it from the admin page. $authData['name'] = 'testuser'; ...
0
votes
0answers
10 views

Create user in Drupal 8 but password not working [duplicate]

I tried to create user in Drupal8 using entity_create. The user is created just fine, but I can't login with the password unless I change it from the admin page. $authData['name'] = 'testuser'; ...
2
votes
1answer
28 views

Getting the number of Flood events within threshold?

The FloodInterface has 4 methods: register - which adds an event clear - which clears an event isAllowed - which checks to see if the number of logged events is greater than the threshold ...
0
votes
1answer
30 views

How to set up registration for event with parallel sessions?

I would like to set up the registration for an event. During the event there are various parallel sessions. (I was thinking in using the entity registration module) Needs / problems encountered: The ...
0
votes
0answers
15 views

Redhen and Salesforce suite integration

Greeting!!, Recently I had a project to integrate RedhenCRM with Salesforce in Drupal 7. So I used Redhen module and the Salesforce Suite which worked like a magic. I was able to sync Salesforce ...
2
votes
0answers
36 views

Is Search API module 'English-speaking' only?

I am developing a multilingual (English-Ukrainian) Drupal website using Entity translation module. Everything went smooth before I tried to use the search module. I have Search API, Database search, ...
1
vote
1answer
47 views

Saving values of a multistep form into custom entity fields

I'm building a module that implement a multistep form based on a custom entity. The entity contains fields which are created by the install file. I was able to create the steps and if I print the ...
0
votes
1answer
39 views

Field Collection vs. Entity View Modes with Field Group

I have been using Entity View Modes to organize my fields, have different display types, and use Field Groups to add bootstrap-style wrappers around my content. As often as humanly possible, I have ...
0
votes
0answers
15 views

Drupal modal forms -> entities

I am currently working on a project that uses ECK entities, instead of the normal Content types. I am working on a large fullcalendar implementation that has to show a Modal popup (when you click on ...
0
votes
1answer
30 views

CKEditor not displaying in latest 8.0.x-dev version

After updating Drupal from version 8.0.0-beta7 to version 8.0.x-dev — to fix text_format fields not submitting their value due to a missing name attribute —, my field is now displaying as a basic ...
0
votes
0answers
6 views

List other entities along with node teasers in front page like view?

Seems like views can be either content or other entities but not both. I have the statuses module and statuses are entities how would I display them in a view like that of the front page along with ...
0
votes
0answers
10 views

How to add a table to a custom entity's build query

I created a new base entity type, with variations of entities that derive it. I want to override the build query in one of these variations so I may add some data from a supplemental table. My ...
0
votes
1answer
21 views

What can Menus do that Taxonomy cannot?

'Comments', 'Users', 'Taxonomy' are Entity Types because they each define their own sets of required fields. I am having a discussion with my boss where I am arguing that 'Menu' are really just a ...
0
votes
1answer
33 views

Storing data for every country for an interactive chart

I need to store one and possibly more values for each and every country so that I can populate an interactive SVG world map. This data will be updated often by hand by one of the content moderators. ...
0
votes
2answers
18 views

Possible to join different entity type on using EntityFieldQuery?

I am wondering whether I can use EntityFieldQuery to fetch all entities belonging to a specific content type. This entity type has a reference to another entity type. Is it possible to check against ...
0
votes
0answers
33 views

Adding a list of strings or entities to another entity

I need to be able to add a list of departments to an entity directly via the add form of that entity. Those departments don't necessarily exist in the application beforehand and could be strings or ...
0
votes
1answer
54 views

Entity form calculator in Drupal

I was wandering, is there anything like webform calculator for entity forms? Thanks
0
votes
0answers
16 views

How to add a predelete hook for a custom or existing entity like commerce order?

So I am having the problem that I need to do stuff before a commerce order is deleted. On the entity api page I found a patch which somehow adds predelete hooks, or at least makes entities invoke ...
0
votes
0answers
20 views

Better way to control entity access

What is the better way to control the access of custom entities from contrib modules in Drupal? I thought 2 diferents ways: hook_menu_alter access callback and entity_info_alter access callback. Any ...
0
votes
0answers
21 views

setting up autocomplete on content type using profile2 and entityreference

so, I'm creating a content type called "elearning", and I have some modules installed: -ctools -entity api -entity reference -profile2 -views Then I create new profile called "teacher" with the ...