Invalid placeholder (!page) with string: "View PDF"

Created on 8 March 2024, 9 months ago

Problem/Motivation

Error on loading VIews PDF display:

User warning: Placeholders must begin with one of the following "@", ":" or "%", invalid placeholder (!page) with string: "View PDF" in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 247 of /home/nine/domains/nine.nasw.org/public_html/web/core/lib/Drupal/Component/Render/FormattableMarkup.php)

I think this may be specific to Drupal 10.

Proposed resolution

// $markup = new \Drupal\Component\Render\FormattableMarkup($html, array('!page' => $this->getPage()));
$markup = new \Drupal\Component\Render\FormattableMarkup($html, array('%page' => $this->getPage()));

Also: line 198 of /views_pdf/src/PdfLibrary/FPDI.php)Also line 203 is commented out. Should it be deleted?

//format_string($rendered, array('!page' => $this->getPage())),

Remaining tasks

Merge request enroute.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rclemings

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

Comments & Activities

  • Issue created by @rclemings
  • Status changed to Closed: works as designed 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States rclemings

    The code looks different in the current dev. I can't find a commit that did that. I'll reopen if it's still a problem.

Production build 0.71.5 2024