Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2009 at 16:51 UTC
Updated:
29 Jul 2014 at 18:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
pbz1912 commentedMaking critical because I read the descriptions.
I now have a taxonomy term (yyy) with only 1 node with that tag so far. However the /taxonomy/term/yyy page has a pager with 3 pages.
Actually ALL of the /taxonomy/term/nnn pages have 3 page pagers, the /taxonomy/term/nnn?page=1 and /taxonomy/term/nnn?page=2 just say "There are currently no posts in this category."
It seems to me that it may be using the total number of nodes to calculate how many pages the pager should display, not the number of nodes with that taxonomy term.
Comment #2
bleen commentedI cannot reproduce...
* I updated my D7 install to HEAD and did a fresh install.
* Installed Devel.
* generated 50 articles
* edited two articles and gave them term "XXX"
* browsed to /taxonomy/term/1
I get a bunch of errors, but no pager:
Comment #3
bleen commentedI tried one more time to reproduce without success... please list your exact steps to reproduce and make sure you are working off HEAD. Also list any modules you may have installed to see if there is a conflict there. Otherwise there is nothing to fix...
Comment #4
balagan commentedI have similar problem, I have about 190 terms, and they all appear on page 1, but there is an additional page (2), that lists the last 90 or so terms. I was not using the dev, but version 7.10 I guess.
Comment #5
balagan commentedI have realized what my problem is. I have like 6 root elements, and the 6th root is term number 97, so it displays all this branch.
Comment #6
balagan commentedComment #7
balagan commentedThe previous code was starting pages only with root items. It changes the number of items on the page to be displayed. The code did not calculate in advance how it effects the number of pages.
The former code also displayed at least 2 root items on one page, which I dropped. Let me know if it is necessary, then I will reintroduce it.
I have made a patch, but I have just realized, that the theme function also relies on parts of code that I have deleted.
I need someone who tells me why are the taxonomy-term-divider-bottom, taxonomy-term-divider-top, taxonomy-term-preview important? They mark the terms that were moved from the following page, because they belong to a root item on the current page.
What is the point of it? I used a different logic to display the items and calculate the number of pages, so I have to add some more code to copy this behaviour.
Comment #8
balagan commentedNow I am thinking whether it is a wanted behaviour to list all the terms on the first page, marking with taxonomy-term-preview class the terms that are not supposed to be on the first page according to the page increment.
Comment #9
xjmIn order to debug this, it would be very helpful to have steps to reproduce the issue, starting from "install Drupal core." Contributed modules could play an important role in this, so please indicate if any are required to reproduce this. In some cases it might be an issue that needs to be resolved in a given module.
Other pager issues:
Comment #10
mossy2100I have tested this in D8 without seeing any problems.
I used the following process:
- Fresh install from drupal-8.x-dev
- Created vocabulary with one term
- Added taxonomy term reference field to Basic Page
- Created 0, 1, 2, .... 5 pages and checked taxonomy/term/1 each time. No pager visible at any time.
HTH
Mossy
Comment #11
balagan commentedMaybe I was not clear in my previous post, but I think it effects only taxonomy lists with hierarchy. In my case I had a 173 item taxonomy list with only 6 root items. The 6th root was about the 9xth item in the list. The pager logic was not to break hierarchy trees, so it displayed all items on the first page. Nevertheless, it still had a page 2, that listed I think the last 3 root items and its belongings. As far as I have managed to debug the code, it only calculated the items on the current page and how it effected the next page (or maybe the previous).
Nevertheless, it might effect all pages and their items, and even page numbers. So I rewrote the code. It uses an array to store the number of items on each page, when it iterates through the taxonomy terms. So right at the beginning it has correct information about the number of pages necessary to display the actual hierarchy of taxonomy terms.
Just when I was ready, I have noticed the theme function, which makes me wonder, whether listing all terms on the first page is intended, and what is the purpose of the css classes mentioned in my previous post. Anyway, I enclose my patch, which is working, but the theme function still need to be adjusted accordingly, if it is the way to go.
Comment #12
balagan commentedWell, according to http://drupal.org/node/292073#comment-1034480 what I saw was the intended behaviour.
Comment #13
xjmThanks @balagan. Again, it would really help to have steps to reproduce. Like:
This, along with the expected result versus the actual result, and maybe a screenshot, will make it easier for others to understand the issue.
Also, do you think your issue is covered by #292073: Long hierarchies not displayed on Taxonomy admin page? If so, we can re-close this issue and move work there. Thanks!
Comment #14
balagan commentedWell, I think my issue is not related to #292073: Long hierarchies not displayed on Taxonomy admin page. There the first root item contains more subitems than a page can hold. In my case it was not
I think my case (which is the expected behaviour) can be reproduced:
1. Install d7.dev standard profile.
2. Generate more than 100 terms, where at least the 101th item has a parent in the first 100 items.
This way the first page will hold the parent, and when displayed it will also display all its children.
When switching to next page, that page will also display the same items starting from the parent of the 101th item.
I did not expect this behaviour, and the extra items displayed the same way as the others. I was using the Bartik theme.
I think it would make sense to leave some notes for users about how it works, and if they dont like this behaviour, then they can use the css classes. The only theme on my system that uses taxonomy-term-preview class is garland. Let people know about these classes, so they would use it.
I have attached 2 screenshots made with garland theme, where the overlapping items are shown differently.
Comment #15
xjmI reviewed the screenshots and I'm fairly sure this behavior is by design.