Problem: Displaying empty results lists produces "There are no submissions for this form." followed by a "View this form" link that is an absolute URL, therefore breaks if Drupal is installed in a subdirectory.

Fix:

For the two files...
sites/all/modules/webform/views/default_views/webform_submissions.inc
sites/all/modules/webform/views/default_views/webform_results.inc

Replace the line...
$handler->display->display_options['empty']['area_text_custom']['content'] = 'There are no submissions for this form. View this form.';

With the line...
$handler->display->display_options['empty']['area_text_custom']['content'] = t('There are no submissions for this form. View this form.', array('!url' => url('node/')));

CommentFileSizeAuthor
#4 webform-link-2828654-4.patch2.24 KBrenatog

Comments

ses3drupal created an issue. See original summary.

liam morland’s picture

Status: Needs review » Needs work

Can you provide your change as a patch?

renatog’s picture

Assigned: Unassigned » renatog
Status: Needs work » Active
renatog’s picture

Assigned: renatog » Unassigned
Status: Active » Needs review
StatusFileSize
new2.24 KB

Hi @liam-morland and @ses3drupal.

Here is the patch with the fix.

Regards.

  • Liam Morland committed 17a8566 on 7.x-4.x authored by renatog
    Issue #2828654 by renatog, ses3drupal: Links to form in no-results...
liam morland’s picture

Title: webform_submissions.inc produces bad link » Links to form in no-results messages broken
Version: 7.x-4.14 » 7.x-4.x-dev
Status: Needs review » Fixed

Thanks very much.

renatog’s picture

I thank you @liam-morland.

Hugs.

  • Liam Morland committed 17a8566 on 8.x-5.x authored by renatog
    Issue #2828654 by renatog, ses3drupal: Links to form in no-results...
renatog’s picture

Issue tags: +ciandt-contrib

Status: Fixed » Closed (fixed)

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