hide if empty ignored?

Created on 5 November 2021, over 3 years ago
Updated 17 February 2023, over 2 years ago

Hi,

I have a view that renders an invoice as pdf.

On version views_pdf 7.1 some fields that were set as "hide if empty" were not rendered, but using 7.3, they are.

Any suggestions?

Note: there also was a PHP update to 7.4 involved, but I do not see any more errors due to views_pdf in the logs.

🐛 Bug report
Status

Closed: cannot reproduce

Version

3.1

Component

Code

Created by

🇩🇪Germany killes@www.drop.org

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇴Colombia jk_susa_dev

    The same thing is happening to me, in my case the view has an output format of "pdf_unformatted", and basically is that in version 7.x-1.7 the fields had the option enabled to be hidden if they had no value, but with the update to 7.x-3.1, this configuration is not working, because the fields that have no value (null or empty) are generated in the pdf, generating a blank space visually. Any suggestions?

  • 🇬🇧United Kingdom rickj

    Thanks, that's a bit more info.

    I've looked at the code again, and I think I can see where a test for empty data got dropped in 7.3.

    Please try the attached patch and let me know the result.

    • a284ce99 committed on 7.x-3.x
      Issue #3247920: hide-if-empty was being ignored
      
  • 🇬🇧United Kingdom rickj
Production build 0.71.5 2024