For some reason at the end of the attached page I see this link text "Subscribe to ", with many repeated CSV button background images (see inserted image)
export button
Never saw this text before in D7. Is this a feature or a bug? If it is a feature, how can I get rid of that text to only see the CSV button (once)?

Comments

ñull created an issue. See original summary.

ñull’s picture

StatusFileSize
new8.31 KB
ñull’s picture

Issue summary: View changes
ñull’s picture

ñull’s picture

Category: Support request » Bug report

Apparently I am not bold enough. Changing to Bug report (may be that gets more attention?).

I found only one reference to "Subscribe to" in the code of this module and that is in tests/src/Functional/ViewsDataExportTest.php. The test depends on this text and apparently it comes from core.

My suggested workaround or may be even fix is, to leave PHP code what it is and to hide the text with CSS:

.csv-feed .feed-icon {
background-image: url(../images/csv.png);
width: 36px;
display: block;
height: 14px;
color: transparent;

}

ñull’s picture

Component: Documentation » Code
ñull’s picture

Status: Active » Needs review
StatusFileSize
new699 bytes

My proposed fix.

jhedstrom’s picture

This text actually comes from the system module's system/templates/feed-icon.html.twig template. We could look into providing our own template here.

Juterpillar’s picture

I believe https://www.drupal.org/node/2973529 has fixed the display issue with the text display in front of a repeated button.

I've attached a patch that adds an export_icon template with the text "Download [type]"

Status: Needs review » Needs work

The last submitted patch, 9: views_data_export-fix-button-text-2992986-9.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

runofthemill’s picture

@ñull

The patch from #7 worked great, except for one thing: I had an XLSX export option, which wasn't covered by the XLS class originally. It was a very simple fix, which I added to your patch here.

(This is my first contribution, sorry if I didn't do it right :/ )

manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new1.52 KB
new2.72 KB

I think #9 is correct, and we should fix the text of the link, since you are not subscribing to anything. This should fix the failing test.

I also think that what @RunOfTheMill was proposing on #11 makes sense, so I've re-factored his patch and included it in this one. The CSS selector is more generic and should works with any type of views data export icons. (verified it locally).

Interdiff is against #9.

jhedstrom’s picture

Status: Needs review » Fixed

This looks good! Thanks all!

Status: Fixed » Closed (fixed)

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