This is a rare condition. (http://domian/admin/content/taxonomy/%?page=1) If the hundredth term belong a tree and this tree bigger than 100, so drupal want show all tree.
if ($pterm->depth == 0) {
prev($tree);
continue 2; // Jump back to the start of the root level parent.
}
In this time, key($tree) == 0 , then prev($tree) will return false. so that, this page will return "No terms available."
Comment | File | Size | Author |
---|---|---|---|
#25 | step_back_taxonomy-691110-25.patch | 1.22 KB | joseph.olstad |
#22 | 691110-22_step-back-taxonomy.patch | 1.31 KB | geerlingguy |
#20 | step_back-6.patch | 1.22 KB | DanaRoseRoss |
#13 | step_back-5.patch | 1.47 KB | kndr |
#11 | step_back-4.patch | 1.37 KB | kndr |
Comments
Comment #1
Nick Robillard CreditAttribution: Nick Robillard commentedI'm having this exact problem. My taxonomy overview page (admin/content/taxonomy/[vid]) pager shows 3 pages. When I click on 2, i get no results, a "No terms available" message, and the pager links disappear. Like mengweifu1985 said, this happens because the logic in function taxonomy_overview_terms() forces each page to begin with a root term - and when paging, if the root term has more than 100 descendants, no results are shown (more or less).
However, with this patch, page 2 (that use to show "No terms available") is now showing the entire tree.
I'm going to dive into this and will post my findings.
Update: I've looked into this more and I think I'm going to solve by removing the pager limit all together. This can be done easily by setting the 'taxonomy_terms_per_page_admin' variable to some very high value (ie: 999999999).
This is used here:
This is not ideal, obviously. Because I have so many terms, the d&d JS is really going to impact browser performance.
(updating the issue title with more detail)
Comment #2
kndrI confirm this bug. My patch is nearly identical to mengweifu1985's patch but functionally does the same.
Comment #3
kndrComment #5
kndrComment #7
kndrComment #9
kndrComment #11
kndrOMG... Once more.
Comment #12
kndrOK. I am fed up with it. Please show me the problem with this patch.
Comment #13
kndrOnce more. This patch should be OK :) I hope...
Comment #14
kndrWell.. I really need help :)
Comment #16
UK_Rogue CreditAttribution: UK_Rogue commentedJust reached the same problem here and still need to add hundreds of more terms. Did anyone manage to resolved this?
Comment #17
Anjaro CreditAttribution: Anjaro commentedtaxonomy.admin_.inc_.patch queued for re-testing.
Comment #18
Anjaro CreditAttribution: Anjaro commented#13: step_back-5.patch queued for re-testing.
Comment #20
DanaRoseRoss CreditAttribution: DanaRoseRoss commentedPatch updated for Drupal 6.17
Comment #21
francois.soulard CreditAttribution: francois.soulard commentedLast patch version work fine for me, thanks !
But...
With very large collection of terms, and if child terms contains more than 100 children, the list will continue to display the first root item and only 100 child terms... So on my installation, page #2, #3 and #4 still display the 100 first terms...
I had to modify $page_increment in taxonomy.admin.inc to display 250 terms (in fact, value of the most big tree was a good idea to).
Comment #22
geerlingguy CreditAttribution: geerlingguy commentedThis is still a bug (verified in D7 and D8). Threw me for a loop for a few hours today, but I finally noticed that the first page was displaying all 290 of my hierarchically-arranged taxonomy terms, even though two more pages were showing in the pager at the bottom.
Attached patch is straight forward-port to D8, didn't test at all... just wanting to move along this issue.
Comment #23
geerlingguy CreditAttribution: geerlingguy commentedI can confirm that this patch makes things show up on further pages (beyond page one), but there were still a few taxonomy terms in the vocabulary that seemed to be hidden away.
In my case, I have a taxonomy with 297 terms in it; all but one is a second-level term or higher (so there is one parent term, and all others are under it). There are four second-level terms, and then the rest of the terms are sorted under those. So:
Because of this, it seems the same data is replicated on each of the three pages displayed.
Comment #24
jhedstromPatch no longer applies.
Comment #25
joseph.olstadNot sure why this was flagged for version 8.0.x, it's a 5 year old issue starting with drupal 6 and the code never was committed to the 7.x branch.
Patch 22 specifies a D8 file that doesn't (or no longer) exist(s).
Here is the patch for drupal 7.x based on comment #22's patch.
The above error is about D8, not D7.
Comment #27
joseph.olstadthis issue is regarding D6 and D7 started 5 years ago long before D8.
After reviewing the D8 code, it is clear that the taxonomy logic for D8 has changed completely.
Since geerlingguy posted his patch 22 there's been a lot of radical changes done to the D8 dev branch for taxonomy. For these reasons I suggest we leave this as a D7 issue as no one has confirmed that this is an issue in a recent build of D8 and one year ago the taxonomy module hadn't yet been transformed to D8 standards.
However we are still using D7 in production and need this patch 25 to be tested. So I'm going to change this to a D7 issue so that the patch can be tested against D7.
Comment #29
geerlingguy CreditAttribution: geerlingguy commentedUnfortunately, the patch won't be able to be committed to Drupal 7 or Drupal 6 unless it's first committed to Drupal 8, at least afaik. That way newer versions of Drupal don't have regressions right out of the gate. This problem still occurs in Drupal, and it will just need a bit of a reroll (which will likely take a little time; I don't have the bandwidth right now).
Comment #30
joseph.olstadI needed to test patch 25 and it passed testing for D7.
Comment #31
xjmComment #32
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedThis will need automated test coverage.
This needs a dot at the end.
Comment #41
pameeela CreditAttribution: pameeela commentedThis is a duplicate of #242324: Going to page 2 on "list terms" page doesn't display additional terms, which is making good progress. I've added credit to that issue for the contributors here.