It should use a pager_query. Loading all terms is not really feasible with freetagging. As I have not touched the original code just indented it and tested the -- rather trivial -- patch for freetagging, I dare to submit this as RTBC. Other issues will follow as we face this nice vocabulary of 179487 terms

CommentFileSizeAuthor
#9 taxo_6.patch3.25 KBbdragon
#8 taxo_5.patch3.15 KBbdragon
#4 taxo_4.patch2.97 KBchx
taxo_3.patch2.8 KBchx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Status: Reviewed & tested by the community » Needs work

The code that is there already looks a bit shaky. I think it would be best to clean it out rather than add another layer. Here is what I see:

* A couple lines commented FIXME that are modifying the pager's globals.
* A conditionally-inserted pager inside the table, which should always be inserted, right after the table.

It looks like the code is already trying to do the right thing with pagers, but stumbling upon not having a real query, which pagers tend to like.

chx’s picture

Status: Needs work » Reviewed & tested by the community

The tree-displaying code can't really use pager_query without adding some serious amounts of code (you would need to keep some form of materialized path stored, maintained etc) and I have not even touched that. My code just adds a few lines for flat displays which can and should use flat display.

drumm’s picture

Status: Reviewed & tested by the community » Needs work

Okay, we can go with this general design then. However, lets clean up the code style a little bit. Here are some ideas-

* Flip around the if statement to remove the '!'.
* Use 'h.parent' instead of 'parent'.
* Why are we getting both 't.tid' and 't.*'?
* 'text/'. $variable instead of "text/$variable".

chx’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2.97 KB

I did the first three action points and even added more comments (Dries always wants more comments, so I thought why not :) ). But the fourth action point I am not doing, see almost the end of http://phplens.com/lens/php-book/optimizing-debugging-php.php (or just search on php 4.3 and see what it has to say). I find this version much more readable.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.x with moving the pager outside the table.

yched’s picture

Version: 5.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Shouldn't this go in 6.x as well ?

drumm’s picture

Yes.. this needs to be put in 6.x.

bdragon’s picture

Status: Patch (to be ported) » Needs review
FileSize
3.15 KB

Untested forward port to 6, based on the version committed by drumm.

bdragon’s picture

FileSize
3.25 KB

The patch wasn't broken, but it was rolled from the wrong dir.

bdragon’s picture

Title: Overview screen is unusable for freetagging » Regression: Overview screen is unusable for freetagging
Crell’s picture

Status: Needs review » Reviewed & tested by the community

Slight fuzz on applying, but otherwise works. I generated a hundred terms with devel module and got a working pager out of it.

There's still one FIXME line, but it was there before this patch, too. Let's commit it.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Good, thanks. Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)