Closed (fixed)
Project:
Forward
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2012 at 14:34 UTC
Updated:
7 Oct 2012 at 19:21 UTC
When other modules try to modify the links by adding an extra class with hook preprocess link, it will break the page because it tries to add an extra array element to a string.
From the api docs for l() function:
If element 'class' is included, it must be an array
Easy fix, in forward_node_view, change
$links['forward_link'] = array(
'title' => $title,
'href' => 'forward',
'html' => $html,
'attributes' => array('title' => variable_get('forward_email_title', t('Forward this page to a friend')), 'class' => 'forward-page'),
'query' => array('path' => $form_state['values']['path']),
);
to
$links['forward_link'] = array(
'title' => $title,
'href' => 'forward',
'html' => $html,
'attributes' => array('title' => variable_get('forward_email_title', t('Forward this page to a friend')), 'class' => array('forward-page')),
'query' => array('path' => $form_state['values']['path']),
);
Marking as critical because it is wrong and totally breaks your site when using other contrib modules that modify the link classes.
Its just a one line change (line 1226) but I would recommend checking other parts of the module for this.
Comments
Comment #1
rv0 commentedmore descriptive title
Comment #2
john.oltman commentedYep, and also lines 1213 and 1217. Just committed fix to 7.x DEV branch. Could you download the DEV build once it completes and let me know if it works with your contrib module. Thanks much.
Comment #3
john.oltman commentedComment #4
john.oltman commentedThis is now included in official release 7.x-1.4