"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
4 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
18 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
11 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
10 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
21 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
15 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
6 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
21 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
0answers
16 views

Content (Entity or node) reference that doest not update

I am planning to start working on a project where i am looking into the following questions: -> I am looking into using content types or eck entities? But since we need revisioning on most content, i ...
0
votes
1answer
8 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
28 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
31 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 ...
0
votes
2answers
28 views

Drupal commerce - purchase a product at registration

I'm trying to use Drupal Commerce for a subscription site that will have only one product to purchase - a subscription to a service. I'd prefer if a user could either do product subscription as a ...
0
votes
1answer
33 views

How to print specific fields in a view?

I have 3 content types: Country Destination Attraction Each attraction has an entity reference poiting to Destination. Each destination has an entity reference poiting to Country. I need to ...
0
votes
1answer
32 views

Creating a Custom Field Type for Fieldable Entities

Problem My custom field type will not save data. Every time I save the entity it is attached to (it doesn't matter what entity I do this on) the value always comes out NULL and SQL throws an error ...
0
votes
0answers
12 views

Can't delete entities, using entity_delete_multiple

I was studying, how to work with entities: http://www.bluespark.com/blog/drupal-entities-part-3-programming-hello-drupal-entity I downloaded the module, created by the author of that article. Then I ...
0
votes
0answers
20 views

Get a node and fields with SQL?

Is there any way in Drupal 7 to load a node and its fields without the Entity Query API? I need to get a field value based on another field in an external script, and don't want to bootstrap Drupal.
0
votes
2answers
38 views

Autocomplete on multiple fields Entity Reference

This is my case: I have a content type advertisement with some fields and an entity reference of content type product. The widget type of the entity reference is autocomplete. These are my settings ...
0
votes
0answers
6 views

Compound Field. Allow validation only on content edit

I have created a compound field following a tutorial in a book. I have also implemented validation which is working fine. I have also managed to only call the validation when content which uses this ...
2
votes
2answers
126 views

How to pass an extra argument to an entity form?

Suppose, I've two entities: entityA entityB A user creates an entityA and has the option of creating multiple types of entityB referenced from a single entityA. For example, a parent-child ...
1
vote
1answer
21 views

Referencing/relating content between content types

I'm completely noob on Drupal, actualy I'm trying to find a way to build a website idea using it. I want to let users/visitors to create travel tips, so at this site I'll have contents like: ...
0
votes
1answer
33 views

Making entities under another entitytype

Suppose, I've created -name -machine_name an entity_type myentity with its schema as: -name -machine_name Next, I want to create another entity subentity that will be grouped under myentity. ...
0
votes
0answers
7 views

Properties of entity is setting zero or empty

I have implemented hook_entity_property_info into my custom module to add custom properties with Order of ubercart. Code in custom_module.info.inc. function custom_module_entity_property_info() { ...
1
vote
0answers
26 views

How do I send an email to users who have been inactive for 30 days with a condition

I used the answer in How can I send email to user that is not logged in since 30 days? to successfully set up an action set component that would email the user and a rule that would schedule that ...
1
vote
1answer
20 views

How do I support text formats for an entity property?

I have a custom entity I've created following this basic SitePoint tutorial. My custom entity has just two properties, a name and description. My entity is not fieldable (maybe it needs to be?. I ...
1
vote
1answer
64 views

Passing object in routing.yml

I have an entity and when I try to pass the whole entity object, only the name is passed through the routing. Here is the relevant code in routing.yml: mymodule.myentity_info: path: ...
0
votes
2answers
22 views

Feeds : creating a node dependencies at importation

The Excel file I'm trying to import is comprised of two part, the first three columns describe a node that might or might not exist currently, and the three last columns are my entity informations. To ...
0
votes
0answers
11 views

Using content field widget in custom block?

I'm trying to figure out an easy way to implement a content field type (image_field) with a widget (imagefield_crop) on a custom block. The block currently has an upload image feature, but I want to ...
0
votes
1answer
52 views

Enable/Disable field values based on another field's value

I am using Drupal 7 with the Entityform and Conditional Fields modules to build a form and need to see if it is possible to disable a value in one field based on the selected value of another field. ...
0
votes
0answers
13 views

Why would a Node Export and Import onto *same site* (code base/db): give: EntityMalformedException: Missing bundle property on entity of type node

I used Node Export to export a Node to a file and then the import operation of Node Export to re-import the file, to the same site. I got: WD node: EntityMalformedException: Missing bundle property ...
1
vote
1answer
24 views

Access denied while deleting an entity

This is my Config entity: * @ConfigEntityType( * id = "myentity", * label = @Translation("My Entity"), * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigEntityStorage", ...
0
votes
1answer
58 views

How to use module template to override a specific Views field and send the right variable?

I hope the title is ok. I've seen many discussion here about using custom templates in a module when using views, but i lack a piece of answer : how to use specific variables from an entity in that ...
0
votes
1answer
26 views

EntityListBuilder only shows the last Entity that was added

I've build up an Entity for my module. The problem is that the EntityListBuilder doesn't show all the entities that I've added. Only the last entity that I added shows up. Here is the drupal sandbox ...
1
vote
2answers
40 views

display the entities that are referencing the current entity with views

I have a content type "reservation" and another "room" this is a simple booking app that Im making from stracht "just for learning purposes" Im using entity reference for make the reservations, so I ...
0
votes
1answer
37 views

Checking if a machine_name exists or not

My EntityForm has a field where '#machine_name' => array( 'exists' => array($this, 'load'), To check the validation of this, I wanted to know about writing the function load() in my ...
0
votes
1answer
63 views

Building EntityForm in Drupal 8

I'm continuously getting the error: Drupal\Core\Config\Schema\SchemaIncompleteException: Incomplete or missing schema for mymodule.myentity.myentityname in ...
0
votes
3answers
43 views

What entity should entity_id be joined on?

I'm writing a complex custom query to get order information from a Drupal Commerce install for export. The table "field_data_commerce_customer_address" has a column "entity_id." I've tried to join ...
0
votes
0answers
10 views

Backreference an entity programmatically and with views

I have a content type group (organic group) and another sub-group (also organic group) the sub-group content type has an entity reference field "grups_audience" that can reference its parent group ...
0
votes
1answer
40 views

Double click quickly on the entity save form two entity get created [duplicate]

I am using Entity Construction Kit 7.x-2.0-rc2. I have created one entity type with some manage field as title,message. if i double click quickly on creating entity then it will save entity form two ...
0
votes
1answer
42 views

Get custom fields from users table in global user object

I've altered users table and added two new fields directly using MySQL workbench first_name last_name If we add new fields by config > people > site information > manage fields, it does not allow ...
0
votes
0answers
20 views

Adding custom publishing options to entities

I am using the media-module and its file-entity. Now i want to add a custom publishing option when creating a new file (Known publishing options are: 'Promote to Front', 'Sticky' and 'Published', i ...
0
votes
0answers
43 views

Site broken with “Call to undefined function entity_get_info()”

I am working on a module that uses a custom entity built with eck. I got the white screen of death while making changes to a function. I completely commented the function I was working on when it ...
0
votes
1answer
25 views

How to manually delete a node from the database knowing its id

Well, look my problem is weird, I have a view that lists content of a desired type, it is listing all the content of a type, I have deleted from the drupal admin UI a node of that type, but the view ...
0
votes
0answers
21 views

Custom Entity interacting with view

I have tried to create a custom entity in Drupal. It is working fine for now, but a lot of work needs to be done. I want the fields in the base table of the entity and the fields that I have added ...
0
votes
1answer
28 views

How can I pass page variable to a form builder function in a custom module?

I have an entity page where the entity has an email field. On that page, there is a form built in a custom module. What I'd like to to is that on form submit, the module sends an email to the address ...
0
votes
1answer
24 views

How to avoid caching of fields in Entity View?

I have a few computed fields on my entity and they have dynamic values. These values cannot be cached because they change often. I've created the necessary field formatter that uses the same approach ...
0
votes
2answers
32 views

Best way to create a property of an association in Drupal 7?

I have a node Theater, and a node Movie, and a Theater can have X movies and for each movie at that specific theater there are Y showtimes. How can I set up the property "showtimes" of the association ...
0
votes
1answer
16 views

How do I load multiple nodes by a user reference?

I have a content type "property", with an owner field (field_user_ref) which is a user reference. I want to loop through all of the properties, given a specific user_id. $user_id = 18273; $query = ...
0
votes
2answers
46 views

Drupal 7 — When calling entityMetatdataWrapper->value(), can you strip all array keys appended with :protected?

I'm trying to replicate entity->export() using Entity Metadata Wrappers. When I call value() on entity_metadata_wrapped entities (in this case a field collection), I get everything entity->export() ...
0
votes
1answer
23 views

How do I use add the image field Product entity in to my view?

I'm using Drupal 7.28, Views 7.x-3.8 and Commerce 7.x-1.9. I've created lots of products in the Products section and I've also created some product displays. For example, I have created a round oak ...