TL;DR

I need more than 99 items in my queue. Change #maxlength = 2 to #maxlength = 3 to allow this.

Detailed use-case / resolution

I have a queue which was originally set up as Unlimited queue size. The queue is now at 850, and I cannot view the queue without causing memory exhaustion errors (and my site is set to 400MB). When I increase the memory and view the page, it takes forever to load because of browser rendering.

I checked with my content admin, and they don't really need more than 250 items in the queue. So I went to the queue to edit the "Queue Size" and reduce it. But the Queue size is limited to two digits (i.e. 99 is the max).

This limit appears to be arbitrary, solely based on the fact that the field has #maxlength = 2. If I change that in code, it seems to accept larger numbers no problem. I even used Devel to generate an Unlimited test queue with 999 items, then reduced it down to 250 and everything works as expected (the older 749 items get removed).

So I propose a simple code change from #maxlength = 2 to #maxlength = 3. I have a hard time imagining why someone would want more than 999 items in their queue (and the performance issues that I described at the top show that even 999 is potentially problematic). But more than 100 items is totally reasonable.

I found this old issue (#1240068: Limit a nodequeue to more than 99 nodes) that describes using a hook to make the change. But we can't rely on every person who manages a Drupal site to know how to code (or even to have access to the file system to make the change).

Comments

hargobind created an issue. See original summary.

hargobind’s picture

Status: Active » Needs review
StatusFileSize
new620 bytes

Patch containing the change.

jenlampton’s picture

Status: Needs review » Fixed

Seems reasonable. Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.