Notice: Undefined index: quantity in tao_views_mini_pager() (line 440 of [...]sites/all/themes/tao/template.php).
I get this error and can't find any documentation about it or any issue in the issue queue.

I tried kpr($vars) in the function tao_views_mini_pager($vars){} and there is no 'quantity' in the $vars, which means the code
$quantity = $vars['quantity'];
quite justly throws an error. I did a quick and dirty fix like this:

if (isset($vars['quantity']) && !empty($vars['quantity'])) {
    $quantity = $vars['quantity'];
  else {
    $quantity = 0;

I'm not very good at the inner workings of Views pager functionality or the TAO theme, so I find myself unable to fix the problem in a proper way. I'm not even sure if it is an important problem. But I'm reporting it as a bug.

(Drupal 7.23 and Views 7.x-3.7)

Members fund testing for the Drupal project. Drupal Association Learn more


haydeniv’s picture

Status: Active » Postponed (maintainer needs more info)

I think this was actually a views bug. Are you still having this issue with the latest version of views?

mxh’s picture

Hi, I have the same problem (using latest Views 7.x-3.7). It always appears when I open a view with a mini pager. The view I use was built with an older version. I will rebuild the view with the current version of Views next time and see if the error is gone. If so, then I guess this is a result from a Views bug.

haydeniv’s picture

Please check against the latest dev release of Views 7.x-3.x.

mariacha1’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active
Related issues: +#1000480: Provide quantity/tags in the pager settings.
721 bytes

I believe that the issue that fixed this is #1000480: Provide quantity/tags in the pager settings.. Unfortunately, that fix actually only works with Full pagers. I'm still seeing the warning if I use mini pagers though.

However, looks like the $pager_middle variable that $quantity helps define is unused in the tao_views_mini_pager function (makes sense, since mini pagers don't really have the idea of a middle). I'm including a patch to strip that unneeded code out.

mariacha1’s picture

Status: Active » Needs review
mariacha1’s picture

Version: 7.x-3.0-beta4 » 7.x-3.x-dev
Status: Needs review » Closed (fixed)

Now that I look at the patch, I see someone fixed the issue entirely in the dev version, making these changes unneccessary (although I still think my solution is better) :).

No need to waste everyone's time. I'm going to set this as fixed, and let maintainers apply the patch if they care to.

mariacha1’s picture

Parent issue: » #2223665: Undefined index
sonicthoughts’s picture

Version: 7.x-3.x-dev » 7.x-3.1
Status: Closed (fixed) » Active

I see this issue is closed, but i just got the error:
Notice: Undefined index: quantity in tao_views_mini_pager() (line 465 of sites/all/themes/tao/template.php).

Using Tao 3.1 and views 3.10
was the patch committed?