"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
2answers
24 views

output a referencing field in node tpl

In a node type hotel I have an entity reference field to a node type offer. For the offer node.tpl I need to output some fields of the referencing node type hotel. I have no idea how to get these ...
0
votes
0answers
12 views

Handle formatting of longtext value for entity wrapper

So I have a working setup where some code pulls in the latest Wikipedia extract of a page. I then use Entities to handle a node creation, adding the contents of the extract to the longtext value of ...
0
votes
1answer
9 views

How to render Entityform submission (entity) without DOCTYPE and HEAD tags?

I need to render entity as a part of page instead of individual page. By this I mean I want to able to render it without DOCTYPE declaration and HEAD tags. Typically this could be done within ...
0
votes
0answers
21 views

Saving form fields on custom entity

I'm having problems saving my custom entity to the db. I created a custom entity called 'review' using hook_entity_info() with a custom controller. I have specified some parameters in the controller ...
0
votes
2answers
29 views

How to calculate the sum of the values of a multi value field without page reload

For a content type with a decimal field with unlimited values (rows), how can I have another field in that same content type that shows the sum of all of the decimal values from the multi value field? ...
0
votes
1answer
24 views

Custom Entity Not Showing in View Creation UI

I started learning Drupal 8 this week. I followed this guide to create a new entity, which I then made available through REST using the following tutorial: ...
0
votes
0answers
15 views

CSRF Validation Failed On Creating Node

I am connecting Drupal Services to iPhone. On sucessful Login i am getting session id , session name,token . Then I want To create node . I am posting token value in X-CSRFToken and ...
0
votes
1answer
19 views

How do I programmatically add a field to an existing fieldset that's part of the user entity?

I'd like to know how to add a field to an existing fieldset in a user entity I've seen this example: Add Fields to Field Group programatically http://drupal.stackexchange.com/a/71902/1082 $groups = ...
0
votes
1answer
12 views

Get value of field attached to the file entity in a view

I extended the file entity of type video, which ships with the media/file_entity module, with an extra field "tags". How can i get the values of this attached field in views?
1
vote
1answer
21 views

Get all entities tagged with term

taxonomy_select_nodes returns all the nodes tagged with a given tid. This function checks the taxonomy_index table. That table stores the tid and the nids on which it is tagged. Let's say I have ...
0
votes
1answer
18 views

What does exacly mean by Entity CRUD API?

Here in the documentation comment for entity_export() says: Note: Currently, this only works for entity types provided with the entity CRUD API. So, what does it actually mean? Background info: ...
0
votes
0answers
20 views

entity_create always returns False

I'm stuck with trying to get my head around entities, and as I was following This tutorial, I ran into some troubles with this page callback method: $projects = entity_load('project', array(1, 2, ...
0
votes
1answer
22 views

add field in admin>content that show if entity is translated

I'm looking for a field that i can add in the admin>content view. I want to know if the entity (News items) is translated or not. (Dutch(default) and English) Now i always have to click edit article ...
0
votes
2answers
47 views

How to load a taxonomy term (or entity) by field value?

To load a taxonomy term programatically you can use EntityFieldQuery. <?php // Get taxonomy term by field value $section_vocab = taxonomy_vocabulary_machine_name_load('section'); ...
1
vote
1answer
44 views

How to render a contact form in a theme

I am looking for a way to display the side-wide contact form in a block (through my .theme file). Using this code won't work (as contact_form is not a content entity?): // get default form // get the ...
1
vote
1answer
29 views

Insert several lines in field collection programmatically

I have a problem with field collection and entity reference fields. I have a field collection called 'field_co_intervenant' and i want to add several entities in this field collection and after saved ...
0
votes
0answers
43 views

Send a form to twig template in Drupal 8

