Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2008 at 19:36 UTC
Updated:
5 Nov 2008 at 05:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardPatch did not attach
Comment #2
agentrickardFirst patch was accidentally tangled with http://drupal.org/node/242324 -- which is also good.
Correct patch against HEAD.
Comment #3
Crell commentedI would actually support backporting this to Drupal 6 as well. The drag and drop on the taxonomy pages is really nice, but with only 10 items per page it becomes effectively useless on eve marginally interesting taxonomies. I believe the menu admin pages had their paging removed for the same reason.
On visual inspection the code looks good, although I am confused by the comment "// This line does nothing -- but we need to go back to page one..". Do you mean it doesn't work, or that we just want to force it back to page 1? If the latter, I'd just say "This sends us to the current page, but without any pager information so that we go to page 1".
Comment #4
agentrickardThe comment means: "I want to redirect to page one. but this doesn't work." The only way I made it work was to unset($_REQUEST['destination']) before the return. We also, in theory, need to set $form_state['resbuild'] == TRUE, but you can't do that with a redirect.
See http://api.drupal.org/api/function/drupal_process_form/7 for why.
Comment #5
agentrickardIIRC , merlinofchaos says that unset($_REQUEST['destination']) is ok here. chx says no need to rebuild the form.
Comment #6
dries commentedIt seems to me that pagination is broken with DnD even if we decided to replace 10 by 100. It sounds to me as if removing the pagination might be best?
Comment #7
catchI don't think we can remove pagination for freetagging vocabularies with potentially 20-30,000 terms (or even 2-3,000 terms on most hardware). However free tagging is less likely (thought not impossible) to use drag and drop and/or hierarchy - so maybe disable paging on everything else?
Even then I think there'd be a risk for large structured vocabularies, so it might need a setting somewhere. Maybe an on/off setting, per vocabulary in core, but use a variable for the number of terms per page so one of the taxonomy utility modules could change it from contrib?
Comment #8
dries commentedMaybe we can simply hardcode this settings to 200 then, instead of 10?
Comment #9
agentrickardIn testing, we ran into memory issues when setting the terms per page value greater than 200.
I like having the option to make this variable, but otherwise, changing the value to 100 is probably reasonable.
Comment #10
Crell commentedUsing a variable with a default value of 100 and no UI for it means we get a usable taxonomy page, no string changes, and allow contrib to handle it from there. I'm OK with that, especially as we can then get this into D6 (no string changes).
Comment #11
catchfwiw I agree 100% with Crell in #10.
Comment #12
robloachThe attached patch changes the terms per page to a variable named "taxonomy_page_increment", which defaults to 100. Is there anything more missing that you guys can think of? Is 100 the best value we can put here?
Comment #13
agentrickard100 is reasonable -- but would need to be tested for memory usage. Sometimes the $tree array can be very large.
The UI can be handled in contrib, using hook_form_alter() as long as the variable is added, so that's fine by me.
Comment #14
alex ua commentedThis works well, but I'd really love to be able to control how many taxonomy terms are displayed on the page. I understand that enabling 200 or 500 terms might slow things down a bit, but if I had to reorganize a large taxonomy it would be great to be able to change the setting for at least the time I had to work on it.
+1 for backporting at least the 90 term increase on the taxonomy pages.
Comment #15
nedjoI know it's what's already in the taxonomy code, but 'increment' doesn't sound right for the variable name.
The variable we're feeding into
pager_query()is$limit.Currently we have these variables in core for setting pager limits:
*
'default_nodes_main'in node.admin.inc.*
'forum_per_page'in forum.admin.inc.*
'comment_default_per_page_' . $node->typein comment.module.So possibly
*
'taxonomy_per_page_admin'?Or we could rename the set, e.g.
*
'node_pager_limit'*
'forum_pager_limit'*
'comment_pager_limit_' . $node->type*
'taxonomy_pager_limit_admin'Comment #16
Crell commentedRenaming the full set is not an option for D6, and this will need to be backported, so let's go with taxonomy_per_page_admin. Once that's in, someone interested in DX can go in and rename stuff in D7 with appropriate update hooks.
Comment #17
catchYes please, re-rolled with taxonomy_per_page_admin.
Comment #18
agentrickardPatch in #17 seems to be tangled with another patch.
Comment #19
agentrickardFor review.
Comment #20
robloachhttp://testing.drupal.org/node/14654
Looks good.
Comment #21
cdale commented+1 Works great.
Comment #22
webchickI made it
taxonomy_terms_per_page_admin. The other one rubbed me the wrong way.I am 200% for a DX patch in 7.x that makes these consistent though. Yuck.
Moving back to 6.x for consideration.
Comment #23
Crell commentedwebchick: Um, so did you commit it to D7 or not? :-) It's not clear from #22.
Comment #24
webchickOops. Yes. :P
Comment #25
gábor hojtsySince Dries was so supportive of the change saying that pagination is broken in the current ways, I've committed this change to Drupal 6 as well, with the same change webchick did on Drupal 7.
Comment #26
Crell commentedHooray!
This needs a UI in Drupal 7. Dries, should we reopen this issue or start a new one?
Comment #27
webchickI'm not convinced we really need to expose a UI for this, personally. I think adjusting the number of elements on the taxonomy term admin page qualifies as "power user" enough for settings.php.
Perhaps if we did a follow-up patch to make these consistent, and add them to pages that don't have them (menu.module?) we could talk there about standardizing a UI as well.
Comment #28
catchmenu module doesn't handle paging on drag and drop /at all/ - the implementation needs to be refactored to match what taxonomy does (saving the order of the elements in $_POST and such).
Comment #29
Mac Clemmens commentedThank you from all of us who were hacking core (boo!) in order to accomplish this before. +1
Comment #30
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.