Omega's previous pager link does not have a title attribute. It should say 'Go to previous page', but it is not populated.

To replicate, install Drupal and Omega and hover your mouse over the '< prev' link. You will not see a title.


This is caused by Drupals pager link creation logic only populating the title if the text it receives matches exactly with what it is expecting.

Here is the Drupal core code from includes/pager.inc

$titles = array(
        t('« first') => t('Go to first page'),
        t('‹ previous') => t('Go to previous page'),
        t('next ›') => t('Go to next page'),
        t('last »') => t('Go to last page'),

The problem occurs because Omega overrides the link text of a pager to '< prev', this means no title can be matched.
The Omega code that is causing the issue in omega.theme.inc

 $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('‹ prev')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));

The Fix

Luckily, the fix is simple... we just need to change Omega's previous pager text to what Drupal is expecting: '< previous'. Patch attached. However, it does raise the question of whether this is a limitation of core that should be addressed. However, until that discussion has happened, this fix will have to do =]

pager-title-fix-1.patch1.32 KBedb
Members fund testing for the Drupal project. Drupal Association Learn more


Cellar Door’s picture

Assigned: edb » himerus
Status: Needs review » Patch (to be ported)

Looks straight forward to me - Let's include in 3.1

himerus’s picture

Assigned: himerus » Unassigned
Status: Patch (to be ported) » Fixed

I'd definitely say this is an issue w/core, but this patch has been applied to 7.x-3.x and will be included in the 3.1 release

Status: Fixed » Closed (fixed)

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