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.
In class webform_handler_field_submission_link in webform_handler_field_submission_link.inc, in the render method, the text of the link is set to a default if it is provided in the view itself. I don't think this can happen when creating views using the ui, but it certainly can with code-created views. The text for the view and delete cases are swapped.
case 'view':
$text = !empty($this->options['text']) ? $this->options['text'] : t('delete'); // BUG: should be t('view')
$link = l($text, "node/$submission->nid/submission/$submission->sid");
$access = webform_submission_access($node, $submission, 'view');
break;
case 'edit':
$text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
$link = l($text, "node/$submission->nid/submission/$submission->sid/edit");
$access = webform_submission_access($node, $submission, 'edit');
break;
case 'delete':
$text = !empty($this->options['text']) ? $this->options['text'] : t('view'); // BUG: should be t('delete')
$path = drupal_get_path_alias($_GET['q']);
$link = l($text, "node/$submission->nid/submission/$submission->sid/delete", array('query' => array('destination' => $path)));
$access = webform_submission_access($node, $submission, 'delete');
break;
Minor bug, but might catch someone, and trivial to fix.
Comment | File | Size | Author |
---|---|---|---|
#1 | webform_view_links_swap.patch | 1.35 KB | quicksketch |
Comments
Comment #1
quicksketchThanks you're quite right. Committed the attached patch to fix the problem.
Comment #2
quicksketch