Firstly, thanks to you and bucefal91 for all the work on this - I've been using heavily for a week or two.
One of the embeds I created was for 'entity.webform_submission.user' - I noticed I was getting the same results regardless of the user parameter (/user/1/submissions, /user/2/submissions etc.), because $args[3] is always the logged in user.
I've worked around that with the hook below, but the name in the page title also wrong. It may very well be my own fault - but if you've time to tell me where to look in the code (e.g. where are the $args for the view generated?) I can debug further.
Also, it may be unrelated, but I'm seeing a message in all embeds (including the originals) that the entity_id handler is broken…
function mymodule_views_pre_view(Drupal\views\ViewExecutable $view, $display_id, array &$args) {
if ($view->id() === 'myview' && $display_id === 'embed_1' ) {
$route_params = \Drupal::routeMatch()->getParameters();
$args[3] = $route_params->get('user')->id();
}
}
(Thanks)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2998630-3.patch | 610 bytes | jrockowitz |
Comments
Comment #2
wturrell commented(Better title).
Comment #3
jrockowitz commentedHere is a quick stab at the problem.
Comment #4
wturrell commentedThat works :)
Comment #6
jrockowitz commented