First of all apologies for a new ticket the same name as a previous one:
https://www.drupal.org/project/paragraphs/issues/2722379

...but I have a use case where it is a requirement to be able to reference paragraphs in a way where the paragraphs themselves are not updatable.

The scenario is:
User entity has a paragraphs field called "Children".
The children field is a standard entity reference revisions field where unlimited paragraphs can be added.
There is one reference-able paragraph type: "child", which has fields for Name, Age, Height, etc.

Then using the flag module to flag a node against a user. Flag types are fieldable and there is then the structure so a flagged node can be sub flagged to a child(ren) of that user. This is achieved already on a Drupal 7 site where it is possible to "entity reference" either paragraphs or field collections.

We now have to migrate this logic to Drupal 8/9 and it would appear this is not possible as "paragraph item" does not seem to be an option when adding a new "reference" field despite it being a simple reference to an entity, which I have to admit is the strength of Drupal's entity architecture no matter how obscure it might seem.

Issue fork paragraphs-3202543

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

iancawthorne created an issue. See original summary.

iancawthorne’s picture

deleted.

nathan tsai’s picture

So...found a way to reference paragraphs using Webform. Wonder if paragraphs should support this...although I probably don't appreciate how hard this would be / why each paragraph was designed to only be referenced by one entity.

tgauges made their first commit to this issue’s fork.

tgauges’s picture

Title: How to create a reference field to paragraph items? » Allow simple reference field to paragraph items
Category: Support request » Feature request
Status: Active » Needs review

I simply removed the hook removing the option to configure a simple entity reference to a paragraph: https://git.drupalcode.org/project/paragraphs/-/merge_requests/82.

I kept the MR as draft because it probably goes against the goals of this module? If the option exists, there should probably be a warning or something if it is selected. What do the maintainers think?

joinso’s picture

Hi!
I am interested in getting this to work.
What is the current status?
Anyone working on it?

tgauges’s picture

In my opinion this issue is solved by #3414495. At least for Drupal versions 10.2 and higher.

joinso’s picture

I do not known if is the same case or perhaps I am missing something.
I put in context:
I have a content type A with a field A1: field storage "Paragraph": unlimited values, where this paragrah is a paragrah type with multiples fields.
Then I need to make a reference to any of the "values" of field A1 in other place (for example in a profile field).
I can only make the reference using a view, because there is not a direct way to make this.
I am using the last versions of "all".
Drupal: 10.2.3
Paragraphs:8.x-1.17

tgauges’s picture

@joinso With 1.17 and Drupal 10.2 it should be possible to have references to paragraph entities. I'm not a maintainer of this module so maybe a new support request issue should be opened?

joinso’s picture

Yes, you are right.
It works as expected.

tgauges’s picture

Status: Needs review » Closed (duplicate)