Questions tagged [paragraphs]

Use it for questions relating to the Paragraphs module, not for text or body paragraphs.

Filter by
Sorted by
Tagged with
3
votes
1answer
88 views

Status page shows "Mismatched Entity.." for a Paragraph field but Drush entup give error "..storage cannot change the schema for an existing field"

I'm stuck in a loop. The Drupal 9.3 status page shows the following error: Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. ...
0
votes
0answers
34 views

How can I conditionally display fields based on the same paragraph radio field value?

I have added a paragraph where I want to use a radio button to conditionally display text fields from that same paragraph. My radio values are: Select discount in amount -> if checked, then ...
0
votes
0answers
25 views

How to correctly add a slideshow to Content type using a module paragraphs?

I created a Content type - News. Then using modules View, Slick Carousel, Slick View I displayed my news in a block as a slideshow But now I need to add a slideshow to a paragraph and display it on ...
0
votes
0answers
36 views

How do I add the news that I created earlier to the slideshow using the Paragraphs module?

I created Content type - News. And added ten news. Using the View module, I displayed them on the /news page. I need to make a slideshow with 3 selected news on the frontpage of the site using the ...
1
vote
0answers
86 views

Delete millions of unused Paragraphs and their data?

We have a site that after a few years has built up 10 million records in the paragraphs_item table. This is a result of lots of data migrations (where paragraphs are involved) and there are many ...
1
vote
1answer
132 views

How to hook on paragraph deletion?

I'm on D9 and I've a paragraph inside a content type node. I need to hook when the paragraph is deleted to do some custom logic and set up a queue. I've tried hook_entity_delete, hook_entity_predelete ...
1
vote
1answer
47 views

How to validate a paragraph field?

I have a paragraph type with 2 fields: year and quarter I have a content type with a paragraph field (field_year_and_quarter) targeting ONLY this paragraph type I am trying to create a constraint to ...
0
votes
0answers
19 views

How to make pagination for php data inside preprocess_paragraph_HOOK

I have data coming from External Entity (MongoDB) and I need to make pagination inside hook theme suggestion of a paragraph : Is there a way to use built-in pagination of Drupal in this scenario? ...
0
votes
1answer
23 views

Extending block, a block with a paragraph field, and 3 paragraph fields... how to loop through the paragraphs from the block extension

