Exception: The $target_entity parameter must be specified for the view operation. in Drupal\entity_ui\Entity\EntityTab->access() (line 123 of /domain.com/web/modules/contrib/entity_ui/src/Entity/EntityTab.php).

Screenshot of the setup for this tab

CommentFileSizeAuthor
entity_ui.bug_.png74.07 KBgiorgosk

Comments

GiorgosK created an issue. See original summary.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

Could you check you have the latest version of the code?

I've just added a tab to nodes, with the same settings as in your screenshot, and it's working fine.

giorgosk’s picture

Title: Error on clicking tab » Error on installing and clicking tab
Status: Postponed (maintainer needs more info) » Active

I am on latest version

$ drush pm:list | grep entity_ui
  Other                                Entity UI Builder (entity_ui)                      Enabled    8.x-1.0    

I have tried to install just now on a different test installation (not completely clean) and I get error on enabling module

I does not complete install but it seems the system has it as enabled and it can't be really uninstalled with drush or from within GUI

$ drush pm:list | grep entity_ui
  Other                    Entity UI Builder (entity_ui)                               Disabled   8.x-1.0         

$ drush en entity_ui

In RouteBuilder.php line 121:
                                      
  Recursive router rebuild detected.  
                                      

pm:enable [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> [<modules>]...

$ drush pm:list | grep entity_ui
  Other                    Entity UI Builder (entity_ui)                               Enabled    8.x-1.0         
$ drush pmu entity_ui

In RouteBuilder.php line 121:
                                      
  Recursive router rebuild detected.  
                                      

pm:uninstall [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> [<modules>]...

On status page I see


Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Entity tab
The Entity tab entity type needs to be installed.

Trying to go to admin/structure/types lead to WSOD and get this on the logs

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity_ui.entity_tab.node.collection" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of /home/d05ki/www/core/lib/Drupal/Core/Routing/RouteProvider.php).

Installed on simplytest.me with version 1.0.0 I get exactly the same behaviour
I can't access the admin/structure/types and see the same problems in the logs and status page

Is there any more information that you would like to see ? or how can I be of help ?

joachim’s picture

> Recursive router rebuild detected.

That's a separate problem which I discovered just today, and which I need to fix.

I don't think it's related to your original problem.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

> Recursive router rebuild detected.

I've just pushed a fix for that and made a new release. Can you try again please?

giorgosk’s picture

Status: Postponed (maintainer needs more info) » Active

Now the problem is only on clicking the tab (configured as the original image)

here what I see in the logs

Exception: The $target_entity parameter must be specified for the view operation. in Drupal\entity_ui\Entity\EntityTab->access() (line 123 of /home/domain.com/web/modules/contrib/entity_ui/src/Entity/EntityTab.php).

Do you want it as a seperate issue ? If you need more info please let me know.

joachim’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

> Exception: The $target_entity parameter must be specified for the view operation. in Drupal\entity_ui\Entity\EntityTab->access() (line 123 of /home/domain.com/web/modules/contrib/entity_ui/src/Entity/EntityTab.php).

I don't really know how you can be getting that, as there must be a target entity for you to be seeing something at all!

Can you post the config export of your entity tab please?

And also can you try debugging to see why that parameter isn't set?

giorgosk’s picture

Perhaps there is something in my installation that created this
I installed on a clean installation just to test it and works fine
If I do get the time to investigate further I will post any findings
Thanks

joachim’s picture

> I installed on a clean installation just to test it and works fine

That's a relief. Thanks for reporting back!