Problem/Motivation

I am coming from #3549150: Fatal errors when using pseudo fields and had the problem that I got an exception when I am using pseudo fields in my display.

Proposed resolution

Wrap code in a try / catch block so we don't get that hard error.

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

yannickoo created an issue. See original summary.

yannickoo’s picture

Status: Active » Needs review
pdureau’s picture

Title: Catch exception when trying to create plugin instances » [2.0.10] Catch exception when trying to create plugin instances
Assigned: Unassigned » just_like_good_vibes
just_like_good_vibes’s picture

Status: Needs review » Needs work

would you share a simple usecase please that is not working with extra fields?
thank you

yannickoo’s picture

I had this problem with Frontend Editing module which is adding a pseudo field to the display.

pdureau’s picture

Title: [2.0.10] Catch exception when trying to create plugin instances » [2.0.11] Catch exception when trying to create plugin instances
just_like_good_vibes’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Needs work » Postponed (maintainer needs more info)

Hello, i couldn't really reproduce on my side, when i tested it with the mentioned modules.
@yannickoo, would you share the exact manipulations that trigger the errors please?
thank you

pdureau’s picture

Title: [2.0.11] Catch exception when trying to create plugin instances » Catch exception when trying to create plugin instances
yannickoo’s picture

Status: Postponed (maintainer needs more info) » Active

Hey again! After a long while I can finally reproduce this here again and give you more information: I have Frontend Editing module installed and I was able to enable Display builder for my display but when clicking the error I see the error again:

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "field:paragraph:accordion_item:extra_field_frontend_editing" plugin does not exist. Valid plugin IDs for Drupal\ui_patterns\DerivableContextPluginManager are:

Since the Frontend Editing pseudo field could not be initialized I could see a placeholder field "Field: [Entity] ➜ [Field]" next to my Title and Content fields in the Display Builder UI:

Field: Title
Field: [Entity] ➜ [Field]
Field: Content