Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-348: Adds a pseudo Node "Upcaster" for Routed Views in the presence of "Active Display Settings" tab #349

Merged
merged 3 commits into from
Aug 1, 2023

Conversation

DiegoPino
Copy link
Member

See #348

This tries to get around the exception that happens when a View uses %node as a parameter, but does not upcast it the value to NodeInterface. It (of course) does this without too much overhead, which means it does not processes the View Entity Itself and we simply assume a view_id + node argument are reasons enough to enrich the Route. It is important to node that really only place where this can happen (so pretty edge case) is when a View's path is node/%node given that (fixed in code) that is where our Route (Active Display settings) will call this class. Basically when Node level Tabs (actions) and View level Actions depend on each other/live side by side.

This tries to get around the exception of a View using %node as a parameter but not upcasting it to NodeInterface. It, of course, does this without too much overhead, which means it does not processes the View  Entity Itself and simply assumes a view_id + node argument are reasons enough to enrich the Route. It is important to node that really only place where this can happen is when a View's path is node/%node given that (fixed in code) that is where our Route (Active Display settings) will call this class. Basically when Node level Tabs (actions) and View level Actions depend on each other
@DiegoPino DiegoPino self-assigned this Aug 1, 2023
@DiegoPino DiegoPino requested a review from aksm August 1, 2023 16:40
@DiegoPino DiegoPino added bug Something isn't working enhancement New feature or request external bug It is not us, it is them Drupal 9 Everyone's favorite version until Drupal 10 comes View Mode Many fields, each one with a formatter that renders your ADOs Drupal Views Ask and you should receive Drupal 10 Upgrade economy labels Aug 1, 2023
@DiegoPino DiegoPino modified the milestones: 1.1.0, 1.1.1 Aug 1, 2023
Copy link
Contributor

@aksm aksm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with a View that touches here and works as expected without any issues. Thanks, @DiegoPino!

src/Plugin/Menu/LocalTask/ViewModeLocalTask.php Outdated Show resolved Hide resolved
@DiegoPino
Copy link
Member Author

Thanks, addressed the wording too. Thanks for catching that.

@DiegoPino DiegoPino merged commit 6860c18 into 1.1.0 Aug 1, 2023
@DiegoPino DiegoPino deleted the ISSUE-348 branch August 1, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Drupal Views Ask and you should receive Drupal 9 Everyone's favorite version until Drupal 10 comes Drupal 10 Upgrade economy enhancement New feature or request external bug It is not us, it is them View Mode Many fields, each one with a formatter that renders your ADOs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants