When we try to render Token values of ECK entity via admin/structure/eck/entity//[eck_entity_type]/[eck_entity_id]/devel/token - got the empty page with error:
The website encountered an unexpected error. Please try again later.
and with PHP error in logs:
PHP message: Uncaught PHP Exception Exception: "Object of type Drupal\\eck\\Entity\\EckEntityBundle cannot be printed." at /srv/mru/public_html/core/lib/Drupal/Core/Template/TwigExtension.php line 465

Same problem reproducible on clean Drupal 8.x install with ECK + Token + Devel module on any ECK Entity type.

Comments

Murz created an issue. See original summary.

murz’s picture

On Drupal 7.x same page with Tokens renders successfully without errors.

murz’s picture

This problem is still reproducible with last release (8.x-1.0-alpha5) too.

legolasbo’s picture

Thanks for reporting this Murz.

Could you please provide some detailed steps to reproduce this. How do I need to configure the eck entity type / bundle. Do I need to configure devel in a certain way to be able to reproduce your issue? Providing this information will make it easier for me to reproduce the issue you're experiencing without much trial and error.

8bitplateau’s picture

StatusFileSize
new731 bytes

This is issue still exists April 2022 - 8.x-1.x-dev.

The issue is just as explained in the description.
If Token and Devel are installed, and you visit the Token tab within the Devel tab for an ECK content item, you get the error as described.

Other modules have this issue to (when token/devel installed), and fix it in the same way - most notably webform.
It is very handy to visit this tab, especilly when debugging tokens for your custom ECK type/bundle.

This patch fixes the issue.

dieterholvoet’s picture

Status: Active » Reviewed & tested by the community

I was able to reproduce the issue with the provided steps and fix it using the latest patch.

matroskeen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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