When I have empty text on a view with a table display, and I choose the option to render the empty text within the table, it appears within the table and also below it.

| Comment | File | Size | Author |
|---|---|---|---|
| #2 | eva-empty-text-3111965-2.patch | 458 bytes | joelstein |
| Screen Shot 2020-02-07 at 9.31.36 AM.png | 24.16 KB | joelstein |
Issue fork eva-3111965
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3111965-empty-text
changes, plain diff MR !20
- 3111965-rendering-empty-text
compare
Comments
Comment #2
joelstein commentedHere's a patch which matches a few lines of template code to what's in views-view.html.twig from Drupal core. This seems to do the trick.
I'm not sure if this is related to #3083993: Hide output if empty option.
Comment #3
joelstein commentedComment #4
ahebrank commentedMakes sense to me. I'm really hesitant to mess with the default templates, but I can't imagine a scenario where you'd want both {{ rows }} and {{ empty }} to output. Right?
Comment #8
vitaliyb98 commentedHi, this issue is still relevant. The solution provided in the patch is very close to the core view template, so I believe it's safe. However, for some reason, the {{ pager }} was removed in the patch.
I've submitted a merge request with the fix and also added a functional test.
Comment #9
terry_kolodiy commentedHi!
I've reproduced this issue, and yes, it renders empty text twice because of missing checks.
MR fixes this bug, and the functional test is successful
Thanks for your fix. I'm sure it can be merged
Comment #11
vitaliyb98 commented@terry_kolodiy, thanks for your testing and review. I also fixed the MR conflict.
Merged into 3.1.x