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.

CommentFileSizeAuthor
#5 views_pdf-hide_empty-3247920-5.patch520 bytesrickj

Comments

killes@www.drop.org created an issue. See original summary.

rickj’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide a bit more detail please?

What output layout are you using (i.e. unformatted or table)?

When you say the empty field is rendered, in what sense, do you mean there is empty space which was previously closed, or something else?

Any sample output would be helpful.

Thanks

rickj’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
jkdevsusa’s picture

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?

rickj’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new520 bytes

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
    
rickj’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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