Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I set up a feed for a View and set the style as CSV File the separator is not there. The data is separated with a space. This happens no matter what I use for a separator.
To help my problem I hardcoded the "," into \views_bonus\export\views-bonus-export-csv.tpl.php but that isn't ideal...
Comment | File | Size | Author |
---|---|---|---|
#13 | views_bonus-export_csv.patch | 576 bytes | amateescu |
#10 | views_bonus_csv_separator.patch | 815 bytes | ahtih |
Comments
Comment #1
chales CreditAttribution: chales commentedI found that the fix for the legacy misspelling issue is the problem. This is in views_bonus_export.theme.inc on line 17.
Change the above to:
Comment #2
dca123 CreditAttribution: dca123 commentedOk. Great! I'll look into this.
Comment #3
mansspams CreditAttribution: mansspams commentedyes, same here, views 3. Template receives separator value NULL.
Comment #4
kiero63 CreditAttribution: kiero63 commentedI have the same issue and the #1 comment solved my problem.
Thanks
Comment #5
WillHall CreditAttribution: WillHall commentedActually - There still seems to be a mistake - they seem to be backwards.
This works for me:
Comment #6
idflood CreditAttribution: idflood commentedsubscribing
edit: Seems it may be better to use the hook_update_N to update each mysql view and totally remove this logic.
Comment #7
idflood CreditAttribution: idflood commentedmaybe we could do something like this ( not tested )
in a new views_bonus_export.install
in views_bonus_export.theme.inc
Comment #8
nicknickoli CreditAttribution: nicknickoli commentedI'm also having this nissue.
Comment #9
nicknickoli CreditAttribution: nicknickoli commentedComment #10
ahtih CreditAttribution: ahtih commentedHere is a patch (against CVS HEAD) implementing a similar fix as #5. It is slightly different, as I think #5 is buggy (it assigns $vars['options']['separator'] to itself, essentially having no effect).
Comment #11
mshepherd CreditAttribution: mshepherd commentedPatch at #10 works well.
Comment #12
WillHall CreditAttribution: WillHall commentedConfirmed: #10 wfm.
Comment #13
amateescu CreditAttribution: amateescu commentedHere is the correct patch for this issue.
The whole point of this code:
is to check for an old option named 'seperator'. But the problem is that it checks for 'separator' instead of 'seperator'.
Comment #14
maksim24 CreditAttribution: maksim24 commentedgood job boys, thans for code
Comment #15
cYu CreditAttribution: cYu commentedAgree with #13. Tested the patch there and it works fine for my old views and new views.
Comment #16
jzornig CreditAttribution: jzornig commentedPatch in #13 worked for me. Thanks.
Comment #17
neclimdul