"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
0answers
15 views

Way of creating entities during submit handler of another entities

I'm creating a module that defines two entities. Let's name them entityone and entitytwo. Entitytwo contains reference to entityone. What I'm trying to achieve is to create entitytwos during creating ...
0
votes
0answers
13 views

EntityMetadataWrapperException: Unknown data property og_user_node?

i have disabled "Administration menu" then after i enabled "Administration menu" still i am getting below error in home page "The website encountered an unexpected error. Please try again ...
1
vote
0answers
7 views

Services + Entity Reference - New revision vs. published revision

I'm using Services to deploy nodes from Site A to Site B, using UUID as the key to keep them synced. If the node exists on Site B, I do a PUT to update it, and if it doesn't exist, I do a POST to ...
0
votes
0answers
13 views

Flag the node that is referenced via an entity form submission with rules

I am trying to recreate an "enquiry basket". I am using Entityform, Inline Entity Form, Rules, Views and Flag. I have a node content type called Custom product. I am referencing different entity ...
1
vote
3answers
67 views
+100

Deleting field collection bundle programmatically from core

I have a field collection bundle that I want to remove from my site. I was googling how to do that and came upon these instructions, but they seem to be from the module eck, and only apply to ...
0
votes
1answer
17 views

Content type itself as entity

I need to classify and mark my content types. As example I have three content types for group messages in OG, ten content types which used as UC products, etc. So I need to add taxonomy and fields to ...
0
votes
1answer
16 views

On node edit form, how to edit field from a referenced entity?

I've got a master entity (node) that users edit, and I've got an entity reference on it. I'd like to be able to edit a field on the referenced entity on that master referencing entity's edit form. Is ...
0
votes
1answer
14 views

How and when are commerce licenses created, and when does the state change to “active”?

I'm working on a module that attempts to tie commerce_license in with the ACL (Access Control Lists) module. I am attempting to sell access to an individual node. I have a product type, product, and ...
1
vote
0answers
11 views

How to make custom entity properties available on entity_load?

I am altering another entity by adding some more (read only) properties to it. <?php hook_entity_property_info_alter(&$info) { $info['entity']['properties']['entity_edit_url'] = array( ...
0
votes
0answers
11 views

How to set HTML value for taxonomy description field using entity_metadata_wrapper

I've set my taxonomy description field to taking a filtered text value. Using the UI, I can edit a taxonomy term, write some HTML, save, and when I view it I see the HTML rendered by my browser. ...
0
votes
0answers
10 views

How does one add revision information to custom built entities?

I'm looking for help in gentle/simple terms for how to add revision information to my custom entities. This is maybe my fifth or sixth attempt to do this and every time I get lost and overwhelmed by ...
0
votes
1answer
32 views

EntityMalformedException: Missing bundle property on entity of type node

I'm doing a drupal 7 website, I've now started to experience a "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7820 of ...
0
votes
2answers
25 views

Creating a node with multiple joined fields

I'm sure I used to know how to do this, but now I can't work it out. I have a content type, lets say it's called "project". A project can have multiple contributors, and for each contributor I need ...
0
votes
1answer
19 views

Display entityreference field in search-result.tpl

The entityreference field (field_parent) shows up in node.tpl using print render($content);, but isn't displayed in search-result.tpl. My search-result.tpl looks like this right now: <li ...
0
votes
0answers
12 views

Rule to store user's last post date and scheduled rule based 30 day reminder

In this screnario, user's can post 1 node of a specific content type every 30 days (interval changes depending on user role). We are using node_limit to accomplish this; it's doesn't play with rules. ...
0
votes
0answers
19 views

Node-insert check and alter value of other entities

I have a site I'm building where the admin can add sale "specials" (sales) to a store. So there's the store content type - and the sales are entity references appended to the store. Each ...
0
votes
2answers
61 views

How to get the field values with EntityQuery?

I am working on a query filtering form that lists entities. I have various 'range' fields and I would like to display the min and max values. Is it possible to retrieve field values with EntityQuery? ...
0
votes
0answers
7 views

How do I change the entity type of a bundle in ECK?

I have a load of entity types and bundles that have been created. I'd like to consolidate all the bundles under one entity type. Going from many entity types with one bundle to one entity type to ...
0
votes
0answers
6 views

contextual or conditional file entity view mode

I have some different view mode for file entities (created with the entity view modes module). In an node I have a select field and an image field. As display format I set 'rendered file'. Now I ...
2
votes
2answers
10 views

How do I create a container entity that contains variable number of fields

I am interested in creating a content type that contains a variable number of fields. Each field contains an entity reference to another entity, but as I said there may be one field or 4 fields. I'm a ...
0
votes
1answer
27 views

Getting access denied when altering user view route

I want to display custom content for the user profile page instead of the entity view so I am altering the entity.user.canonical route and I am setting a custom controller and title compared to the ...
0
votes
1answer
27 views

printing file entity fields in a node.tpl

I have some fields in a file entity type. Now I need to print some of these fields directly in a node.tpl. How can I do this?
0
votes
1answer
35 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
26 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
23 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
10 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
13 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 ...
1
vote
2answers
30 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
22 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
3answers
194 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
63 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
28 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
112 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
15 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
39 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
43 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
18 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
31 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
20 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
36 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 ...
1
vote
1answer
23 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
11 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
30 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
1answer
18 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
25 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
68 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. ...