- 🇺🇸United States smustgrave
@longwave going to go on a limb and say this is good. The lock file seems to only show the new dependency I believe.
- 🇮🇳India prashant.c Dharamshala
Faced this issue during the implementation of search autocomplete feature ( https://www.drupal.org/project/search_api_autocomplete → ).
We are also returning the search excerpt in the autocomplete responses, so we found that the excerpt is not being returned for anonymous users. Luckily found this issue and thanks to the patch #23 → .
Applied on our site which is on Drupal 10.3.11 and seems to be working fine so far.
Thanks
- @megachriz opened merge request.
- 🇳🇱Netherlands megachriz
I found the issue that introduced
renderRoot()
in the code:
#2969259: Drush cron : can't print error messages → - 🇬🇧United Kingdom catch
This still needs design review. Either from the Olivero team or from a product manager I think.
- 🇳🇴Norway eiriksm Norway
That being said, it's still possible to trigger in other ways than with a constant. It was just randomly how I discovered it back in the day (can't even remember reporting it hehe time flies)
- 🇮🇳India niranjan_panem Gurugram
Checked the steps to reproduce in drupal 11, actually if we selected multiple select options in expose filter settings in views setting page. Drupal automatically sets the query parameter to array parameters like
test-filter-grouped-id?nid%5B2%5D=2
. Below is the screen shot of it.
- 🇨🇭Switzerland saschaeggi Zurich
We have scrollable tables with scroll indicators in Gin
So we might want to consider re-using Gin’s implementation here also to avoid potential conflicts and issues
- 🇩🇪Germany a.dmitriiev
Attaching the patch also, so that it can be used with composer patches version 2, as it doesn't allow patches from MRs.
- 🇩🇪Germany a.dmitriiev
I have created a MR based on the changes from the previous patches. I had to do some modifications, as the patches were for module version 2.x. Also instead of list field type I am using entity reference field type for Roles selection and also the check is now on query level, so query selects all alerts that do not have role restrictions or it is for the roles that current user has.
I think that adding cache context
user.roles
should exactly make sure that the cached alerts will be served to correct users. Do we really need a test for this? - @admitriiev opened merge request.
- 🇪🇸Spain vidorado Logroño (La Rioja)
@jonathan_hunt, if you add the "public" protocol in a link field configuration (after applying the changes in this issue fork: https://git.drupalcode.org/issue/drupal-2031149) you will be able to add links like
public://whatever/you/want/file.pdf
, but those URIs will not be converted to an URL. You will have to process them in a custom hook.Maybe the module Linkit ( https://www.drupal.org/project/linkit → ) would address what you want? Although a relative path would be stored in the field, instead of a
public://
style URI, the public directory is not likely to change, so it would be enough for you, depending on the case. - 🇩🇪Germany a.dmitriiev
a.dmitriiev → made their first commit to this issue’s fork.
- 🇳🇿New Zealand jonathan_hunt
This patch applies to Drupal 10.4.2 ok, but I want to use a link field to store links to files such as
public:///interactive/zoomify/mytiles
and I get "The URI 'public:///interactive/zoomify/mytiles' is invalid. You must use a valid URI scheme. Use base: for a path, e.g., to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal."Should I be able to set Allowed protocols to
public, private
? If so, there may be more work required. If not, this should be made clear in the issue and UI? - 🇺🇸United States smustgrave
Left 1 comment on the MR. Think adding a small example would be nice as I don't know if the text I provide if the code is auto generating the selector (.) to the front.
Rest of the feedback appears to be addresses so believe this is 98% there.
- 🇦🇺Australia acbramley
I'm not really sure this is something we should support. It's also been 9 years since there was work done here that wasn't a reroll. The fix seems to apply to a much broader scope than defining constants. Generally we would discourage global constants now anyway as they can be placed in various OO contexts (or Enums). I think this should be closed as won't fix.
- 🇮🇹Italy mondrake 🇮🇹
merged with HEAD
Do we have some steps to demo locally?
Well the steps would be
a) apply the patch
b) break a test so that the failure can be reported, take note of the @group of the test (ideally, in a test group where some tests are marked skipped/incomplete so you can see the skips on top of the failure)
c) runrun-tests.sh
for the group noted above with--verbose
option and enjoy the improvementsI'd give a provisional RTBC but I think the original patch was mine
I think there are so few people who would be able to RTBC this, that someone has to be bold...
- 🇬🇧United Kingdom oily Greater London
The comments seem clearer now in line with recommendations.
- 🇺🇸United States smustgrave
Feedback for this one appears to be addressed.
- 🇺🇸United States mile23 Seattle, WA
Do we have some steps to demo locally? I'd give a provisional RTBC but I think the original patch was mine. Granted that was 2017. :-)
- 🇺🇸United States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇺🇸United States smustgrave
This came up as a daily bugsmash target.
When I triaged it in 2022 I probably should of tagged it. But will need a clear issue summary using the standard template.
Fixes are in MRs now and test coverage will still be needed.
- 🇪🇨Ecuador LeonelEnriquez98
I've created a patch based on the current merge request, but it can be applied to version
2.0.0-beta1
. - 🇺🇸United States jayhuskins
It's almost been a year since any progress was made. I still see this as a necessary step to unlock layout builder's full potential. How can we push this forward?
- 🇺🇸United States michaellander
I removed the remaining tasks for now, it was previously set to 'Review Patch', but that definitely was not sufficient.
In the fork I created, the things I was still sorting through:
execute
/executeMultiple
solution and infinite loops- Node actions extending entity agnostic
Drupal\Core\Field\FieldUpdateActionBase
, need means to know name of entity context - Backwards compatibility with Action plugins from contributed modules.
I appreciate the comments and I'll look at the Rules approach to it.
If you're still using this module, you should switch to a supported module.
- 🇺🇸United States DamienMcKenna NH, USA
Thank you for the merge request, supporting all revisionable entities is really important.
I think the test coverage should be extended to cover this.
- 🇳🇱Netherlands megachriz
@jrochate
I added the task "When importing media images via a media field on a node, make sure that the image is visible on the media edit form." to the remaining task list. Does that summarize the issue well? - 🇵🇹Portugal jrochate
Same as #112, using Drupal 10.4 and PHP 8.4.
When editing Media, the image it's no there, but it can be seen on files and on the related node.
- 🇦🇺Australia acbramley
I think there's quite a bit of overlap with 📌 Automatically set revision user/log information/created time on entity revisions Needs work here. Given this issue hasn't had much action in a long time (existing patches are against code that no longer exists) I wonder if we should close this as outdated?
- First commit to issue fork.
- 🇺🇸United States tr Cascadia
The newly-changed "Remaining tasks" in the issue summary are not described anywhere, and are not really remaining tasks but rather feature requirements?
I think the first step to make progress here needs to be to open up an MR with a concrete set of changes that can be tested and discussed - there is currently only an old patch file that is horribly out-of-date - for example it doesn't even account for the core change from "context" to "context_definitions" made back in 2019, or the change from Annotations to Attributes made in core last year.
But to do that we need a well-written issue summary stating exactly what the goal of this issue is. The "Problems" section and "Proposed resolution" section still seem relevant (and are still addressed by what was done in Rules), but the "Tasks" and "API changes" sections need clarity.
As I said in #126, I'm willing to offer an MR extracted from Rules, but I would like a little clarity here on what people are looking for from Core.
- 🇺🇸United States tr Cascadia
As a reminder, Rules *still* has context-aware actions working, along the lines being proposed here, with extensive test cases.
This issue was opened because the development of Rules in the Drupal 7->8 transition identified functionality that was needed for Rules and would be useful to core as well. Back then @fago and @klausi were actively involved in developing Rules and were leveraging that work to contribute to the still-evolving core Drupal 8, and this issue was part of that effort.
The patches in here contain a lot of (old) code developed for Rules. This issue seems to have lost traction for inclusion into core when @fago stopped pushing this issue back in 2015 and put the needed functionality directly into Rules rather than wait for core to change.
As prophesized in #9, RulesAction plugins are now a fork of the core Action plugins, made context-aware. If anyone is interested, the commit that did this in the Rules repository was 55fe6db1, and it is similar to what was offered in #75 above. It's a shallow fork, done only because subclassing to get the needed functionality was not possible.
Rules implemented the functionality discussed here long ago. It works. And that functionality (and tests) have been maintained, improved, and ported to Drupal 9, 10, and 11 and is currently being tested weekly on GitLab CI. Rules and Rules-related modules supply hundreds of working examples of these plugins, with many examples and lots of documentation.
I would suggest to anyone who has a need / use case for context-aware actions that you try the Rules implementation as an archetype of how this can be implemented. There's a huge amount of commonality between what Rules has already done and what is being discussed here, precisely because this issue was opened to enable functionality needed by Rules.
I would be happy to help move this Rules functionality into an MR for core, but it would help to first have some feedback on which features should be in core, which should remain in Rules, and what is missing from Rules that core would need.
- 🇨🇾Cyprus alex.bukach
Agree @vidorado, the proper fix is to find the formatter(s) that return NULL and fix them.
- 🇦🇹Austria drunken monkey Vienna, Austria
Great to hear, thanks a lot for testing!
Merged. -
drunken monkey →
committed 619ddbfb on 8.x-1.x authored by
knurg →
Issue #2874641 by drunken monkey, knurg, manuel.adan, ressa, joshmiller...
-
drunken monkey →
committed 619ddbfb on 8.x-1.x authored by
knurg →
#5 works with Choices Autocomplete. Thanks for patch.
However, it controls after the selection and prevents the entity from being saved with a warning.
It is better to prevent selection when selecting an item that does not belong to the dependent list.- 🇩🇪Germany sleitner
@longwave you pointed in #31 about calling services inside the sort callback "is not going to be very performant in a case when there are hundreds of items or more to sort". The solution is to place the service outside the compare function
sort()
.Furthermore the function
sort()
name does not reflect its function. It is just comparing the two values, it is not sorting anything.The merge conflict is resolved.
- 🇷🇴Romania vasike Ramnicu Valcea
I can't replicate this anymore .. I remember it happened
And the patched solved the issue (in the past)If Anyone could share a replicable View config for this ... so maybe it could be used for tests
- 🇧🇪Belgium joevagyok
Opened another MR against the 3.x branch as well.
Uploading the patch file against the 3.0.0-rc20 release for composer patching. - @joevagyok opened merge request.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇧🇪Belgium herved
#189 I also encountered this issue during search_api indexing on a project with lots of languages (>20).
Because search_api processes each translation 1 by 1 and renders the rendered_item (Rendered HTML output) field which renders a view mode that contains a media. - 🇺🇸United States DamienMcKenna NH, USA
I've been hitting this lately where a specific content type has a media field that's an icon, after search_api indexes a few nodes with the same icon it starts hitting the ye olde "Recursive rendering detected when rendering entity media: [media_id]" error. Changing the number of items per index batch from the default of 50 to 5 or 10 doesn't resolve the problem, it still runs into it after it hits 20 occurrences per referenced media entity.
- 🇪🇸Spain vidorado Logroño (La Rioja)
@joseph.olstad Perhaps what you expect is only valid for your specific use case?
When creating a node in French, the preview displays the original, not-yet-saved French translation of the node, and the tag is shown in the entity's language. Isn't that the expected behavior?
- 🇺🇸United States smustgrave
Since it's been 6+ months without a follow up for steps going to close out. If still an issue please reopen
- 🇺🇸United States benjifisher Boston area
When you tag an issue for usability review, please make it easy for the usability team to review the issue. Update the issue summary:
- The "Proposed resolution" section should describe all the changes made in the issue.
- The "User interface changes" should show the existing UI and the proposed UI.
- The "Remaining tasks" should include one explaining the usability issue(s).
Most of the time, I prefer to have plain text in the "Proposed resolution" section and screenshots in the "User interface changes" section.
You can also attend the weekly usability meeting to present an issue.
I am adding the tag for an issue summary update and setting the status to NW.
- 🇪🇸Spain vidorado Logroño (La Rioja)
I believe we shouldn't suppress errors caused by a contrib or custom
FieldFormatter
. The return type ofFieldFormatterInterface::viewElements()
is explicitly defined asarray
, so no formatter should returnNULL
.I would close this as "Works as designed."
Okay, i have apply 2 patches:
- "facet-views-ajax.js and ajax controller do not take views prerender and views drupal js settings into account": " https://www.drupal.org/files/issues/2024-10-10/facets-take-views-prerend... → ",
- "Facets with AJAX not working in most of situations": " https://www.drupal.org/files/issues/2024-12-17/3052574-270-2.0.9_2.patch → "
And i have, again, a new error:
Error {message: '\nAn AJAX HTTP error occurred.\nHTTP Result Code: 40… \\u0022views\\u0022 contains a non-scalar value."}', name: 'AjaxError', stack: 'Error\n at http://drupal-10.docker.localhost:800…localhost:8000/core/misc/ajax.js?v=10.3.10:1922:3'}
message
:
"\nAn AJAX HTTP error occurred.\nHTTP Result Code: 400\nDebugging information follows.\nPath: /facets-block-ajax\nStatusText: Bad Request\nResponseText: {\"message\":\"Input value \\u0022views\\u0022 contains a non-scalar value.\"}"- 🇨🇭Switzerland berdir Switzerland
This is going to be a pretty painful rebase now that views.views.inc is gone, but yes, since it is now in a service, I think it would make a lot of sense to make that essentially a tagged service and then we can just inject the handlers into that. I have this open and plan to see if I can make that work.
Hi @joao, thanks for your help but these patches do not apply:
https://www.drupal.org/files/issues/2024-10-10/facets-take-views-prerend... → (facet-views-ajax.js and ajax controller do not take views prerender and views drupal js settings into account)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2024-10-10/facets-take-views-prerend... →If the approach with a new plugin type is used, then this definitely needs an attribute, and probably should replace the annotation.
Though I think @berdir suggested in #102/MR review that tagged services might be a better way to go than plugins?
- 🇵🇹Portugal joao.ramos.costa
Hi @rayand,
from your console errors 1st seems the issue reported on https://www.drupal.org/project/facets/issues/3211155 🐛 facet-views-ajax.js and ajax controller do not take views prerender and views drupal js settings into account Needs review .
See #239 🐛 Facets with AJAX not working in most of situations Needs reviewTry to apply the provided patch there 🐛 facet-views-ajax.js and ajax controller do not take views prerender and views drupal js settings into account Needs review and see what happens.
Hello everyone, I hope you are all well. On my side, I also have an error that changes depending on where it occurs: on my Dev environment which is on a server:
and on my local environment:
Here is my setup:
Drupal Version: 10.3.10,
PHP version: 8.1.31.
I also have a detailed status in the report:
None of the current patches for 2.0.9 work. Here are the 3 patches present in my composer:
"drupal/core": {
"Upload via Media Library field widget does not take all upload validators in account": " https://www.drupal.org/files/issues/2019-12-11/media_library---file---up... → ",
" https://www.drupal.org/project/drupal/issues/1255092 🐛 url() should return / when asked for the URL of the frontpage Needs work - url() should return / when asked for the URL of the frontpage": " https://www.drupal.org/files/issues/2022-01-12/fix_path_processor_front-... → ",
"Allow image style to be selected in Text Editor's image dialog" : "patches/2061377-466-10.3.x.patch"
},
"drupal/facets": {
"Empty exposed filter param on ajax link based facets": "https://git.drupalcode.org/project/facets/-/merge_requests/155.diff",
"Facets and exposed filters don't work together with Ajax": " https://www.drupal.org/files/issues/2023-10-06/3168241-14.facets-plus-ex... → ",
"Robustify how ajax finds the facet block": " https://www.drupal.org/files/issues/2023-09-26/facets-ajax-improvements-... → "
}- 🇧🇪Belgium kensae
I think the main problem of this issues is fixed in https://www.drupal.org/node/3227250 → ?
Automatically closed - issue fixed for 2 weeks with no activity.
- First commit to issue fork.
- 🇺🇸United States nicxvan
Can we clean up the unused MRs?
Also does this have to be annotations still? - @man-1982 opened merge request.
- 🇺🇸United States michaellander
Looks like it still needs work around access calls.
- 🇺🇸United States michaellander
Reviving this as I believe Action plugins may be a great pathway to unlock core and contrib en masse as AI tools. However, to do so, actions would need to be able to communicate required contexts.
Much has changed since the last patch, so I tried to work through and map changes accordingly.
I did change the approach for:
Drupal\Core\Action\ActionBase::executeMultiple
with the hopes of better backward compatibility.Original:
/** * {@inheritdoc} */ public function executeMultiple(array $entities) { foreach ($entities as $entity) { $this->execute($entity); } }
From most recent patch:
public function executeMultiple($context_name, array $context_values) { foreach ($context_values as $context_value) { $this->prepareExecutionContext([$context_name => $context_value]); $this->execute(); }
New:
/** * {@inheritdoc} */ public function executeMultiple(array $contexts) { $context_names = array_keys($this->getContextDefinitions()); foreach ($contexts as $context_values) { if (!empty($context_names) && $context_values instanceof EntityInterface) { // Assume a single context of type entity exists. $context_values = [$context_names[0] => EntityContext::fromEntity($context_values)]; } // Assume the plugin hasn't been upgraded. else { $this->execute($context_values); continue; } $this->prepareExecutionContext($context_values); $this->execute(); } }
Based on this change, I was looking for feedback of how:
Drupal\user\Plugin\Action\CancelUser
andDrupal\user_batch_action_test\Plugin\Action\BatchUserAction
usedexecute
andexecuteMultiple
I also wasn't sure if I needed to add constraints as well?
- First commit to issue fork.
- First commit to issue fork.
- 🇺🇸United States DamienMcKenna NH, USA
Thank you for adding the test coverage, that is excellent work!
One minor request - please replace the direct use of the service with DI.
- 🇺🇸United States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇩🇪Germany uniquename Berlin
Sorry, ignore the last comment. something went wrong with the reroll... Here is the correct one.
- 🇪🇸Spain guiu.rocafort.ferrer Barcelona
guiu.rocafort.ferrer → made their first commit to this issue’s fork.
- First commit to issue fork.
- 🇷🇺Russia walkingdexter
Please provide more information about the problem, steps to reproduce and proposed resolution. The current summary doesn't provide enough details to understand the situation.
- 🇳🇿New Zealand quietone
Drupal 10 is now an LTS, or in maintenance mode, and there are limited allowed changes for a maintenance minor release → . This change is not eligible for commit.
Reading this issue, the problem seems to be something with the Flag module. There are no steps to reproduce here as asked for in #9. Is this reproducible with only Drupal core?
I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇨🇦Canada joelpittet Vancouver
@quietone I don't believe the screenshots in #44 accurately display the root problem for why the decimal settings change between aggregation being on and off.
I added the screenshot from #38 which identifies where this stems from to the issue summary, which displays the accidental copy/paste error in https://git.drupalcode.org/project/drupal/-/commit/684b4a036e736b16d21a1..., which manifests itself into the originally reported issue as well as other Views UI issues including the error I mentioned in #56 when I bumped the priority and which @ramil g wrote the tests against.
Also I added a bunch more screenshots to the IS illustrating both problems.
One thing I don't know how to change the title to indicate the original issue is resolved + issues with any numeric aggregated field? Any suggestions?
For some reason, "n/a" doesn't get displayed if there is no "most recent post". Not sure why. There must be some limitation on what Twig logic is allowed in views?
The main forum listing is done. If someone else wants to look at it and see if it looks good, this view could replace the current functionality. Then work can be done on the next piece if desired.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇨🇭Switzerland berdir Switzerland
This is an automated message from the drupal.org issue recommendation system:
If you like this, you will love 📌 Explicitly register template_preprocess callbacks in hook_theme() Postponed and 📌 Handle module preprocess functions Active .Both me and @nicxvan would love feedback on the concept and implementation in those issues!
- 🇨🇦Canada joelpittet Vancouver
Way to pick this one up! Thanks everybody for playing the long game!
- 🇸🇰Slovakia coaston
I also found out it ignores values. When I do have grouped filter for project status where values are Open,Closed, Cancelled. And select multiple Open and Closed it always shows 0 results even there are values. It works fine when I select only one value - Open or CLosed or Cancelled, but once multiple selected it shows 0 results.
Any idea?
- 🇬🇧United Kingdom catch
Also looks good to me. I think that eventually we could try to handle state when GET AJAX leads to POST AJAX leads to GET AJAX and stuff like this by not passing down every single GET parameter to every request, but that is very hard and far off, so we need to make it work until then.
- 🇬🇧United Kingdom longwave UK
Also there is a merge conflict, some out of scope changes in composer.json/lock.
- 🇬🇧United Kingdom longwave UK
Do we need to deprecate
sort()
? Can we add the Collator as an optional argument to the existing method, and trigger a deprecation if it's not passed in? - 🇨🇿Czech Republic David Urban
I have tested #49 patch with Core 11.1.1 BEF 7.0.5 and Facets 3.0.0. It fixes the issue with Facets not updating after selecting one.
But it creates another issue in which View Footer and Pagination gets multiplied on every Ajax update. Is there any chance you could have a look at it please?
- 🇮🇳India bhanu951
I have fixed the phpcs and phpstan issues.
Tests still need to be added.
@heddn do you want me add full tests similar to the below MR or do you have any suggestions ?
https://git.drupalcode.org/project/drupal/-/commit/d4abe119f885d41104b98...
- First commit to issue fork.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
I don't know why #20 ignored the patch at #19 (thought they might be crossposting, but they have more than 1 year between them), but with #20 I also get duplicated path aliases all over the place.
- 🇮🇳India mangesh.borukar
The issue still persist with the Drupal version 10.4.1 and with the latest version of Flag i.e. flag 8.x-4.0-beta6 the patch added to #12 is not applicable.