Entity reference revisions mapping broken in alpha27

Created on 23 November 2024, 29 days ago

Problem/Motivation

Something changed between alpha26 and alpha27 related to entity reference revisions and schema.org mappings.

Entity reference revisions no longer map correctly. See screenshot.

It results in:

   "recipeIngredient": [
        "NODE TITLE IS HERE \u003E Ingredients"
    ],
    "recipeInstructions": [
        "NODE TITLE IS HERE \u003E Instructions"
    ],

My Ingredients and Instructions are Entity reference revisions of Reference type: Paragraph.

Steps to reproduce

On alpha27, set up a Paragraph (like Ingredients).

Then in your Recipe content type, create an Ingredients fields and use entity reference to the Ingredients paragraph.

Then using in the Scheme.org tab, map the recipeIngredients to the Ingredients paragraph.

This used to work perfectly on alpha26.

Using 10.3.10, PHP 8.3.12

Let me know if you need further info.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇹🇹Trinidad and Tobago xamount

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @xamount
  • 🇺🇸United States jrockowitz Brooklyn, NY

    My steps to reproduce...

    • Create an Ingredients paragraph type with a simple name field. (/admin/structure/paragraphs_type)
    • Create Recipe Schema.org type (/admin/structure/types/schemadotorg?type=Recipe)
    • Manually change recipeIngredients from 'Text (plain)' to 'Entity reference revisions'
    • Confirm that recipeIngredients is NOT using the Ingredients paragraph (/node/add/recipe)
  • 🇺🇸United States jrockowitz Brooklyn, NY

    I am pretty sure 📌 Improve layout starter kit Fixed caused this regression.

  • 🇹🇹Trinidad and Tobago xamount

    I part that I cannot do is:

    Manually change recipeIngredients from 'Text (plain)' to 'Paragraphs' (not 'Entity reference revisions')

    When I try to manually map recipeIngredient, I only get the choice of Entity reference revisions (there are no Paragraphs, ever for other Paragraphs). I only see Entity reference revisions for all the paragraphs. (see attached screenshot)

    My Ingredients Paragraph looks like the 2nd screenshot.

    What field type are you using? 'Paragraphs' or 'Entity reference revisions'

    In the Recipe content type, for the Ingredients field, it's:
    Entity reference revisions
    Reference type: Paragraph
    Paragraph type: Ingredients

    Just an fyi, my Recipe content type existed before I started using the Schema.org Blueprint module, so I did not create Recipe Schema.org type as in your second bullet point (although I don't think this has anything to do with it).

  • 🇹🇹Trinidad and Tobago xamount

    Forgot to attach the first screenshot to my last message.

  • 🇺🇸United States jrockowitz Brooklyn, NY

    I think you are running into 📌 Prepare for 10.2: Move preconfigured paragraph field type to general category, fix tests Fixed

    The Paragraphs field has been moved to the 'General' category.

    📌 Improve field type categorization. Active will return it to the 'References' category in the Schema.org Blueprints UI.

  • 🇺🇸United States jrockowitz Brooklyn, NY

    I merged 📌 Improve field type categorization. Active . I am almost certain that fixes the issue. Please reopen this ticket if I am wrong.

  • 🇮🇳India abhinand gokhala k

    I have checked after applying patch ( #3489462: Improve field type categorization.) but still facing the same issue.

    Before updating module

    After updating module

    the screenshot took from 'https://search.google.com/test/rich-results'

  • 🇮🇳India abhinand gokhala k

    Ingredients in a paragraph reference field.

  • 🇺🇸United States jrockowitz Brooklyn, NY

    I don't know how you got the custom Ingredients paragraph type to automatically switch recipeIngredient to use the entity reference revision field.

    My steps in attempting to reproduce

    • Downgrade to alpha26., `git checkout 1.0.0-alpha26`
    • Clean installation with schemadotorg, schemadotorg_ui, and schemadotorg_paragraphs enabled.
    • Create the Ingredient paragraph type (not mapped to Schema.org) with a simple name field.
    • Create a Recipe content type
    • Confirm the recipeIngredient field is still a plain text field.
  • 🇮🇳India abhinand gokhala k

    There is a custom module for altering recipe ingredients, but before making the alterations, I have dumped the array.
    Please review it.

    In module version alpha26:

    In module version alpha27:

  • 🇺🇸United States jrockowitz Brooklyn, NY

    The change via JSON-LD is most likely due to the addition of "Schema.org type entity references display" settings in /admin/config/schemadotorg/settings/jsonld.

    @see 📌 Track and prevent displayed entity reference recursions in JSON-LD Active

Production build 0.71.5 2024