RenderArray not found in inline entity form render

Created on 29 September 2023, about 1 year ago
Updated 1 August 2024, 5 months ago

Problem/Motivation

Getting error in Inline Entity form render

Steps to reproduce

1. Installed fresh Drupal 10.1.2

2. Click on Structure -> Content types -> Basic page

3. Click on the Manage Fields tab

4. Add a new field with reference->content

5. Manage form display - set the field "Inline entity form - simple"

6. Save settings

7. Add content - Basic page

8. Error: Class "Drupal\rat\v1\RenderArray" not found in Drupal\inline_entity_form\Form\EntityInlineForm->entityForm()

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇳India shalini_jha

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

Comments & Activities

  • Issue created by @shalini_jha
  • Assigned to Shreya_98
  • 🇮🇳India viren18febS

    HI @shalini_jha

    You can try this as well!
    composer require drupal/rat (RenderArrayTool (RAT))

  • @shreya_th opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Shreya_98

    Hi @bojanz
    I have solved this issue and also created MR for RenderArray not found in inline entity form render.
    Kindly review the changes .

    Thank you.

  • 🇮🇹Italy smurfxx

    composer require drupal/rat solves the issue but is it possible to add this dependency via ludwig?

  • 🇭🇷Croatia devad

    Re: #6

    Ludwig is not a proper place to add dependencies to other drupal modules. The .info file is a proper place for that.
    See the related issue.

  • First commit to issue fork.
  • Status changed to Needs work 6 months ago
  • 🇺🇸United States froboy Chicago, IL

    @podarok I'm not sure the new class you're trying to import exists:

    Error: Class "Drupal\Core\Render\RenderArray" not found in Drupal\inline_entity_form\Form\EntityInlineForm->entityForm() (line 216 of /var/www/docroot/modules/contrib/inline_entity_form/src/Form/EntityInlineForm.php).

    I couldn't find anything similar anywhere. Tested on Drupal 10.0.x.

  • 🇺🇸United States froboy Chicago, IL

    It turns out RAT was installed (it lives at vendor/drupal/rat), but I needed to regenerate the composer autoloader:

    composer dump-autoload

    That fixed it all up.

  • We had this issue after a drupal/rat update that introduced a git repo inside its directory that was rejected downstream (eg. Pantheon), so the vendor/drupal/rat directory remained empty downstream due to no changes being detected in composer.json on subsequent pushes.

    We resolved it by removing and re-adding the directory to git:

    git rm --cached vendor/drupal/rat
    git add vendor/drupal/rat
    git commit ...
    git push ...
    
Production build 0.71.5 2024