Problem/Motivation

I have followed the instructions for use exactly and Im getting a white screen and a log error when i try to edit the parent node containing referenced entities.

white screen message:

The website encountered an unexpected error. Please try again later.

error:

Type php
Date Thursday, October 22, 2020 - 19:22
User user1
Location http://drupal894.syntapse.co.uk/node/320/edit
Referrer https://drupal894.syntapse.co.uk/node/320
Message DomainException: When a #lazy_builder callback is specified, no properties can exist; all properties must be generated by the #lazy_builder callback. You specified the following properties: #wrapper_attributes. in Drupal\Core\Render\Renderer->doRender() (line 335 of /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php).
Severity Error
Hostname 172.28.2.1
Operations

Steps to reproduce

following exact steps here: https://www.drupal.org/project/ief_table_view_mode

repeated here.

  • Configure an entity reference field to use the "Inline entity form - Complex - Table View Mode" widget.
  • Go to Manage Display settings of the entity/bundle that would be referenced from the previously configured field.
  • In Custom display settings activate the checkbox "Inline Entity Form Table" and press the Save button (If the checkbox does not appear, see the Troubleshooting section and return to this point).
  • A secondary tab called Inline Entity Form Table should appear. If is not, clear the cache.
  • Go to the secondary tab Inline Entity Form Table.
  • Configure display of the fields and save.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#11 2021-06-21_21-20-05.png22.81 KBspokje
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

Syntapse created an issue. See original summary.

mnico’s picture

Status: Active » Postponed (maintainer needs more info)

Hi, can you indicate which field you set in view mode? Was it the comments field?

Some fields that are available in view mode unfortunately do not have support with this feature because those fields require the ID of the entity that would be created (and at that point the ID is not yet created, therefore it would throw an error). An example is the Comment field.

Regards

tm01xx’s picture

Hi,

I got exactly same issue: DomainException: When a #lazy_builder callback is specified, no properties can exist; all properties must be generated by the #lazy_builder callback. You specified the following properties: #wrapper_attributes. in Drupal\Core\Render\Renderer->doRender() (line 335 of core/lib/Drupal/Core/Render/Renderer.php).

- My Drupal core is 8.9.9 and using IEF version 8.x-2.2
- My referenced content is simple one; has 1 title and 1 plain textfield only. In "Inline Entity Form Table" view mode, I enable the textfield and disable all other including the title* and status*

- After saving it, when I go to edit a node that referencing to the above content type, it shows error.

fishfree’s picture

+1 the same issue. Drupal 8.9.13, ief_table_view_mode 2.2

v.kydyba’s picture

I have the same issue with Drupal 8.9.13 and ief_table_view_mode 2.2.
Edit: I fixed it by disabling the default 'Links' field from display mode.

david.mcmeans’s picture

Was in the middle of building a custom module to work-around the issue when I noticed your comment. #5 works perfectly! Thanks, mate!

jainv18’s picture

#5 worked for me too.. Thanks!!

spokje’s picture

Same issue, Drupal 9.1.10, IEF 1.0.0-rc9, ief_table_view_mode 2.2.0.

#5 also saved my behind.

Might be interesting/worth mentioning this is on a multilingual setup.

mnico’s picture

Status: Postponed (maintainer needs more info) » Needs review

Thank you everyone for the feedback. I made a patch that prevents the exception:

https://git.drupalcode.org/project/ief_table_view_mode/-/merge_requests/...

With this the 'Links' field would not generate an error.

Regards

spokje’s picture

Status: Needs review » Postponed (maintainer needs more info)
StatusFileSize
new22.81 KB

MR does prevent the DomainException when the "Links" field is in the displayable region.

It does then render an empty field with just the Title "Links" (see screenshot).

spokje’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Sorry, wrong status change :/

mnico’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing the patch ;)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

4kant’s picture

Patch works for me too.
Just as a reminder:
this is fixed in dev but not yet committed to stable version.