How I can pass a form to twig template in Drupal 8? For example, I get this: a form: mymodule/src/Form/MyForm.php Then on my Controller: public function myController() { ?????? return [ ...
0
votes
1answer
14 views

How to render protected element?

I want to print [entityInfo:protected] present in below image. I am able to print all element except [entityInfo:protected] and [entityType:protected]
0
votes
0answers
18 views

How do I properly define the widget for a file field attached to an entity type? [duplicate]

I'm creating a custom entity type and trying to add a file field to it. Amongst other field definitions I have the following in baseFieldDefinitions(): $fields['file'] = ...
0
votes
0answers
6 views

How to validate user inputs for an entity which uses fields created by the Field Manager UI

I have successfully defined a new entity and made it fieldable. I can the display the form using the field_attach_form() function. My issue now is that I would like to validate the user inputs. When I ...
0
votes
1answer
7 views

How to create a new entity that is fieldable

I am currently learning how to create entities in Drupal 7. I have successfully defined a new entity and made it fieldable. My question is how do a create a new instance of that entity? I understand ...
0
votes
0answers
17 views

Latitude/Longitude processing to avoid Null Island entries

I have to display some 8k points on a map rendered by a view on my site. Since those locations will be updated quite often i decided to use a custom entity (lets call them "Structures"), so i could ...
0
votes
1answer
29 views

How do I get a field translated in Drupal 8

I have a multilingual site in Drupal 8, and several node, some translated and others not. As I can programmatically get the translated field or by default they give it back from the original language. ...
0
votes
1answer
16 views

How to remove delete link from admin manage fields ui

I have created a new entity type and progamatically added the fields it requires. My issues is that on the Manage Fields UI (the same interfaced used for managing fields for basic pages/articles), in ...
0
votes
2answers
26 views

Computed field that displays the full username of the author

I am using a computed field and I want to display the field_first_name and field_last_name, which are properties of the user that created that node. I have been trying things, but it seems like ...
1
vote
1answer
18 views

Add fields to entity in module update

I'm using Drupal 7 and I have a module which has working implementation of the Entity API module. In my_module.install file there is a hook_schema() in which I defined table columns: ...
0
votes
0answers
17 views

Drupal 7 Create a new account for an anonymous order only for commerce license orders

With Drupal 7 using Rules 7.27, I've installed and set up Drupal Commerce with no real problems. The rule ‘Create a new account for an anonymous order’ works well but I need to add a condition that ...
0
votes
1answer
12 views

How to translate entity in the views footer

I am creating a multilingual site. I have views and when it was created, I added to the footer entity (node/22). Next, I created a translation of this content and now changed id (node/45). How to ...
0
votes
3answers
56 views

How to problematically display an image field in Drupal 7 + default value when needed

I've used field_view_field to display an image field for a specific entity in Drupal. The problem is when that entity doesn't have any value for field. I expect field_view_field to display the default ...
0
votes
1answer
10 views

(Rules) In Rules, is it possible to access the fields of a referenced entity of an entity?

I've got this scheme: entity person, bundle person, entity health, bundle health. Bundle health has field energy. Bundle person has an entity reference of type health. In Rules data selector, I want ...
1
vote
2answers
32 views

Memory Time-out

I am saving a lot of entities as part of a script - several thousand. This is frequently causing out of memory errors. I've been trying to do something like this: cache_clear_all(); ...
1
vote
1answer
26 views

Change values of nested fields with entity_metadata_wrapper

The background of this question is that I'm trying to migrate data from Drupal 6 Imagefield Extended to Drupal 7 File Entity (with File Entity Inline). See also https://www.drupal.org/node/974888 ...
1
vote
0answers
14 views

Any benefits for using fields as opposed to properties

I have a module that pulls data constantly from an external source, from up to thousands of different items with over 50 properties. The data is being collected every 15 minutes. The problem is that ...
0
votes
1answer
24 views

Views load the whole entity even though they only need 3 fields

I am using Views to fetch the 3 fields of a specific entity. However, this leads to the view to make a full load of the entity and all the images included in it, even though they are not displayed. ...
0
votes
0answers
6 views

entity view behaves differently

$entities = entity_load('node', array($nid)); if (!empty($entities)) { $render_array = entity_view('node', $entities, 'teaser', NULL, TRUE); print $content = ...
0
votes
0answers
10 views

Trouble adding pager to the nodeview page in Drupal 7

I wish to careatea pager for a mynode(custom content type) list theme page. The requirement looks similar to Sortable, paged table retrieved using EntityFieldQuery. But I doubt I am running out of the ...
0
votes
1answer
20 views

Get all fields connected to an entity

I am trying to figure out the structure of a fieldable entity. I can see the main table in to install file, however it has various fields attached to it. How can I get an grand overview of the ...
2
votes
2answers
65 views

How to display specific nodes in an EVA based on common taxonomy

I am trying to display nodes in an EVA, attached to a node type that shares taxonomy. The EVA passes the node ID to the EVA, so I have a contextual filter, but am having trouble figuring out how to ...
1
vote
1answer
41 views

Entity Reference - Auto complete field in content type

I had an issue before (please click here to see it) related to entity reference and I was able to solve it with no problem. Now I have another issue: I have 2 content types called projects and ...
0
votes
1answer
24 views

Get Views object from entity template

I have a Views, that renders nodes as "Rendered entity" with custom display mode - "cover". In template (or preprocess function) for this specific theming case, I need to get the Views object, that ...
0
votes
2answers
43 views

How to change the date format for date entity field

I created an entity with date field. Currently the date is being output in the format "mm/dd/yyyy": How can I use the format "dd.mm.yyyy"? I couldn't find any settings, related to it, in the field ...
0
votes
0answers
22 views

Updating a profile2 with 0 field collections using Entity metadata wrappers

I have a profile2, with a field_collection that can have unlimited multiple values. I programmatically update the profile2 from external data, and it could be the case that for the field collection ...
1
vote
1answer
101 views

Creating a page per bundle

I am trying to create multiple bundles for a given entity. However, when I'm doing this, all of my manage field and manage displays are on the same page, and it doesn't appear like any of the other ...
2
votes
1answer
30 views

Creating an entity with an unlimited number of bundles

So I want to create an entity that can have as many user-created fieldable bundles as possible. My first thought was to look at the Profile2 module, however I notice that there appear to be two ...
0
votes
0answers
31 views

Retrieving entity data in views with dynamic (per-row) relationship

I have custom entity 'entitystatus' that holds 'entity_id' reference and 'entity_type' field. Now I need to build a view that will display Entity statuses attached to different entity types (i.e. ...
1
vote
1answer
40 views

How i can use entity_metadata_wrapper for new database entry and update data in Drupal 7

How i can use entity_metadata_wrapper for database entry and update data in Drupal 7 I am using below code to save entry in database but not finding logic to update existing entry $node = new ...
0
votes
0answers
23 views

Making a list of content fields

I am making my first Drupal site and I have a problem. Little background: On the site users can register for events. These events are listed by different organisations. A user can choose which team ...
2
votes
2answers
41 views

Get tid as integer from tid array returned by EntityFieldQuery

I am using an EntityFieldQuery to return an array of taxonomy terms matching a provided custom field value. Using the example given in this question, I wrote a function that accepts the vocabulary, ...
-2
votes
1answer
29 views

How to display author name and post date in entity view page?

I am using Entity Construction Kit module. Thanks.
0
votes
0answers
17 views

Product thumbnail in custom block wont generate if on same product page

I have an issue with a custom module I have created to display contents of the cart in a popup. I appear to have it all working apart from the thumbnail image of a line item not generating if viewing ...