"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
6 views

commerce multi stock locaton data storage

Im working on a new module that will store stock levels in multiple inventory locations. What is the "best" way to store the data? Im slow to just attach and array of key/values to the product object ...
0
votes
0answers
43 views

PHP Fatal error: Call to undefined function entity_crud_get_info() in #########\docroot\sites … in xxx/modules/entity/entity.rules.inc on line 96

I am getting the above error whenever I install the module. The above errors keep occuring on every page. How can I debug it or solve it? I am clueless and working for a solution Any pointers would ...
1
vote
0answers
14 views

Why does node_add_body_field() lock down 'body' field instances to the 'node' entity type?

For a current project our taxonomy terms need a text field with a summary; naturally as there's already a body field available on nodes, I thought I'd just use that. Confusingly, 'body' doesn't ...
0
votes
1answer
12 views

How to add an image property to an entity?

I have a requirement to add a unique icon to each bundle of an entity. My entity code is very similar to the model module. I have 2 entities, one for holding the actual entity instances, another for ...
0
votes
2answers
21 views

Display a product with two columns

I want a two-column page layout to display my products which I create with 'drupal commerce'. The layout is basically the picture and similar articles on the left. Description on the right. Now, I ...
0
votes
1answer
23 views

Create entities when user account created

I am looking for a hook to fire off an Entity creation method (for an unrelated item that pertains to the user) when a user registers for the site. I'm divided between ...
0
votes
1answer
11 views

Entity reference, save only value

I am looking for the best approach to do the following: I have a content type Product and a content type Invoice, where i can reference products. I would like to be able to save the referenced ...
1
vote
0answers
21 views

how does entity_load and entity_save work with mongodb

Apologies if the question sounds too ambiguous, I am trying to migrate my nodes to MongoDB with the contributed MongoDB package's MongoDB Migrate module and am having trouble in migrating my node type ...
1
vote
1answer
15 views

Calling hook_entity_view from a theme

Is there any way to call hook_entity_view() from a theme? I tried adding the implementation to the template.php file, but the function is not called. I know I can do it via custom module, but as ...
0
votes
1answer
18 views

entity reference with multiple values?

I've added a new field to a content type, using the Entity Reference module. The new field is to allow entry of up to 4 related articles (curated content - chosen by the admin) per article. I've set ...
1
vote
1answer
20 views

Accessing Drupal 6 data using Drupal 7 entities

I have a project where we have a legacy system built in Drupal 6 that has been heavily customized, with much of the data stored in custom tables. We are currently planning a D6 to D7 upgrade, but we ...
1
vote
0answers
12 views

How to print the number of nodes of a certain type referencing to content

Using Drupal 7 and the latest Views and Entity Reference modules. I have 3 content types: - Destination - Museum - Restaurant Museum and Restaurant both reference Destination via field_destination ...
0
votes
1answer
25 views

How do I get a freshly updated value (i.e. not the cached value) using entity_metadata_wrapper?

In my code I am inserting a new value into the database directly using db_insert (i.e. inserting an entirely new row). The type of field, however, already exists in Drupal which is called ...
-1
votes
0answers
8 views

How to use EntityContentUIController

It doesn't seem to create any "list" page for entities, but why? How should be use it and when?
0
votes
0answers
15 views

EntityQuery: multiple fieldConditon with OR operator [duplicate]

It seems kinda trivial but I can find out an example on the Internet to do that kind of query: $entityQuery = new EntityFieldQuery(); $query = $entityQuery->entityCondition('entity_type', 'node'); ...
1
vote
1answer
20 views

How do I update an entity?

I have defined my own entity: 'game'; created some 'games' with entity_create; and loaded one of these 'games' into a form for editing. Now, I want to update the entity with my submit handler. Here is ...
1
vote
0answers
14 views

Adjust Entity Reference “Number of values” Based on Role

There are two roles, standard and premium. I would like the standard role to be able to select up to 10 users via the entity reference field. I would like the premium role to be able to select an ...
0
votes
2answers
38 views

Drupal 7 custom submit handler not getting triggered

I am having a problem connecting a custom submit handler to a form. I am trying to switch off redirecting after the save of an eck entity on edit form. But i am not getting that far as my submit ...
0
votes
0answers
13 views

Entityform multi check boxes only first selection comes in email

I am using the Entityforms Module for forms. I have a simple form with textfields and a checkbox multi-select field. When you check more then one checkbox, only the first one comes through the email. ...
0
votes
1answer
11 views

Taxonomy not working with the ECK module

I have created a image gallery using the ECK module and for some reason the taxonomy is not working. These are the step I follow to created the image gallery. Created a Entity called Media ...
0
votes
0answers
19 views

Drupal 7 views rendered entity + search

I created a simple custom entity with Entity Api. It has a simple db table with records, and I did an index with Search API from this. My goal is to create a view with "Search API multi-index ...
0
votes
0answers
19 views

How to use entity as form(to input data) created by ECK(Entity construction kit) module

I have created 2 entities through ECK module. and I want that entity use on my user profile(on Panel). then it is possible to call or put that entity on any form, any content type.
0
votes
0answers
38 views

Build a Form to enter data into database [closed]

So, yes I have read a plethora of posts that say you can add data into the database with EntityForm or Webform - the UI version not custom code. However I have tried to build out a form with both to ...
0
votes
1answer
41 views

Drupal 7, Entity Reference user autocomplete field

I have a custom content type that has a users: entity reference autocomplete field. For some reason the list gets populated as [realname] ([name]). In other words the realname and username tokens are ...
0
votes
1answer
34 views

multiple entity type in entity field query

