Needs work
Project:
Drupal core
Version:
main
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2018 at 18:27 UTC
Updated:
13 Jul 2026 at 19:57 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
cilefen commentedThe VocabularyRouteProvider is involved.
Comment #3
yivanov commentedYes, thanks for the help, got it working.
Comment #4
yivanov commentedComment #5
deepchandra84 commented@yivanov - How did you get it working ? Can you please help by explaining it a bit.
Comment #6
yivanov commented@deepchandra84, I basically extended the OverviewTerms class and applied my own logic for displaying the form and setting my custom fields.
Comment #7
deepchandra84 commentedThanks @yivanov for the reply. Actually I also wanted to override OverviewTerms page and wanted to add one more column to the table.
I did this by adding a new class 'CustomVocabularyRouteProvider' extends RouteSubscriberBase in src/Routing folder
Created a servcie in services.yml file:
at last created a new class CustomOverviewTerms extends OverviewTerms in Forms folder and in buildForm() method changed the code to add new column in taxonomy listing page.
I am still not sure if it is a correct way to do this or it is against the best practices ?
Comment #8
anybodyI just wanted to point out that we're having the same requirement to enhance the overview page and add a filter / search.
So perhaps this feature would be helpful for others too. Best would be to have it as views page in Drupal 9?
Comment #9
renrhafSame requirements here, we have created a view and an other page for this, but if we could merge both that would be awesome.
Comment #10
vidorado commented+1 here. We have a very large tags vocabulary and we would like to filter results
Comment #11
vidorado commentedComment #18
jesmaster commentedThe patch was crashing the page for me due to not checking if $form_state->getTriggeringElement() was returing null before trying to pull an array value from it. I also needed a change so the filter only looks for terms starting with the filtered word.
I attached a patch with these changes.
Comment #20
jesmaster commentedRerolled my previous patch for drupal 9.4
Comment #22
mmaldonado commentedThanks, patch #20 works fine for me on Drupal 9.4,
I would just suggest using str_contains instead of stripos for a more general and less exact search.
Comment #23
callen321 commentedAny chance we could get this re-rolled for Drupal 9.5?
Comment #24
callen321 commentedRerolled for 9.5
Comment #25
Ishwar Singh Gehlot commentedFixed CCF of #24.
Comment #26
callen321 commentedSquashed the last of the CCF issues.
Comment #27
callen321 commentedComment #28
abelpzlTesting 2975863-26-taxonomy-overview-filter.patch found it works well overall but reloading the form after performing a search produced the following errors:
Notice: Undefined offset: -1 in Drupal\taxonomy\Form\OverviewTerms->buildForm() (line 200 of core/modules/taxonomy/src/Form/OverviewTerms.php).
Notice: Undefined index: term in Drupal\taxonomy\Form\OverviewTerms->buildForm() (line 258 of core/modules/taxonomy/src/Form/OverviewTerms.php).
Notice: Trying to access array offset on value of type null in Drupal\taxonomy\Form\OverviewTerms->buildForm() (line 258 of core/modules/taxonomy/src/Form/OverviewTerms.php).
Comment #29
abelpzlI share my solution to the errors named in #28
This patch is applicable to D9.5.3
Keep in mind that in this patch I change the word comparison criteria with respect to the other patches.
-
In the future I would like to work on a custom module that adds the search to the list of terms. For the moment this solves my problem with a very long list of terms.
Comment #30
gurjinder_pablaI also wanted similar implementation for Drupal 9.4.8 and hence had to update the patch based on the code.
Comment #32
szeidlerHere's a reroll for 10.2.x . Note, that has been a change committed on that branch (after 10.2.0 release) that makes the overview page not load the whole taxonomy term entities anymore, but uses the terms as generic php classes, which needed some adoptions in the patch #2183565: Avoid loading all terms on the taxonomy overview form
This patch does not work with 10.2.0, but will work with 10.2.1 (unless there are more changes to come).
Comment #33
dydave commentedHi everyone,
Thank you very much for raising this issue and contributing a patch.
Just a quick comment to let you know I was brought here trying to fix the following D10 compatibility issue:
With a custom class that we had that was extending the core
class Drupal\taxonomy\Form\OverviewTerms, which isn't possible anymore and not recommended (due to @internal), for more details, see for example:https://drupal.stackexchange.com/questions/287378/extending-core-classes...
We had several filters actually on various custom fields, so using this patch wasn't flexible enough.
In the end, we decided to go for a
hook_form_alterimplementation, which worked very well:It is possible to add any types of fields, custom submit operations and handlers.
Hope that helps others with similar types or requirements and issues.
Thanks again for your great help with this issue.
Comment #34
abelpzlI share a patch applicable to Drupal 10.2.2
I based it on the previous patches. Add a "Clear filter" button.
This patch solved my problem, but I haven't tested it enough to ensure it works correctly in all cases.
Is it possible that this filtering functionality will be part of the Core in the future?
Comment #35
ciprian.stavovei commentedAdded a patch for version 10.1.x also.
Comment #36
billdaff commentedUpdated patch for 10.2.5
Comment #37
billdaff commentedI'm encountering a styling issue with this that I can't quite figure out, see image. The input is too close to buttons. I think it has to do with the form container but I am not sure how this is normally done
Comment #38
szeidlerI encountered the issue with hierarchical terms. Whenever I search for a term, that has parents (so is nested further down the tree), I get a
Notice: Undefined offset: -1 in Drupal\taxonomy\Form\OverviewTerms->buildForm(). So it tries to find element -1 in an numbered array, which does not exist. In addition does the term appear twice (with the same ID).Here's an updated patch against 10.2.x
Comment #39
paulmckibbenThe patch from #38 works great for me in Drupal 10.3.2. Thanks @szeidler!
Comment #40
anybodyComment #41
smustgrave commentedHello
Issue summary should be updated to follow standard template
Also all fixes should be in MRs vs patches
New feature will require test coverage
Thanks!
Comment #45
vidorado commentedComment #46
vidorado commentedComment #47
vidorado commentedComment #48
prashant.cOverall, it looks great, however, I have a few points:
Comment #49
vidorado commentedThanks for the helpful UX review, @prashant.c.
I've added a placeholder, which makes the filter's purpose clearer.
I couldn't figure out how to add a margin between the textfield and the filter button in a theme-agnostic way. It might be a theme-related issue. I've seen other pages in the configuration with the same issue.
Comment #50
prashant.cThanks @vidorado for addressing this, if the margin one is present on other forms as well then it is out of scope for this. IMO it is good to go for RTBC.
Comment #51
malcomio commentedAs noted on #3341030: Add filter and sort capability to taxonomy overview page, it would also be useful to allow the list to be sorted, as well as filtered.
Comment #52
vidorado commented@malcomio In my opinion, sorting is a bit tricky since it interferes with term weights. In fact, I haven’t thoroughly tested what happens when you rearrange filtered terms.
Perhaps we should disable table dragging while filtering, which could provide a safer way to manage the order. :)
I'll look into it.
Comment #53
prashant.cI also do think that sorting would be tricky as the terms already have weights which might create confusion and for the scope of this issue Filtering feature only we should go with I guess.
Comment #54
malcomio commentedGood point - this page handles at least two use cases:
1. finding an individual term
2. changing the overall tree structure
Sorting and filtering is useful for 1, but problematic for 2
Comment #55
sheetal.pathak commentedDrupal version 11.x-dev,
Patch applied 36 applied successfully and works.- https://www.drupal.org/project/drupal/issues/2975863#comment-15614291
Steps followed
1. Create long list of Vocabulary
2. You can use Devel to generate if you don’t have list.
3. This Feature is very useful in finding / filtering terms.
4. It also finds /Filters hierarchical terms.
5. Placeholder text is helpful it make it clear how to use.
Comment #56
prashant.cPipelines were failing for some unrelated reason, rebased the MR.
Comment #57
vidorado commentedI've disabled term reordering while filtering, as I believe this is safer to avoid strange things happening due to weight /hierarchy changes over a partial table.
I've also added a message to warn the user about the reordering not being available.
Comment #58
smustgrave commentedPipeline issue needs to be resolved before review.
Comment #59
vidorado commentedJust a C-Spell issue. Resolved! :)
Comment #60
smustgrave commentedLeft some comments on the MR all small stuff.
Also UI changes should have before/after screenshot added to the "User interface changes" section of the summary.
Comment #61
vidorado commentedComment #62
vidorado commentedComment #63
smustgrave commentedStill an open thread. If you look at other tests that extend TaxonomyTestBase they inherit the docs.
Comment #64
vidorado commentedThat's just what I was seeing :smile: Other tests don't inherit docs! :)
But I've added the statement, of course! All ready then!
Comment #65
sagarmohite0031 commentedHello,
Verified this issue on D11, MR apply successfully.
Overall looks good but when we click on filter highlight overlaps with filter button and if term reordering disabled then its still there.
Attaching screenshots -
Comment #66
vidorado commented@prashant.c already noticed the textb9x overlapping issue in #48, and I found that the problem was hard to solve and out of scope.
I don't see the problem with the warning you squared in one of your screenshots. Could you explain it better?
Thanks!
Comment #67
sagarmohite0031 commentedHello @vidorado,
I missed comment 57, I thought term reordering was disabled and why it's still there. That's why I was confused
Everything is fine.
Comment #68
smustgrave commentedI rebased the MR as it was 350+ commits back and addressed the open thread about the missing inheritdoc
One think I noticed that seemed odd and think should be removed. When you filter the warning "Term reordering has been disabled because terms are being filtered. To enable term reordering, reset the filter." appears which I agree with.
But the filtered terms are highlighted like I have some unsaved changes, don't think the highlight is needed.
Tagging for usability review and will post in #ux on slack since the summary is very well done.
Comment #69
vidorado commented@smustgrave Thank you for the rebase and the review!
The purpose of highlighting was to help the user identify the actual search results. It can feel odd if you search for a string and see multiple terms that don't match your query (e.g., the I-think-required-to-put parent terms of the ones that did match).
Thanks for posting this in #ux as well—let's see what the experts have to say about it! :)
Comment #70
rkollerin regards of the highlighting one question. in the screenshot in the issue summary https://www.drupal.org/files/issues/2024-10-09/2975863-warning-about-reo... you have both matches and none matches with the matches visually highlighted. with the MR applied i only see the matches (still visually highlighted) but no none matches shown? is that intended?
Update: turns out the example in the screenshot is for the case where you have matches that have a no match parent. in my initial test the parents were matches as well.
Comment #71
rkollerUsability review
We discussed this issue at #3489093: Drupal Usability Meeting 2024-12-06. That issue will have a link to a recording of the meeting. For the record, the attendees at the usability meeting were @AaronMcHale, @benjifisher, @rkoller, and @simohell.
First a few potential stumbling blocks we’ve identified during our initial testing:
Filterand aResetbutton visible all the time. That pattern is sort of inconsistent with other places in Drupal Core. For example onadmin/contentyou only see aFilterbutton, theResetbutton is only shown while a filter is being active. The other pattern available is for example onadmin/modules, where you have noFilterbutton at all, the module list is directly narrowed down and reflowed as soon as the first character is being entered in the filter field (which is not meeting SC3.2.2 -https://www.w3.org/WAI/WCAG22/Understanding/on-input.html). Instead of having aResetbutton the filter field is using the browser’sClearbutton. Unfortunately the support for theClearbutton pattern is not that good across browsers, as outlined in the issue summary of #3448920: Add a clear button to the fields ui. And we wanted to note that there is also an issue about the unification of the filter functionality across Core in general in the following issue #3028968: Create Javascript library for searching/filtering rendered lists on the client..Term reordering has been disabled because terms are being filtered. To enable term reordering, reset the filter.) a bit too verbose. And warning messages in general are more about highlighting certain one time events, not about explaining a persistent inherent behavior a user is facing each and every time.1.1:1which is#FDF8EDagainst#FFFFF(SC 1.4.11). We’ve also quickly tested in VoiceOver (voiceover.mp4) and there is no indication in the aural interface to label that a row is a match. So the color is the sole way that communicates a match, which is not meeting SC1.4.1 (https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html). The width of the table header is also broader than the width of the rows when a filter is active (probably because the drag handles got hidden). That way the header and the rows are not aligned compared to if no filter is applied. And out of the scope for this issue, but I realized while recording the video for this summary, that not only the match state is not reflected in the aural interface, but also the level a term is within the term hierarchy is not reflected there either (voiceover.mp4).Resetbutton in the filter section and anotherReset to alphabeticalbutton at the bottom of the list next to theSave button. With a filter active, and you the user pressing theReset to alphabeticalbutton, you get presented the following help textResetting a vocabulary will discard all custom ordering and sort items alphabetically.on the confirmation page. Based on that help text the expectation and assumption would be that only the filtered results would be displayed in an alphabetical order. But not only the list gets switched back to an alphabetic order but also the filter gets reset - a detail that is not reflected in the help text. But in general it is sort of confusing in the first place to have to differently labeledResetbuttons with slightly different behavior within the same page.The group concluded on the following points:
SaveandReset to alphabeticalbuttons at the bottom, anytime the filter is active. That avoids any ambiguities in regards of theResetbuttons plus theSavebutton is sort of without any purpose while the user is unable to alter the term order. Strictly speaking you are currently having three reset buttons,ResetandSavesimply reset the filter, whileReset to alphabeticalresets the filter and resets the order to alphabetical.admin/contentoradmin/modules. While writing this comment and looking again at both approaches i’ve realized following the approach onadmin/modulesmight not be the best choice due to the fact that it is not meeting SC3.2.2 plus it is relying on the browser’s clear button which has additional issues - after a brief followup discussion we've agreed on going with the pattern used onadmin/contentas our recommendation.[Icon] indicates matching terms. Parents of matching terms are also shown.Reordering is disabled while terms are filtered.. The only detail we had not consensus on was how and where to present that message. From our perspective there are two viable options. Either keep the string in an admin message. If that is the case change the type from a warning to an info message, since nothing is broken or going wrong, it is simply an informal message about the inherent behavior of the interface on that page. But as a downside that message draws a lot of attention and uses a lot of screen real estate every time a filter is applied. The other option we’ve considered was to remove the admin message entirely and append the string to the help text ([vocabulary] contains terms grouped under parent terms. You can reorganize the terms in Taxo using their drag-and-drop handles.). Downside with that approach, due to the fact that the primary button, the filter section and the table have a way higher affordance, drawing all the attention, the odds are high that this text is potentially glossed over and even missed entirely.If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #72
vidorado commentedWow! This is an awesome UX review! I will get to it in a couple of days.
Thanks a lot!
Comment #73
vidorado commentedComment #74
rkollerthanks for working on the changes @vidorado! i've taken a look at the latest state of the MR, in the following my personal opinion, not the opinion from the group that has discussed the issue last friday (even though i have shared my thoughts and the demo video in the thread for last weeks meeting on the drupal slack: https://drupal.slack.com/archives/C1AFW2ZPD/p1733493024401899).
point 1 and 2 i consider fixed and also the from my perspective the right approach to recommend. looks good me hiding the save and reset to alphabetical button as well as following the pattern used on admin/content which is hiding the reset button while no filter is entered yet.
point 3 and 4 probably need some more work. i've created a short video illustrating the recent changes including the aural interface with voiceover - vo.mp4.:
1) If you press the filter button after entering a filter string the focus is getting lost. So if you are keyboard user the focus isnt around the filter section in the DOM but at the beginning of the tabindex,.you notice after pressing the filter button the first element to focus is the
skip to main contentskip link instead for example theresetbutton.2) I am completely uncertain what the best approach for communicating the filter matches is. i still am inline with our review that just adding a background color to the rows with matches has for one accessibility issues but also the problem that people associate those rows with a background color as "errors" because the color is the same or at least close to the color of the warning message, and the fact that a warning message was shown in the first place. but on the other hand i am also not sure if our suggested idea is the right choice and having just an icon at the beginning of the row is already clear enough. well first of all using a caret at the beginning has at least another problem, that caret a user associates with collapsible and expandible lists. i always think i am able to expand those two rows in the video. but i've tried to replace the caret with the bullet and the bulls eye suggestions we've made during the call as well as an arrow, an additional suggestion @simohell made during our followup discussion in the drupal slack, but none of those really clicks for me :/
Problem is, i've also checked the drupal design system and there is neither a perfect fit for an icon nor a defined component how filter matches should be communicated visually. i was hoping maybe i have missed anything the first time i was looking. i still think removing the warning message is the right step but "maybe" adding an icon (which still has to be decided on) AND having a background color might do the trick? or maybe we should ask the claro maintainers for design input?
3) the aural interface for the icon is not necessarily clear to a none sighted users without any visual cues.
black pointeris not really clear if someone directly skims through a table not checking the help text upfront. and still if the person knows that help text, there is still a cognitive transfer that you have to transpose the announcement of black pointer equals to a match. i wonder even would it be viable to make the icon decorational while adding a visually hidden span to the name which prepends something like "Match" ? Not sure what others think?4) about the help text. i think i would move "Reordering is disabled while terms are filtered" up to the help text and make it available all the time. the legend/explanation i would keep there and only show with an active filter. the only thing about that legend, the brackets were only intended as a placeholder to highlight there an icon should be inserted. cuz now the brackets in combination with the caret create the association of a play button for me :D
Comment #75
rkollerand i forgot to change the status, needs some more work and discussion
Comment #76
vidorado commentedThanks for the thorough review, @rkoller!
I’ve just committed a proposal that I believe could be acceptable:
aria-hidden="true", as it seems unnecessary for aural navigation.I’ve tested the navigation with the ChromeVox Chrome add-on, and it seems accessible to me. :)
Comment #77
vidorado commentedA screenshot for better judging:
Comment #78
vidorado commentedComment #79
sagarmohite0031 commentedHello,
Verified this issue on D11, MR apply successfully.
Working as expected.
Attaching screenshot
Comment #80
nikolay shapovalov commentedThanks for MR, this feature looks really nice, but as I understand expected change in the UI already change at #77.
Please update IS.
I left my feedback at MR, please check.
Comment #81
vidorado commentedYou're right @nikolay_shapovalov! We forgot to update the screenshot after the UX review and changes :)
I've updated the screenshot and taken a quick look to yor MR comments, which look very useful to me. I will address everything as soon as possible.
Thank you very much!
Comment #82
vidorado commentedComment #83
vidorado commentedAll done! :)
Comment #84
ironnuts commentedComment #85
ironnuts commentedUpdated the IS. Have left '[]' placeholders where further information is needed.
Comment #86
ironnuts commentedEdited MR. Changed 'up-branch' to 'parent'. However perhaps it should be 'hierarchy of parent terms' or 'complete parent hierarchy'?
Comment #87
ironnuts commentedEdit MR. Resolve @vidorado's comment.
200+ commits behind 11.x. Rebase.
Added comment to unresolved thread: whether to add Unit test.
Comment #88
smustgrave commentedJust some small comments, appears super close.
If you are another contributor eager to jump in, please allow the previous posters at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
Comment #89
vidorado commentedThanks for your feedback @smustgrave, I've addressed all your suggestions :)
Comment #90
smustgrave commentedBelieve feedback has been addressed for this one.
Comment #91
catchThis looks like it would be useful, I haven't reviewed the code but it looks like it could use product manager review for the UX change so tagging for that.
Comment #92
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #93
abelpzlIs there any update on this issue?
I don't understand the Needs Review Queue Bot comment.
Comment #94
vidorado commentedThe Needs Review Queue Bot is just saying that this MR needs a rebase. Also a product manager must review this feature, and that has not yet happened.
Comment #96
dcam commentedRebased
Comment #97
dcam commentedSorry, this should have been set to Needs Review since I added the missing docblocks.
Comment #98
vidorado commentedThe comments look good to me :)
Thanks for rebasing, @dcam!
Comment #99
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #100
ironnuts commentedAdded description to @return value (see #99). The return value was in fact described at the top of the docblock (instead of a general description of what the function does). Rejigged text of the docblock trying to avoid repetition and to satisfy PHPCS
Comment #101
ironnuts commentedComment #102
smustgrave commentedThink it's fine to restore status.
Comment #103
gábor hojtsyReviewing as core product manager.
I really like this feature, it would have saved me when editing big tag vocabularies. I also applaud the attention to accessibility details too.
That said, I agree with @rkoller that there is not really an existing pattern of how the visual of the matched items should look like and the green background and arrow is a one-off made up for this issue. It would be great if the designers involved with Claro could chime in and provide a Claro-compatible solution. Even better if there is a Claro + Gin fit since core plans to add Gin sooner or later to replace Claro. The same can be said about the message of why dragging was disabled which IMHO has an odd placement (it does not appear anywhere near you would expect the dragging to happen).
I think with more UI polish this would be great.
Comment #104
waropd commentedPatch that applies for 11.2.2
Comment #106
nick dewitte commentedThis feature works well for our taxonomy lists and improves the overall experience.
However, it doesn't seem to work for translations of taxonomy terms.
I've modified the code to load the term translation if the data in the tree object differs from the current language.
The catch of this might be that term entities are now loaded before filtering in these cases, which was previously avoided.
Comment #107
haskweb commentedPatch that applies for 10.4.8
Comment #108
alexdoma commentedre-roll for 11.3.0
Comment #112
xurizaemonAttaching backport patch for 11.2 to integrate Nick's changes in #106 - thanks for all the work progressing this.
I agree with Gábor in #103 that this feels like it needs UI polish still.
My suggestion for the filter warning text "Reordering is disabled while terms are filtered." is that it would be clearer if attached as a description to the filter field, rather than placed beneath the help message. A screenshot proposal below - I wondered if the form description class was appropriate, but it makes the text too small.
Thanks for the update in #76 @vidorado! I feel rkoller's comment in #74 holds still - the ligature / character (now "⇒") usage still feels a very one-off interface. Also suggest that the placement of the help text "@indicator indicates matching terms. Parents of matching terms are also shown." feels a bit crammed against the edge of the table. I don't have concrete proposal to improve that sorry!
Also, I see that the "... indicates matching terms" has class "color-success" assigned in form API, but in both my local instance and screenshot in #77, that text does not have the background colour associated with that class. Was it intended to provide that hint to support explanation?
Comment #113
jsutta commentedRebased the MR branch against
mainand changed the classOverviewTerms.phpextends fromFormBasetoEntityForm. This does two things:OverviewTerms.phpwith CoreComment #114
jsutta commentedComment #115
xurizaemonSome thoughts on the patch as it is presently. I've re-read #71 #74, #76 before posting this :)
I don't find the coloured highlighting on the term name clear. I think the shift to highlighting the term name instead of the row means it lacks the padding that colour would have in most Drupal contexts, so it doesn't fit within my expectations of the design and looks out of place. I suggest we put the aria labels on the matched term label, but the highlight on the entire row as before.
Here's a screenshot of how this looks for me locally (what I'm commenting on, not what I'm proposing):
NB: Above screenshot is using Claro from 11.2 and backported patch for 11.2. There's also https://www.drupal.org/files/issues/2025-01-26/highlighted-and-arrow_0.png in the issue description above.
I understand the change to "success" colour from "warning", but for me it too reads wrong here. Perhaps this is that it's not a "success" in the way I'd think of some action performed or entity change? To me, "info/status" is the correct accent. Or perhaps, since the user is looking for matches and providing parents as supporting context, we could de-emphasise the non-matched rows visually?
I don't find the => ligature meaning visually clear. I wonder if a text indicator after the term name (eg: "Matches filter") would be an improvement? I'm mindful that the list could get very busy if we have additional text repetitively, perhaps why the character indicator was tried. The general UI pattern in Drupal is to not show unmatched items, which means the expectation is that matched items look "regular". Perhaps we could
<em>the parent items, or similar?To me a => ligature looks like a positional marker ("here!"), and in the context where most or all results are marked as "matched" it doesn't sit right.
Those are some quick thoughts - will digest further, happy to propose changes - but I'd appreciate thoughts from those already working on this before I interfere too much!
Comment #116
xurizaemonStatus change was not intentional, I hit submit on a comment written yesterday. Back to NR per jsutta change as that was not my intent.
My opinion is this wants more UX work.
Comment #117
rkollerI wanted to briefly test the current state of the MR9387. when i've tried to filter the terms on a vocabulary i ran into a WSOD
i had the workspaces ui module (i was on the live workspace) as well as a second language added (but i was using the english localization). even after uninstalling the workspaces and workspaces ui module and deleting the second language and just keeping english resulted in
the interesting detail is even after uninstalling all the modules related to multilingual i still get
setting the issue back to needs work due to the error
p.s.: after reading comment #118 i wanted to also note that i am on the main branch. i also made sure and did a
drush siand wiped the existing database. so also with the cleanest starting point using the standard profile without any garbage from previous testing. i've only installed the navigation module and then added a few terms to the tags vocabulary. i still run into the error.Comment #118
sharonho commentedhttps://www.drupal.org/project/drupal/issues/2975863#comment-16387326 works for me on 11.3.x thank you
Comment #119
xurizaemonInteresting - I just went to add a new Term, and because the Filter text input is right beneath the button labelled "Add term", I thought this was the input field to create a new term, entered the term name in the filter, hit "add", and was surprised to find it didn't work as I expected.
(I had forgotten I had that patch in effect and was working on something else. Yeah yeah, make fun of me... I don't perform regular Drupal content management, many forms are unfamiliar to me at times.)
Could the spacing be improved, so that "Add term" is a bit more by itself, and the filter input closer attached to the list it filters?
Comment #120
sharonho commentedHi after some further QA on the filtering, we have an issue while doing a subsequent search
on 11.3.5 and applying patch https://www.drupal.org/project/drupal/issues/2975863#comment-16387326
Comment #122
ericgsmith commentedI have rebased and fixed the 2 most recent reported issues.
#117 looks to be a result of a bad rebase - the property was being set via promotion as
$language_managerbut documented / called as$this->languageManager. Changing to$languageManagerfixes this - and removed superfluous doc block.Second issue #120 I first couldn't reproduce - but then saw it in the test the second time the form is submitted.
As the properties were being set as private and readonly there dependency serialization trait was not able to see / set them - when the form sleeps / wakes up these were not being set. Interesting while avoiding private services in mentioned in https://www.drupal.org/docs/drupal-apis/services-and-dependency-injectio... the use of readonly seems to be implied - but that was also throwing a fatal error from wakeup that you can't set a readonly property. This is also what the existing services were doing - but debugging I could see they are null during build form 🤔
Attaching patch applied to 11.3.x for anybody who is using the patch currently.
Tests are passing again - leaving as needs work as I'm not 100% on the property promotion / serialization change now that I see similar use of readonly elsewhere.
Comment #123
ericgsmith commentedAdding #3424344: Allow DependencySerializationTrait to work with readonly properties as related issue as per the change to remove readonly
Comment #124
gregn0r commentedIssue #120 appears to be resolved as I could create this but now I cannot, however the filter is not applied at the pagination level for the results it produces
Searching for a result that spans 2 pages, I click next or page 2 and it takes me right back to all the results on the overview page
Comment #125
dimitriskr commenteduploading MR patch for 11.4.2 (it's just the MR diff, no extra changes)