"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
30 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
26 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
9 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
30 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
117 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
18 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
29 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
6 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
23 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
19 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
59 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
20 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
10 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
35 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
11 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
19 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
50 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
36 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
31 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
59 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
39 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
9 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
37 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
40 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
19 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
34 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
24 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
20 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
22 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
23 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
30 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
14 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
38 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 ...
0
votes
1answer
25 views

Coldfusion - MsSQL to Drupal Mysql

I would like to receive some input on how you guys would approach the following: We have an internal Projects Database application that was intially developed in ColdFusion and Microsoft SQL, approx. ...
2
votes
1answer
28 views

Output of entity_metadata_wrapper does not dump to dsm()/dpm() [duplicate]

Given this code in a theme_preprocess_page($vars).. $node = node_load($nid); $wrapper = entity_metadata_wrapper('node', $node); dsm($wrapper); Why doesn't $wrapper produce a debug dump in dsm() or ...
0
votes
0answers
10 views

Use EntityFieldQuery() inside Migrate Complete() statement

I'm trying to use the EntityFieldQuery() inside of a complete statement during my migration in order to edit a field after the migration is complete. However, my $result is always returning an empty ...
0
votes
1answer
13 views

How do I include a class in a link inserted in an entitiy's link area?

I want to insert a link to a ctools modal popup with a custom style (class) into the link area at the bottom of an entity (e.g. a node). I do this using hook_entity_view_alter. This is how the ...
0
votes
2answers
28 views

Is there module to generate form and save into content type?

I find a module to create a form like Webform or Entityform and save this one directly into a node (specific content type or entity).
2
votes
3answers
30 views

Modifying an Existing Entity Column in hook_update_N

This is a tricky problem but here is the jist of it. I have an entity that has a property called revision_id. Through hook_update_N I want to do 2 things. Change the db column name to node_id ...
1
vote
2answers
93 views

Why entity_metadata_wrapper->save() doesn't update node's revision?

I'm developing a module to update nodes(enable revision). It looks like this. $nodes = node_load_multiple(array(), array('type' => $bundleType)); foreach ($ndoes as $node){ $w = ...
0
votes
1answer
57 views

Field collections data not being saved

I am working on a website which has many Entity forms and some of the Entity form has field collection with few fields in it and it allows multiple items "Unlimited". When you save the node, the data ...
0
votes
2answers
29 views

Permissions Hook?

I have a lot of user-generated content that I want to restrict to only be viewed by 'in-network' peers. I was originally trying to use Organic Groups but it's way more functionality than I need and I ...
0
votes
0answers
37 views

Search API multiple entity bundles

I would like to get some advise on what approach to take, implementing search api with views (database server) to search through 2 entity bundles (with different fields) of the same entity type. The ...
0
votes
1answer
46 views

How to load entity by UUID from url argument?

Usually routes have the {entity_type} argument in their path and Drupal loads the entity by the ID that is the url argument. For example route defining /node/{node} would work with /node/5. I need to ...
0
votes
1answer
29 views

How to override template for view mode of a entity within a module?

I see in theme suggestion array that I can override template for my custom entity type based on view mode like this: custom_entity__custom_entity__view_mode_name Now I want to put ...
0
votes
0answers
22 views

How can i autocomplete 2 entity reference fields value from other content types?

How can i autocomplete 2 entity reference fields value from other content types? For Help: I have 2 content types- a. Music b. Album Album has 2 fields, a. Title b. Category I already create a ...