Declaration is already in place:
https://git.drupalcode.org/project/pwa/-/blob/2.x/modules/pwa_extras/pwa...
since Html class methods are used elsewhere in module.
Maybe that the problem comes from Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUserAdmin::isAdminPath. The route views.ajax with path /views/ajax is never considered as administrative, so user preferred admin language is not applied to views ajax calls.
The popup visible on your screenshot came from Chrome auto-translation feature, if possible turn it off for the tests.
I tried with Chrome too (all previous tests are done on Firefox) but i get the same behavior you can see on screencast.
I'll try to do a debug session in next days to investigate furthermore.
Thank you, for reply!
I hadn't the "Follow the user's language preference" flag active on "Detection and selection" page: I've tried with this change but only partially solves the problem. Now works but only when language prefix in not on url.
Try adding a new language, let's say French, keeping all other settings as already defined.
Visit /fr/admin/content: view is rendered in English (admin language) but if i try to click on filter ajax callback renders views in French (url language).
Attached a short screencast (i'm using Drupal 10.2.6).
maurizio.ganovelli → created an issue.
The issue is still relevant to 4.0.1 version but latest patch from comment #4 still applies and solves it.
This issue seems to be resolved in version 2.0.6 of this project, patch is not needed (and doesn't apply) anymore.
I have a problem that seems related to this. After updating BAT module from rc to stable 10.1 version, viewing a commerce order (from backoffice) i get this error:
InvalidArgumentException: A valid cache entry key is required. Use getAll() to get all table data. in Drupal\views\ViewsData->get() (linea 137 di /app/web/core/modules/views/src/ViewsData.php).
removing the line "data_table" in annotation and clearing caches, view seems to work normally.
Thanks for feedback, changing issue status to Needs review.
Hi,
the issue is not limited to Olivero, I can replicate with every theme.
Please make sure you changed some configuration options (default values don't give any issue) in /admin/config/pwa/pwa_extras: try to flag some fields and select a mask icon color.
This is a part of html head of a bootstrap based theme:
...
<meta charset="utf-8" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#8ae234" />
<p></p>
<meta name="Generator" content="Drupal 10 (https://www.drupal.org)" />
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
...
I have a vanilla Drupal 10.2.5 with PWA 2.1.0-beta5.
I confirm also that disabling pwa_extras, the problem disappears.
I have the same problem and extra metatags are not printed at all. This seems to be caused by values passed to DOMDocument::loadHTML that are html encoded. Attached a quick solution that works in my case but i'm not sure if it's optimal.
Yes, you can protect files and media attached to an entity instance (a node, a paragraph, so on).
I'm going to close older issues, feel free to reopen if still relevant.
Opening form in modal is possible by injecting some attributes in link generated by the module formatter using hook_webform_attachment_gated_download_url_alter().
Something like this:
function mymodule_webform_attachment_gated_download_url_alter(Url $uri, $item) {
$options= $uri->getOptions();
$options['attributes']['class'][] = 'use-ajax';
$options['attributes']['data-dialog-type'] = 'modal';
$options['attributes']['data-dialog-options'] = json_encode(
[ 'autoOpen' => FALSE,
'title' => t('Confirm form'),
]
);
$uri->setOptions($options);
}
Thank you, i added the url in project resources links.
Merge applied, thank you!
maurizio.ganovelli → created an issue.
Great, thanks!
Maybe this issue could be related (same error): When a simple block is deleted, it causes an RouteNotFoundException → .
Attached patch removes canonical link annotation.
maurizio.ganovelli → created an issue.
Thank you, patch works well in my case but EntityInterface namespace is missing. Attached patch adds it to class file.
Awesome, thanks!
Attaching a patch trying to solve this issue
maurizio.ganovelli → created an issue.
maurizio.ganovelli → created an issue.
I have a similar problem in 2.x version too; i'm trying to give access to a specific group role to all submissions of a specific webform.
In Drupal\webform_group\WebformGroupManager the function getCurrentGroupRelationship return always FALSE due to:
$source_entity = $this->requestHandler->getCurrentSourceEntity(['webform_submission']);
returning always a NULL value fot paths like "node/X/webform/results/submissions".
I tried to extract node parameter from current route but without luck (i found no route name nor route parameters in request using \Drupal::routeMatch()).
As a temporary quick & dirty fix (for nodes only) i use:
$source_entity = $this->requestHandler->getCurrentSourceEntity(['webform_submission']);
if (!$source_entity) {
if (preg_match("/^(\/.*)?\/node\/([1-9][0-9]*)\/webform\/results\/(submissions|download)$/", \Drupal::service('path.current')->getPath(), $matches)) {
$source_entity = $this->getEntityStorage('node')->load($matches[2]);
}
if (!$source_entity) {
return $this->currentGroupRelationship;
}
}
I'm sure that there is a better solution than raw url pattern matching .. any idea is welcome!
The patch works well but needs to be modified slightly for D10 compatibility (note that automated patches in https://www.drupal.org/project/change_user_route/issues/3286445 → cannot be applied upon this patch).
I confirm that patch works, and can be applied, also for 3.x branch.
Hi Aditi, thank you for replying, pager links take current route if #route_name is not specified. This is by default. If you need to specify an alternative route with parameters (in my case i have a tableselect with an ajaxified pager in a modal popup), you need to pass also #route_parameters in the render array. This already works as expected but it's not documented in Pager.php class.
I encountered a similar issue on a view with custom entities and using the new version 1.6 error disappears.
Using only this condition:
\Drupal::request()->get(MainContentViewSubscriber::WRAPPER_FORMAT) === 'drupal_modal'
seems to fail in some use cases.
I have a modal form with ajax submit and tableselect element with pager. Applying this patch, pager links get ajaxified and work well until a validation error occurs. During submit, request wrapper format is "drupal_ajax", so after validation fails condition does not pass and links don't have use-ajax class and data attributes anymore.
Adding this:
in_array(\Drupal::request()->get(MainContentViewSubscriber::WRAPPER_FORMAT), ['drupal_ajax', 'drupal_modal'])
make pager work also after a failed validation, but i don't know if this can have unwanted side effects.
maurizio.ganovelli → created an issue.
Rerolled against latest 2.x-dev branch.
I don't know if this is the right place to post, since issue is closed, but this patch needs a fix to avoid the php notice "Only variables should be passed by reference" on array_pop() function call.
Thank you!
Hi Andy thank you for proposal, i still actively maintain this module for some of my customers (they still on D9 but i opened 2.x branch for D10 compatibility if you need it). Feel free to send patches (for example Symfony Mailer integration must be reviewed as per https://www.drupal.org/project/symfony_mailer/issues/3355626 📌 Obsolete the symfony_mailer_bc module Fixed ), i'll be happy to test, review and eventually commit them.
I made yml changes in 8.x-2.x-dev branch for D10 compatibility.
Same problem also with 3.0 branch. I managed to solve by removing file prefixing, not sure if it's the right way, but seems to work.