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.

CommentFileSizeAuthor
#1 webform_view_links_swap.patch1.35 KBquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Active » Fixed
FileSize
1.35 KB

Thanks you're quite right. Committed the attached patch to fix the problem.

quicksketch’s picture

Title: Wrong default message for the view field submission links » Issue #1435874: Default texts for view and delete webform submission links are swapped.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.