Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [entities]

Nodes, comments, taxonomy terms, and users, using the terminology used since Drupal 7, are generally called "entities."

0
votes
0answers
73 views

How to upload profile picture directly from user-view

How can I allow users to update their profile-picture directly from the user view, without navigating specially to the edit-account page? Each user on site has a gallery of uploaded pictures. A ...
0
votes
1answer
61 views

How to hide child field collection using jquery

I have 3 field collection 1st is parent in that having other 2 is child field collections. parent FC: Student Info child FC 1: English Info child FC 1: Maths Info Set field setting "unlimited" to ...
0
votes
0answers
28 views

Don't save Inline Entity Form when all fields in the ief form is left empty

How do I not save the InlineEntityForm(ief) in a node form, if all the fields in the ief form are left empty? None of the fields in ief are mandatory, ief is always open (ief - single value). The ...
-1
votes
3answers
83 views

How to get the length of a field collection array

I'm using Drupal 7 and want to get the length of the field collection array. How can I get it? Can someone provide the code snippet for that? This is the code that prints the table. <!DOCTYPE ...
1
vote
1answer
48 views

Use an Address Field with 3 lines for the street

I'm working on an Entity where I created a field containing Address informations (like country, city and street). The default Address Type in Drupal 8 supports only 2 lines for the street information....
0
votes
1answer
285 views

Create new child field collection programmatically

I have 2 field collections (Parent and child) Parent Field collection: Test Student Info machine name: field_test_student_info Child Field collection: Marks machine name: field_marks In parent field ...
0
votes
0answers
66 views

Paragraph fields are not properly mapping into the custom block using migration plus yaml

I have created the paragraphs using migration plus module and it is working fine. To map the above created paragraphs to my custom block, I wrote the below YML file. Other block fields are mapping ...
0
votes
1answer
151 views

Add new field collection item in existing Field collection

I have 1 field collection Field collection: CKT Info child2 machine name: field_ckt_info_child2 In that have 2 fields: Field1: English CKT child2 machine name: field_eng Field2: Maths CKT ...
1
vote
1answer
117 views

How do I unlock a field?

In Drupal 7 it is possible to use: $field_name = 'field_name'; $field = field_read_field($field_name); $field['locked'] = 0; // 0: unlock; 1: lock. field_update_field($field); How to do this in ...
0
votes
0answers
25 views

Remove a specific field

In my backend, I have an error "node.field_descriptif need to uninstall", but I don't have this field anymore, but it is in the database. How can I do that? EDIT : I tried drush entup This is ...
-1
votes
1answer
23 views

Custom post type form field to reference other content type field values

I have two custom content types. Comic books borrowed, as an application form to borrow comics Available comic books and their respective available issues My goal is to have the website editors ...
0
votes
1answer
41 views

how to get values from two content types using one entity reference

I'm using Drupal 7 and have 3 content types - Product Purchase Sales In sales content type, I'm using entity reference I want to fetch and display "product name" from Product content type and "...
0
votes
1answer
31 views

Custom entity form submit handler not being invoked

I'm trying to attach a submit handler to an entity form (language_delete_form) provided by the ConfigurableLanguage config entity. On the form alter function for that form, the top-level submit ...
0
votes
0answers
39 views

Computed Field on Custom Entity

