FillPDF parseLink run on non fillpdf links.

Created on 1 January 2025, 17 days ago

Problem/Motivation

Not entirely sure what's going on here but we recently upgraded from D9.5.3 to D9.5.11 and now we are getting this error on any page with a fillpdf link (from a view):

"No FillPDF Form was specified in the query string, so failing."

but also, Views fields which "output field as a link", which define a fillpdf link in the view, those links no longer show up.

The error and the missing link seem to come from FillPdfLinkManipulator::parseLink() which is called from views doing an access check on links (possibly this is new since 9.5.3?). The link check though is triggered by the field being rewritten as a link; but this isnt the link being checked. As a result, there is no $query['fid'] and the exception is thrown.

I added this at the top of that method to ensure i am only testing fillpdf links and this solves the issue:

    if (!isset($query['fid'])) {
      $context['entity_ids'] = [];
      return $context;
    }

I suspect something else going on here that may be core related, but so far this only seems to be an issue with fillpdf links.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

5.1

Component

Code

Created by

🇨🇦Canada liquidcms

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @liquidcms
  • 🇨🇦Canada liquidcms

    Again, i suspect more going on here.. but here is a quick patch with the code above.

  • 🇵🇭Philippines ambot112

    Thank you. Confirmed that the patch is working.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Please put the patch into an issue fork and merge request.

  • 🇨🇦Canada liquidcms

    I could do this (if i can figure out how) but really don't think my patch is fixing the issue in the correct spot. This doing the query test in the parseLink method and it feels like it should be earlier on; like in checkLink().. i'll take a look but still battling other fillpdf issues that have arisen since migrating to 9.5.11.

Production build 0.71.5 2024