how to add mutilple entity_type and bundles in EntityFieldQuery? $query->entityCondition('entity_type', 'profile2') ->entityCondition('bundle', 'user_profile'); Is there any way to do ...
0
votes
1answer
32 views

Is it possible to disable a node module?

Is it possible to disable a node module in Drupal 7? As I understand through interface it is not possible. Why node module is so important? What if I'm going to use only custom entities?
0
votes
1answer
18 views

Display blocked users to anonymous

How can I display blocked users in a template file? I have an Entity Reference field that I'd like to use to show anonymous users any blocked or active users added to the Entity Reference field. Is ...
0
votes
1answer
43 views

Drupal entity from different database

I have an existing database (which is not under my control) that i want to use as base database for my entity. However I'm stuck at getting the data from the database. There already exists a question ...
1
vote
1answer
85 views

Performance: Efficient use of EntityFieldQuery (with node_load OR node_load_multiple) to update thousands of nodes with/without conditions

I have script that queries a system called Symplectic for publications of over 30 users (each authored over 300 publications). Most of the publications are authored jointly by more than one user. I ...
0
votes
0answers
23 views

hook_node_presave() fired twice when adding new node

I've just noticed that hook_node_presave($node) is fired twice when adding new node. Once it's called from node_form_submit handler and the second time from entity_save. Turns out $node->nid is ...
0
votes
0answers
22 views

Returning a variable from a rules action

I am trying to create a variation on Fetch Entity, and I'm having trouble returning an entity. I'm just grabbing the data using db_query, and trying to return an array of nodes that are loaded, but ...
2
votes
1answer
23 views

3-rd decimal digit has disappeared in the output

I created a field, attached it to the entity: coefficient_to_second_side. Type in the database is decimal(10,3). Then I added a value: 1.001. When I select this field manually from the database, the ...
0
votes
2answers
23 views

Create referenced node on the fly in Drupal 7?

I have a node called "house" which references another node called "room". When I create a house, i.e. go to node/add/house, there will be a block where I can choose all the rooms I've created. What I ...
0
votes
2answers
26 views

How to remove entity type from drush?

How do I remove an entity type via drush? List of entity types I can get via: drush eval 'print_r(array_keys(entity_get_info()));' Array ( [0] => node [1] => taxonomy_term [2] ...
0
votes
1answer
23 views

How to list all available entity types?

How to list all available entity types in Drupal using drush? Related: get ALL node types
0
votes
1answer
22 views

Entity Form to insert data into Custom Entities

I am finally getting to Entity Construction Kit. I have built out my entity with fields, I have also set up a feed to import data into the entity. However, I also need to build a form that will push ...
0
votes
1answer
16 views

How to display a view of products that are selectable

I am working on a site that will capture site details by the sales reps. They will also use the site to order products for the customer and at the same time enter the installation criteria of the ...
1
vote
1answer
21 views

Is it a good idea to mix node api and entity api?

I have a custom module that depends on several contrib modules. One of the contrib modules has a new version out and has switched to using entities. The code in the custom module is using node api ...
1
vote
0answers
26 views

Injecting field data in a custom entity

I have created a custom fieldable entity. Now I want to inject the field data into the entity and render the complete entity with the fields. The following code is working for text fields and ...
0
votes
0answers
18 views

Tell Display Suite to not load all fields for performance?

Afaik, before Display Suite renders an entity, it first calls entity_load() or something equivalent (e.g. node_load()), which loads all the entity fields. If the entity has many fields, but only some ...
0
votes
1answer
27 views

Stop rendering custom entity label in view mode

I have declared a custom entity with a schema with a few fields on which is all working as I expect. I want to remove the label when rendering the entity so have tried the following. Added some ...
0
votes
0answers
23 views

How to implement a disaggregated data property

When users on my site register, they must enter some address information after which an external API call is made. The response contains an array of additional, useful location information. Some of ...
1
vote
0answers
28 views

How to use EntityFieldQuery::fieldCondition for entity reference field

Suppose, we have an entity "song", that has an entity reference field, called "authors": I added a filter for this field as a group of checkboxes: After the user submits the form with checkboxes ...
0
votes
0answers
137 views

Warning: array_flip(): Can only flip STRING and INTEGER values!

I have a custom module that hooks into a commerce extension module the function splits a payment for a product and splits it to beneficiaries who helped create the product. I use user_referance ...
1
vote
1answer
25 views

Get a list of revision IDs for any given entity?

What's the most uniform method for getting a list of revision IDs for any given entity, programmatically?
0
votes
0answers
8 views

Views custom entity permissions

I've created a custom entity and set it up so I can view it in views, the problem is that when I create a list of custom entities using views it just ignores the permissions. I have a permission so ...
1
vote
1answer
25 views

Issues with the entity field output

Suppose, we have an entity "song", that has a required field, called "authors": In the list of songs in the admin panel I want to output the list of all the authors in the search block: //search ...
0
votes
1answer
11 views

How to add data to a message type custom field that's inherited by all message instances?

I'm using the message module, and I have some message types. Each message type needs to have a node reference field on it whose value would not change for the entire message type. But different values ...
1
vote
1answer
42 views

How do I use an array with an 'IN' condition on EntityFieldQuery::entityCondition?

I read that entityCondition should take an array, and I've constructed an array according to examples I've seen on the web. But no dice. I get the error below. If I use a string, the error goes away. ...
0
votes
0answers
53 views

How to show a confirmation form in a modal to delete one entity whilst adding/editing a different entity/node?

I have entity 1 (E1), the main entity, in which entity 2 (E2) can be used/edited/deleted. I would like to be able to show a confirm_form after choosing to delete E2 in a modal whilst creating/editing ...