Link to translation source newsletter in newsletter editing form is incomplete for subsites.

Joachim_W - June 24, 2009 - 09:53
Project:Simplenews
Version:6.x-1.0-rc6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

On trying to send a translated newsletter from the newsletter node editing form, you are presented with a link to the translation source newsletter. This link is incomplete for Drupal subsites.

Minor modification needed in function simplenews_form_alter in simplenews.module.
$form['simplenews']['#description'] = t('This newsletter issue is part of a translation set. Sending this set is controlled from the <a href="@link">translation source newsletter</a>.', array('@link' => '/node/'. $form['tnid']['#value']));
...is the current code for this link.

Add base_path() to the link and the link works for subsites too:

$form['simplenews']['#description'] = t('This newsletter issue is part of a translation set. Sending this set is controlled from the <a href="@link">translation source newsletter</a>.', array('@link' => base_path() . '/node/'. $form['tnid']['#value']));

 
 

Drupal is a registered trademark of Dries Buytaert.