Hi,

I am getting the following warnings with Drupal 7, Biblio stable or 7.x-1.x-dev:

    Warning: Illegal string offset 'orig_page_info' in theme_biblio_page_number() (line 619 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'page_range_delim' in theme_biblio_page_number() (line 620 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'single_page_prefix' in theme_biblio_page_number() (line 621 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'page_range_prefix' in theme_biblio_page_number() (line 622 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'total_pages_prefix' in theme_biblio_page_number() (line 623 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'single_page_suffix' in theme_biblio_page_number() (line 624 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'page_range_prefix' in theme_biblio_page_number() (line 625 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'total_pages_prefix' in theme_biblio_page_number() (line 626 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).
    Warning: Illegal string offset 'single_page_suffix' in theme_biblio_page_number() (line 627 of /var/www/drupal/7.x_sites/all/modules/biblio/includes/biblio_theme.inc).

I am using Postgresql 9 as backend for this Drupal installation. Currently I disable warnings output, but obviously there is something wrong somewhere...

Cheers, Lars.

Comments

goetz’s picture

I have the same issue as reported before, when I try to use the views that come with Biblio.

How to reproduce:

  • Clean reinstall of Drush 7.39
  • drush dl views token panels ctools
  • drush en views views_ui views_content token panels ctools
  • drush dl biblio
  • drush en biblio biblio_bibtex
  • Create or import some 'biblio' content.

Symptoms: Biblio content is displayed fine on the frontpage.

  • Go to Admin/Structure/Views: Enable biblio_views
  • Symptoms: In the list of views 'biblio_views' is marked as 'in code'. If you click on one of the links, for instance /view/biblio/year, you get a 'not found' error.
  • Click on button 'Edit'. On the page to edit the view click 'Save'.
  • Go back to the list of views at Admin/Structure/Views

Symptoms: In the list of views 'biblio_views' is now marked as 'Database overriding code'. If you click on one of the links, for instance /view/biblio/year, you get the expected view but a long list of warnings of the form: 'Warning: Illegal string offset 'orig_page_info' in theme_biblio_page_number() (line 619 of C:\localPathToDrupal\sites\all\modules\biblio\includes\biblio_theme.inc).

Any hints?

foredoc’s picture

I have the same problem here, any solution yet?

Thanks.

alan d.’s picture

Not sure on the code here: biblio/styles/biblio_style_vancouver.inc, but it looks like a leftover Drupal 6 function in the Drupal 7 code.

      if (!empty($node->biblio_pages))      // pages
        $output .= ". " . theme_biblio_page_number($node->biblio_pages, $markupPatternsArray["endash"], "p. ", "p. ", "", "", "", "", TRUE); // function 'formatPageInfo()' is defined in 'cite.inc.php'
        $output .= ". " . theme('biblio_page_number', array('orig_page_info' => $node->biblio_pages,
                                                     'page_range_delim' => $markupPatternsArray["endash"],
                                                     'single_page_prefix' => "p. ",
                                                     'page_range_prefix' => "p. ",
                                                     'shorten_page_range_end' => TRUE)); // function 'formatPageInfo()' is defined in 'cite.inc.php'

This is the D6 line of code.

$output .= ". " . theme_biblio_page_number($node->biblio_pages, $markupPatternsArray["endash"], "p. ", "p. ", "", "", "", "", TRUE); // function 'formatPageInfo()' is defined in 'cite.inc.php'

Untested patch attached

alan d.’s picture

Status: Active » Needs review

Status: Needs review » Needs work