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

Pager not working as expected for taxonomy overview page #441

Closed
CraigClark opened this issue Apr 22, 2024 · 5 comments
Closed

Pager not working as expected for taxonomy overview page #441

CraigClark opened this issue Apr 22, 2024 · 5 comments
Assignees
Labels
bug Something isn't working Priority: medium This issue has a moderate user or business impact and needs to be fixed in next release Sprint 16 April 4- April 24 Sprint 17 April 25 - May 16 task a task that a dev team member needs to address

Comments

@CraigClark
Copy link
Collaborator

CraigClark commented Apr 22, 2024

OP timer

https://openplus.monday.com/boards/4092908516/pulses/6498638475


Important

I have listed this as a medium priority task for now. There are ways to manage this vocabulary, but the core taxonomy manager should work.

Describe the bug

Drupal's taxonomy overview page for information schedule. /admin/structure/taxonomy/manage/information_schedule/overview is not behaving as expected.

This vocabulary has 2242 terms.

There is a pager at the bottom, but it does not work as expected.

If you go from page 1 to 2, you see the same terms. If you go to page 8, you see the end of the taxonomy (terms under Special), go to page 9 and you start with ARCS at the top of the list. Since ARCS is the first term, and Special > Transitory Information is the last, I would expect nothing after page 8.

I had this happen on dv14, test and dev. Prod isn't loading the page at all.

To reproduce

Steps to reproduce the behaviour:

  1. Go to '/admin/structure/taxonomy/manage/information_schedule/overview'
  2. Click on 'page 8'
  3. see that Special > Transitory Information is the last term
  4. click on page 9
  5. see that you start again with ARCS

This is just one example. Using the pager at all returns odd results no matter what you select.

Expected behaviour

    • The taxonomy overview pate loads
    • 200 items load then you need the pager to navigate. 200 is an arbitrary number. We are looking for a balance between performance and having as few pages as possible. We may need to adjust this.
    • The pager works as expected

Note

Additional information

  • This problem only happens on the Drupal taxonomy page. If you use the contrib module taxonomy_manager there are no issues. /admin/structure/taxonomy_manager/voc/information_schedule
  • This vocabulary was imported using the import_taxonomy module
@CraigClark CraigClark added bug Something isn't working Priority: medium This issue has a moderate user or business impact and needs to be fixed in next release task a task that a dev team member needs to address labels Apr 22, 2024
@CraigClark CraigClark added this to the Administration milestone Apr 22, 2024
@CraigClark
Copy link
Collaborator Author

@lkmorlan when you get to this, let me know if you think it will take a lot of time. We can discuss with Nicole how important it is

@CraigClark CraigClark added the Sprint 16 April 4- April 24 label Apr 22, 2024
@lkmorlan
Copy link
Collaborator

This is deliberate behaviour that has been in Drupal core since Drupal 6.0. The taxonomy term pagination always shows at least two root-level terms on each page. This allows dragging terms around to do whatever sorting is desired. This works fine if each root item doesn't have too many descendants. In our case, there are only a very few root terms and a huge number of total terms, so it doesn't work very well.

The relevant code is in core/modules/taxonomy/src/Form/OverviewTerms.php; search for "Keep a variable to make sure at least 2 root elements are displayed." This code was added for Drupal issue 193333 in commit e6a88be in 2007.

We could decide to use only taxonomy_manager, write something else, or patch core to remove this feature.

@CraigClark
Copy link
Collaborator Author

@lkmorlan I think we shouldn't fight against core unless there is a really good reason. In this case, I would consider a taxonomy like this to be edge case. I think we should document it, and in the documentation state that this taxonomy needs to be managed with taxonomy manager. I'm not that concerned about user impact since only the DC Admin has access to the taxonomies.

I'll add to the documentation and close this. Thanks for looking into it.

  • add information about where to edit the info schedule taxonomy and why this problem exists.

@CraigClark CraigClark assigned CraigClark and unassigned lkmorlan Apr 24, 2024
@CraigClark
Copy link
Collaborator Author

Assigning to myself to add documentation

@NicoledeGreef NicoledeGreef added the Sprint 17 April 25 - May 16 label Apr 25, 2024
@CraigClark
Copy link
Collaborator Author

Closing this. I have added an explanation to the docs see https://cat.data.fin.gov.bc.ca/documentation/information-schedule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: medium This issue has a moderate user or business impact and needs to be fixed in next release Sprint 16 April 4- April 24 Sprint 17 April 25 - May 16 task a task that a dev team member needs to address
Projects
Development

No branches or pull requests

3 participants