When I click on the "Next" link my page navigation suddenly shows strange characters. See attached image.

Is this a setting I have incorrect somewhere or a bug with the module?

Edited to add: I am seeing this problem in IE 9 (both compatibilty mode and regular mode)

CommentFileSizeAuthor
strangeChars.jpg29.88 KBladybug_3777
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ladybug_3777’s picture

Status: Active » Closed (won't fix)

OK WEIRD! I looked into my /includes/pager.inc file and those strange characters are actually IN there! So it looks like my install of drupal is weird. Take a look at this:

 $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('« first')), 'element' => $element, 'parameters' => $parameters));
  $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('‹ previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
  $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next ›')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
  $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last »')), 'element' => $element, 'parameters' => $parameters));

I'm marking this as "Closed (won't fix)" since it appears to be a problem on my side and not in the brightcove module.

ladybug_3777’s picture

Status: Closed (won't fix) » Needs review

OK, I am reopening this bug report because it isn't an issue in my pager.inc file, it is something that can be fixed in the module. I just happened to open that pager.inc file with eclipse and it didn't properly encode the characters so it made me think they were wrong in core.

After doing more research it looks like the problem is that the iframe/dialog page does not specify encoding. This causes Internet Explorer to render the pager with those weird characters. By specifiying the UTF-8 encoding I am able to fix this IE bug.

(Being a drupal newbie I haven't yet figured out how to do a patch, sorry!) But I found if you edit the brightcove_field.module file like I have below that this error is fixed:

function brightcove_field_deliver_dialog($page) {
  if (is_array($page)) {
    $page = drupal_render($page);
  }
  $output = '<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title></title>' . drupal_get_css() . drupal_get_js() . '</head><body class="dialog">' . $page . '</body></html>';
  print $output;
}

The only thing I did was add the meta tag for the charset UTF-8 after the HEAD tag. This fixed all my problems.

I started to suspect the problem was bigger than the pager when I noticed my single quotes within video titles were also showing strange characters. Stupid IE needed to be told EXACTLY how to encode things or else it freaked out.

ladybug_3777’s picture

Issue summary: View changes

Added more detail

k.dani’s picture

Version: 7.x-3.4 » 7.x-5.x-dev
Issue summary: View changes
Status: Needs review » Closed (fixed)

Thanks for the patch. Changes has been added to the latest dev branch(7.x-5.x). Please note that this will be the only supported version of the module for Drupal 7.

k.dani’s picture

Commit 61b98b1 on 7.x-5.x