Problem/Motivation

The pdf download link is displayed for anonymous user, however it redirects to an empty page instead of pdf. I noticed that if I manually attach the token from the submission link, then the link works properly.

Steps to reproduce

1. Install webform_entity_print.
2. Add permissions for anonymous users - "Webform submission: Use all print engines"
3. Enable "Allow users to view a submission using a secure token"
4. Submit webform and click "Download PDF" link.

Proposed resolution

Attach a submission token in the function _webform_entity_print_webform_submission_links (webform_entity_print.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tom1899 created an issue. See original summary.

digdanlow’s picture

Assigned: Unassigned » digdanlow
jrockowitz’s picture

Version: 6.0.1 » 8.x-5.x-dev

Can we please also fix this in 8.x-5.x?

digdanlow’s picture

This one is for 6.x.

digdanlow’s picture

This is the same one actually, duplicated.

jrockowitz’s picture

Status: Active » Needs review
FileSize
3.68 KB

Always got to love when the test coverage is more work than the patch.

I am also verifying the token before appending it to the link.

  • jrockowitz authored b0d4cc2 on 8.x-5.x
    Issue #3198932 by digdanlow, jrockowitz: Entity print doesn't work with...

  • jrockowitz authored b0d4cc2 on 6.x
    Issue #3198932 by digdanlow, jrockowitz: Entity print doesn't work with...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

Status: Fixed » Closed (fixed)

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