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."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nick Robillard’s picture

I'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:

$page_increment  = variable_get('taxonomy_terms_per_page_admin', 100);  // Number of terms per page.

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)

kndr’s picture

Title: No terms available. bug. » Taxonomy overview form pager bug resulting in "No terms available"
Version: 6.15 » 6.16
Status: Needs review » Needs work
FileSize
1.16 KB

I confirm this bug. My patch is nearly identical to mengweifu1985's patch but functionally does the same.

kndr’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, taxonomy.admin_.inc_.patch, failed testing.

kndr’s picture

Status: Needs work » Needs review
FileSize
1.16 KB

Status: Needs review » Needs work

The last submitted patch, step_back.patch, failed testing.

kndr’s picture

Status: Needs work » Needs review
FileSize
1.15 KB

Status: Needs review » Needs work

The last submitted patch, step_back-2.patch, failed testing.

kndr’s picture

Status: Needs work » Needs review
FileSize
1.33 KB

Status: Needs review » Needs work

The last submitted patch, step_back-3.patch, failed testing.

kndr’s picture

Status: Needs work » Needs review
FileSize
1.37 KB

OMG... Once more.

kndr’s picture

Status: Needs review » Needs work

OK. I am fed up with it. Please show me the problem with this patch.

kndr’s picture

Status: Needs work » Needs review
FileSize
1.47 KB

Once more. This patch should be OK :) I hope...

kndr’s picture

Well.. I really need help :)

Status: Needs review » Needs work

The last submitted patch, step_back-5.patch, failed testing.

UK_Rogue’s picture

Just reached the same problem here and still need to add hundreds of more terms. Did anyone manage to resolved this?

Anjaro’s picture

Status: Needs work » Needs review

taxonomy.admin_.inc_.patch queued for re-testing.

Anjaro’s picture

#13: step_back-5.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, step_back-5.patch, failed testing.

DanaRoseRoss’s picture

FileSize
1.22 KB

Patch updated for Drupal 6.17

francois.soulard’s picture

Last 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).

geerlingguy’s picture

Title: Taxonomy overview form pager bug resulting in "No terms available" » Taxonomy overview form pager bug resulting in "No terms available" for vocabularies with hierarchy
Version: 6.16 » 8.x-dev
Status: Needs work » Needs review
FileSize
1.31 KB

This 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.

geerlingguy’s picture

I 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:

Parent
  - Child
     [children]
  - Child
     [children]
  - Child
     [children]
  - Child
     [children]

Because of this, it seems the same data is replicated on each of the three pages displayed.

jhedstrom’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +needs-reroll

Patch no longer applies.

joseph.olstad’s picture

Status: Needs work » Needs review
Issue tags: -
FileSize
1.22 KB

Not 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.

Status: Needs review » Needs work

The last submitted patch, 25: step_back_taxonomy-691110-25.patch, failed testing.

joseph.olstad’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Needs work » Needs review

this 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.

geerlingguy’s picture

Version: 7.x-dev » 8.0.x-dev
Status: Needs review » Needs work
Issue tags: +Needs backport to 7.x

Unfortunately, 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).

joseph.olstad’s picture

I needed to test patch 25 and it passed testing for D7.

xjm’s picture

Issue tags: -Needs backport to 7.x +Needs backport to D7
Anonymous’s picture

Issue tags: +Needs tests

This will need automated test coverage.

+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -303,6 +309,10 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
+            // Move to the first element at next root level loop

This needs a dot at the end.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Status: Needs work » Closed (duplicate)
Issue tags: +Bug Smash Initiative
Related issues: +#242324: Going to page 2 on "list terms" page doesn't display additional terms

This 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.