This is what I have: I have three twig files: block--paragraph-images.html.twig (which extends block.html.twig) field--field-paragraph-image-block.html.twig (the paragraph field which is located in ...
0
votes
0answers
18 views

Deleting a Paragraph Item results in AJAX POST error "Missing bundle property on entity of type node."

Working with an older D7 site. On it, we have added the latest version of Paragraphs to add some content items to a page. This all works fine. However, when trying to remove a Paragraph Item from the ...
1
vote
0answers
26 views

How to display all data from a paragraph field in views (Drupal 7)

I am currently a caretaker for a Drupal 7 website and I can't figure out how to group paragraph items in views. I have created a content type Products and one of the fields is called product variation ...
0
votes
1answer
24 views

How to pass Paragraph ID from Layout Builder to Views?

This is a bit convoluted; so hopefully it makes sense: I have a parent entity: Event. Event has a Paragraph field on it: Sessions (paragraph type: Session). I use Layout Builder to format the Full ...
0
votes
1answer
17 views

Trying to access a "count" variable inside a block field from paragraphs template

I'm trying to get the number of paragraphs an authenticated user inputs by counting them in the parent block template and trying to access that number in the paragraphs template. I have two templates ...
0
votes
0answers
19 views

Custom validation multi value paragraphs : how to get weight value

I am validating a multi value paragraph field using constraints. /** * Implements hook_entity_bundle_field_info_alter(). */ function cnfpt_internet_entity_bundle_field_info_alter(&$fields, \...
0
votes
0answers
15 views

Custom validation multi value paragraphs: highlighting missing field

I am using constraint for the validation my multi value paragraph field. I can correctly implement the different validation rules but I haven't found out how to highlight only the erroneous field(s). ...
0
votes
1answer
38 views

How can I access the parent entity values inside a custom paragraph formElement?

I created a select custom field that must be inserted inside a paragraph and the options values are dynamically inserted based on another reference field present in the paragraph itself. How can I ...
0
votes
0answers
20 views

Last item missing for multiple fields when editing a node

I'm using a multiple paragraphs field on a node. I noticed that each time I saved the node and then edited it again, the last item (delta n-1 with delta starting at 0) would disappear. If I clicked on ...
0
votes
0answers
32 views

Using Tac Lite in combination with Paragraphs

For our new Drupal 9 (or 8 if necc.) website we require a very fine controllable access structure where we can give and restrict access on a user by user basis. Not only for a content type but also ...
1
vote
2answers
374 views

Accessing node value in paragraph twig template

I'm writing a twig template for a paragraph. I'd like to access a text field value from the page/node where this type of paragraph will be added. Specifically, I'd like to access the value of a text ...
0
votes
0answers
26 views

Is there a way to make a single type Paragraphs field not required?

My Content Type has a Paragraphs field that is Not required. The Paragraph type has a required field for when it is added, but until it is added, this shouldn't trigger "required" for my ...
1
vote
1answer
29 views

How can I assign custom field layouts using paragraphs?

For reference: -modules --contrib ---ds --custom ---ds I'm looking to add paragraph layouts using flexbox. I don't see a module specifically for this, so I realize I'm going to have to adapt an ...
0
votes
1answer
62 views

How to access paragraph fields from a webform's form?

I have a webform (contact_info) which is attached to a paragraph's field (field_contact_info). The paragraph has other fields as well. I implemented hook_form_alter() to change some attributes inside ...
0
votes
1answer
79 views

Paragraphs removed from graphql schema if not anywhere in content, which causes error for union type

I'm making a headless Drupal site with Gatsby using paragraphs. I'm experienced with Drupal but relatively new with gatsby/graphql. The issue I'm running into is that if our database does not actually ...
1
vote
1answer
26 views

Editing paragraphs field settings returns 404 with php development server

I have this strange behaviour on my local drupal9 instance. I start it in the web folder with the build in php development server: php -S localhost:8000 Now if I try to edit any paragraphs field, eg. /...
1
vote
0answers
31 views

Where should I include method to pass current selection to entity browser select view?

I'm following this guide https://drupal.stackexchange.com/a/277898/56676 which I found very useful. So, I understand where the first function goes, but when it comes to the method public function ...
0
votes
1answer
35 views

Change paragraph object for rendering

I have a paragraph type with a node ref field that, if you leave it empty, is supposed to show a random node using some defined logic. I have the code to do the query and get the node, and ideally I'd ...
2
votes
1answer
61 views

Add ThirdPartySettings to individual paragraphs of a certain bundle?

I want to add configuration settings to Paragraph entities in a specific bundle in Drupal 8. Theres potentially a lot of options and the need to change/update them over time, so I figure the best way ...
0
votes
1answer
91 views

What is the token for the file download link of a media entity?

Using the linked_field module and the [paragraph:field_pbpresentation_file:entity:url] token, I get the edit link for the media entity, not the link to download the file itself. What token should I ...
0
votes
0answers
30 views

How do I set up a views block that filters contextually on a field included in a paragraph?

I have two content types (ContentA, ContentB) which both use the same paragraph (MyParagraph) as field type “Entity reference revisions.” MyParagraph consists of two “List (text)” fields: ...
0
votes
1answer
64 views

How to programmatically add a paragraph item to a user account?

I already added the Check in/out History field to the user account, which has the check-in date and check-out date fields. How can I programmatically add new items to Check in/out History? I need to ...
0
votes
1answer
30 views

How can I build a specific data structure?

I have a Course content type which has several "modules." (A module is just a name.) There are also several "units," which may or not belong to a module. A unit has several fields, ...
0
votes
2answers
333 views

How do I migrate a nested paragraph field?

I have a wrapper paragraph, Layout (para_layout), which has the following fields. I created the same paragraphs and field structure in a Drupal 9 website. I created the following custom migration ...
1
vote
1answer
86 views

Get third party settings in paragraph node edition

I'm adding a third party settings in my .module file, in the mymodule_form_alter function. I did this is order to add an image to my paragraph. function my_module_form_alter(&$form, ...
0
votes
0answers
29 views

Can I add additional configuration to a paragraph type?

Is it possible to add some field directly in the paragraph config ? For example, I'd like to add another image under to paragraph icon The field should not be editable by the user, that why it's not a ...
1
vote
1answer
36 views

Programatically create paragraphs entity form

I am in a situation where I would like to split out Paragraph entities to separate forms. Edit forms are no problem: $entity = Paragraph::load($entity_id); return \Drupal::service('entity.form_builder'...
0
votes
0answers
10 views

Multiple image sets shown in a view using Colorbox

I need to have multiple image sets in a content type. I need to output them in a view that would show first image in the set (and cycle through the rest in that set) in Colorbox. I tried to set up a ...
0
votes
0answers
87 views

How to add index to paragraph template

I want to use paragraphs to implement a carousel, and for now, I have the outer paragraph called slideshow, and the template is paragraph--slideshow.html.twig. Then, inside this paragraph, I can add ...
1
vote
2answers
54 views

How do I add a <div> over a paragraph's field, depending on another field of this paragraph?

I have a paragraph (from the paragraphs module) which has two fields : field_title (text) field_title_level (list text) The field_title_level can have either h2, h3, or h4 as a value. What I would ...
1
vote
3answers
43 views

How can I access the paragraph fields from my node via Tokens?

Token Version: 8.x-1.7 Paragraphs Version: 8.x-1.12 I have one main node. In this main node I have referenced another sub-node. This sub-node has two fields with paragraphs. Each of these paragraphs ...
2
votes
1answer
184 views

How can I turn off the caching for a Paragraph type?

I'm rendering an array whose URL is dependent on a $_GET variable. Where the variable is present and valid, I want to serve an iframe with the _GET variable as part of the URL. At the moment the cache ...
0
votes
2answers
428 views

How to get parent paragraph from a child block preprocess

Searched all over the place but cannot find anything similar. Here's the issue... The setup: 'Page' content type 'Block Content' paragraph type The 'Page' content type has a field for referencing ...
0
votes
2answers
46 views

How do I get the title of a referenced node from a field?

I am trying to build a View that lists People's Profiles which are referenced to a Team via a Paragraph (within that Profile) to print out the Name of the Person and other data from the Profile. The ...
-2
votes
1answer
193 views

How to add and associate Paragraphs to Media Library Images Programmatically

Good day everyone, Our client wants to have this feature where he can upload/reuse multiple images for an article content type. This can be achieved using a Media Library, where I find it tricky is ...
1
vote
0answers
46 views

When old field revisions should be deleted from the database?

I have a question about old fields revisions in Drupal 8. For example I have "Full Title" field in different paragraphs. I have deleted this field from one of the paragraphs, for example ...
0
votes
0answers
36 views

How to aggregate values from fields in Paragraphs based on value of another field in that same paragraph, and display in an aggregated Views table?

Hopefully my title makes sense... I am setting up a Drupal 9 website for internal use as a financial reporting engine and a CRM. I am making use of the following modules: Paragraphs Views Viewfield ...
0
votes
0answers
229 views

How add a paragraph field to a form programmatically?

I'm on Drupal 9. I am creating a custom block programmatically with some fields in the configuration form. However, I need to add a paragraph field and I've found no documentation\working way to do so....
0
votes
1answer
35 views

How to keep the non mapped paragraphs during migrations?

I am migrating content that contains paragraphs also. So I have two migration files. When the content is migrated. Everything is fine. I can see the paragraphs are attached with the nodes. When I edit ...
1
vote
2answers
550 views

Twig conditional render if specific field in array of referenced entities contains text

In a Twig template, I'm conditionally rendering a sidebar based on whether custom field content.field_body (Paragraphs entity reference revisions field type) contains any items. {% if content....
0
votes
0answers
85 views

Programmatically change field type from 'Plain/Long' field to 'text_format', 'full_html' field in node

I am trying to change the 'Plain/Long' paragraph field to 'text_format', 'full_html' field. I am able to change the field to rich text field with below code, but when I try to save the node getting ...
0
votes
0answers
39 views

How to preserve the values of paragraph fields in migration?

I am migrating content with paragraph fields. My paragraph migration. langcode: en status: true id: my_paragraph_import label: Paragraph import migration_tags: - paragraph - my_paragraph_import ...

1
2 3 4 5
9