Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Into function ajax_comments_edit($comment)
link is build like that
$form_build['actions']['cancel'] = array(
'#markup' => '<a class=\'use-ajax\' href="/ajax_comments/edit/cancel/' . $node->nid . '/' . $comment->cid . '">' . t('Cancel') . '</a>',
'#weight' => 21,
);
better used l() to dont get error 404
$form_build['actions']['cancel'] = array(
'#markup' => l(t('Cancel'), 'ajax_comments/edit/cancel/' . $node->nid . '/' . $comment->cid, array('attributes' => array('class' => array('use-ajax')))),
'#weight' => 21,
);
Comment | File | Size | Author |
---|---|---|---|
#1 | ajax_comments-fix_cancel_link-1873778-1.patch | 725 bytes | mstef |
Screen shot 2012-12-25 at 5.20.24 PM.png | 34.8 KB | michael_cristal |
Comments
Comment #1
mstef CreditAttribution: mstef commentedPatch
Comment #2
muschpusch CreditAttribution: muschpusch commentedthanks! committed!