I want to make a computed field to be pointed by 'label' key on my custom entity. * entity_keys = { * "id" = "id", * "label" = "codigo", * "uuid" = "uuid", * "uid" = "user_id", ...
1
vote
0answers
112 views

How can I drag and drop sort nodes and output result as JSON?

I have tried the DraggableViews module, but it creates a new table in the database that is not related with the entity fields of my entity and I'm using AngularJS as front-end with JSON API calls, so ...
-1
votes
1answer
54 views

Custom Jquery for Entity reference form

How do I add Custom Jquery On-click event on a checkbox which is inside an Entity reference form? In the below screenshot, "Study" is the Parent node. "Demographics", "Biological collections", etc. ...
0
votes
0answers
26 views

How to check if field of type reference revisions is paragraph or others? [duplicate]

I am creating paragraph field programmatically dynamically from array. The logic for creating a paragraph field is different from others entity revisions. Is there a way we can identify if field of ...
0
votes
0answers
59 views

How to change from Token based file download to normal path file download

I am trying to attach the document(pdf) in CKEditor using "Add Media" option. The problem is that it is making the path to download the file like this "https://domain/file/fid/download?token=xxx" ...
1
vote
0answers
16 views

Rendered entity display mode has gone [duplicate]

I'm trying to create a paragraph with an entity reference field, that renderes a contact form. My problem is that I'm not able to choose the Rendered Entity display mode, for my field. As you can ...
0
votes
0answers
22 views

Howto check if a form contains custom type field in hook_webform_submission_form_alter?

How to check if my custom element is added to form in hook_webform_submission_form_alter. Below is the screenshot what i am getting in form array. Custom composite element can be nested under 3 or 4 ...
-1
votes
1answer
33 views

Field collection does not show on the page

I've installed filed collection on drupal 8 version. Now I'm trying to add field collection named "field_ingredients_second" to a content type. And then I've added fields to this newly created field ...
0
votes
0answers
8 views

Removing an item from a field collection when a new item is added; re-adding it when an item is removed

In Drupal 7, I have a field collection with a list of values. After adding another item, the previous item should not appear in the field collection. Similarly, after removing an item, the previous ...
0
votes
0answers
41 views

Interface Microsoft Access to Drupal database

I am wondering if anyone has ever succeeded in editing their Drupal database with Microsoft Access. I have already figured out how to use Oracle's Mysql ODBC connector to enable MS Access to see my ...
1
vote
0answers
65 views

Add custom fields to an existing entity

I would like to add extra fields to an existing entity WebformSubmission : Assigned to (entity reference to a user) Status ( taxonomy term reference) for these two fields I will need it to be ...
1
vote
0answers
19 views

How do I create field collection of/in another field collection programmatically?

How can I create field collection in another field collection using Drupal 7 Entity? The field structure is given below; Content type: Properties field_1 field_2 field_collection_1 (I can create ...
1
vote
0answers
77 views

Is there a way to set the cardinality of a field on a per bundle basis?

I'm creating a bunch of paragraph types with a node entity_reference field, in some cases, I want field_article allow 3 items, in some to allow 5 items and in some to be unlimited. I'd like to set ...
2
votes
1answer
43 views

How to load an entity definition?

I need to load an entity definition to add a constraint and test it, I found that this is possible with the following code: $manager = \Drupal::entityDefinitionUpdateManager(); $entity_definition = $...
0
votes
0answers
27 views

How to get all vocabularies in a taxonomy retrieved from a referenced field?

I have a taxonomy that I am getting in the page twig file after referencing a field from the node object. The twig file is a page for a content type, i.e. page--content-type.html.twig. So node....
0
votes
1answer
38 views

How to add dynamic field labels?

I have a "medical records" content type which has a "medical process" field embedded (type=paragraphs bundle, number of values unlimited). In the paragraph bundle its has visit time, diagnosis, ...
1
vote
1answer
208 views

How to know when a field is a paragraph

I'd like to know when a field from a node it's a paragraph, I only get the type, that it's entity_reference_revisions, I use this method to get the information: \Drupal\field\Entity\...
0
votes
1answer
679 views

How to group view by field and display row results below?

We have a content type Basic Page that is supposed to be grouped by a taxonomy term field Page Type that has the following values below in a view. How can we setup the view so that the view will ...
0
votes
1answer
413 views

Getting Node Field Values from Referenced Entity within a Paragraph

I'm trying to create a featured content paragraph type, however, I can't figure out how to grab anything from the referenced node that is in my entity reference. I don't see any twig documentation ...
0
votes
1answer
56 views

Can't add instance of custom field type to entity

I have a custom field type that I'm trying to add to a custom fieldable entity. The entity works fine and I've added other fields to it, my problem is when I go to add an instance of my field to the ...
6
votes
1answer
766 views

How to add taxonomy term reference field in a custom form

In the previous version of Drupal, it was possible to reference taxonomy tags in Drupal's forms using the following option: '#autocomplete_path' => 'taxonomy/autocomplete/'.$vid, However, in the ...
0
votes
0answers
68 views

Entity Reference Field when logged out

I have an Entity Reference Field attached to a Content Type. This field references Views, and has a field format of Entity ID When I am logged in, the field appears fine, however it does not appear ...
1
vote
0answers
130 views

How to create content of content type which is a reference to a paragraph?

I want to add a content to content type (ct1) which has only one field (f1) which is a reference to a paragraph (p1), said paragraph has 4 fields: 3 numeric fields (1, 2, 3) and entity reference (er1) ...
0
votes
1answer
263 views

How to save a checkbox config_object in the schema files?

We have a custom module with the following files. It is mainly used to store a list of content types that this configuration applies to. When saving the configuration, we get the following code. How ...
0
votes
1answer
69 views

How to add currency field?

With respect to the question, can anyone suggest a remedy for the same. How can I create a field for currency(with selecting currency and text field to enter the amount) considering the fact that ...
0
votes
1answer
85 views

Adding HTML class attributes to Entity Reference field links in View

I have a view ("Tasks") that pulls in Task nodes, complete with sorting and filtering. Each Task can have multiple nodes attached via the "Related Articles" field (field_related_articles). I am trying ...
0
votes
1answer
82 views

Custom form to modify only some fields of an EntityForm

I generated an Entity following this guide. Now I would like to create a custom form to modify only some fields inside a single entity. I was thinking to create an action inside the controller calling ...
2
votes
2answers
233 views

Display a Media Entity Image from other (referencing) node in a Twig template

Seems that all found in the Internet does not work for my case. :/ In general, I need to display an Image and a Project, referenced by the node that has a reference field to my node. I have: a node ...
0
votes
0answers
35 views

EFQ with huge data

I'm using EFQ to load nodes. However when the data is huge the page naturally breaks. Is there a way to lazy load the EFQ result or any idea how to optimize it? Noting that the client doesn't want ...
0
votes
1answer
42 views

Entityreference not saved correctly inside ContentEntityForm

I was having a weird bug with my views. Some entity-references from my main-entity didn't show up in my view. I investigated further with entityQuery and came across some weird action. I can get the ...
0
votes
1answer
29 views

Clone Commerce Product Option Sets

This issue hints it's possible to clone Option sets https://www.drupal.org/project/commerce_option/issues/1319618 To reproduce: On page admin/commerce/products/option-sets Click 'clone' on any ...
0
votes
0answers
57 views

How to fetch field revision history for each change, username, created and delta value?

I would like to fetch and display the revision history for each change for each field attached to an entity. I notice in each field revision table the username and created are not there. Only the ...
3
votes
1answer
335 views

When to create schema while working with config entity?

We have a custom form mymoduleForm.php that is used to perform some logic by calling mymodule_preprocess_node(). We were able to add addCacheableDependency() and now the mymodule_preprocess_node hook ...
0
votes
0answers
26 views

Is there any way to auto generate an entity reference (behind the scenes) using only the entity ID?

I'm looking for some help with my workflow on my Drupal 7 website... Currently: 2 user types ( user type 1: u1, user type 2: u2 ) u1 creates content u2 creates a product referencing u1's content u1 ...
0
votes
1answer
252 views

How to get all the field and value of node as an array? [closed]

I am trying to render all field and value of a node as an array dynamically. How can i achieve that?
0
votes
1answer
59 views

URL Pattern in node entity reference

I have a content type A, which contains an entity reference field. That field references a content type B. I have create automatic URL paths for both content types. When I create a new node of type A,...
0
votes
0answers
17 views

How do I create a custom field/module with both Image field and HTML field?

I want to create a custom field that allows a user to upload image along with some HTML code. In the image above, I want the 'Enter the blocks' area to be a CKeditor/HTML field. The issue I'm ...