Views Export. Export .csv or .doc file empty

josedazag - August 26, 2007 - 00:06
Project:Views Bonus Pack
Version:5.x-1.x-dev
Component:Views Export
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hello everybody.

I have installed View Bonus Pack module in Drupal 5.2. I have configured permissions for required roles to export views. However, when i create a view to show any data and select csv icon to export them, the resulting file is empty.

Please help me. Perhaps i have forgotten to activate some parameter, or i did not follow something procedure.

I did test views_bonus-5.x-1.2-alpha1.tar.gz and views_bonus-5.x-1.x-dev.tar.gz release.

Sorry by my english. Thanks for any help. This module it is very important for my site.

#1

Rob Loach - August 27, 2007 - 08:34

A few things to troubleshoot: Does your view actually contain any data? What browser are you using (test in Firefox, IE7, Safari)?

#2

josedazag - August 27, 2007 - 15:27

Hello Rob Loach. Thank you by your help.

Yes, my view shows data and contains in this case two nodes of a content type defined by me. I did export data with IExplore 6.0 and Opera 9.21.

#3

Rob Loach - August 27, 2007 - 15:44

If you view the exported view source, do you see the CSV data?

#4

josedazag - August 28, 2007 - 16:18

Hello Rob.

I understand that CSV data exported from view source, I found it in menu item Export of Actions column in Administer views page. However, this source don't contains anything references to my view data, only to page title, url and content type. I have targzipped, titled and attached several screenshots related with view. Perhaps they are of more aid.

Thank you

AttachmentSize
Screenshot-list-view1.jpg 111.64 KB

#5

josedazag - August 28, 2007 - 16:20

Here they are the other screens

AttachmentSize
Screenshot-export-view1.jpg 105.59 KB

#6

josedazag - August 28, 2007 - 16:24

Here they are the other screenshot

AttachmentSize
Screenshot-export-view2.jpg 82.02 KB

#7

Rob Loach - August 28, 2007 - 16:25

Oh, we mean when you look at the view itself, with the CSV or DOC arguments being part of the view, you should be able to see export buttons at the bottom... You should also be able to visit myview/csv to get the CSV file.

#8

josedazag - August 29, 2007 - 15:19

Yes. Previously already it had proven adding CSV or DOC arguments as part of the view. I see export buttons at the bottom. Too i was also be able to visit myview/csv to get the CSV file. However, the downloaded file is empty.

I attach screenshot of my view with argument CSV and default option like Display all values and too empty .csv file. There is not problem with permissions because at time i work with Drupal Administrator User.

AttachmentSize
Screenshot-edit-view-with-argument-csv.jpg 90.15 KB

#9

josedazag - August 29, 2007 - 15:20

Another screenshot

AttachmentSize
Screenshot-data-view-with-button-csv.jpg 78.84 KB

#10

seanr - March 16, 2009 - 19:49
Category:support request» bug report

I've got the same problem. View works fine, click on CSV link and get an empty CSV file.

#11

neclimdul - March 17, 2009 - 07:09

Can you attach an export of your view? I think the original posters problem was they didn't not have fields attached to their view and csv export actually requires there to be fields.

#12

jeff h - March 17, 2009 - 08:09

Weird that you guys commented today after more than a year of silence on this node :)

I have the same thing; my view works, has fields defined and so forth; when I add /csv to my url I get a proper CSV file with all the content.

However, I have added the CSV: CSV File Selector Argument, and chosen "Display all Values" as the Default. All other fields empty. This *sometimes* gives me results (it gave me a good CSV file immediately after I added another field to the view, but I can't replicate this behaviour a second time), but as of now it's not working at all.

For those of you with this problem, perhaps you're just trying to move content forward to a Drupal 6 site... that's what I'm doing, so I would suggest you just use the /csv url to get your data out. Hopefully that's good enough for you as well.

Jeff

#13

neclimdul - March 17, 2009 - 14:57

@jeff h is it possible you could post an export of your view as well? if there's something I can do to fix it I might as well.

#14

greg.harvey - May 26, 2009 - 09:07

Hi,

I'm having similar issues in D6, but it seems related to whether the View requires arguments or not. Seems the Bonus Export stuff does not support arguments? I'll give you my use case. I want to use Views to provide a Word doc version of a node. (I can code it easily enough, so it's no biggy if it doesn't work, but if Views can do this then great!) So I created a view called node_to_word, gave it a feed with a style of DOC and an argument of node ID and asked it to display empty text if no valid nid was provided. Result? Page works fine but attached DOC feed produces an empty document.

View export (Drupal 6, Views 2) is attached, but I would not be surprised if the issue were identical for Drupal 5, Views 1. Perhaps someone can confirm/deny if this is the case? =)

AttachmentSize
sample_word_doc_plus_args_view.txt 7.99 KB

#15

Rosamunda - May 27, 2009 - 19:05

+1 subscribing

#16

Aren Cambre - June 18, 2009 - 15:01

I just reported a similar issue at #495336: XML feeds over Excel uses IE.

Could some of you verify whether this related to your browser? I.e., does loading the CSV produce different results in IE or Firefox? My experience is IE creates missing fields, but Firefox always gets the data.

#17

greg.harvey - June 18, 2009 - 16:15

Definitely *not* browser-related in my case. 99% sure it's just the arg getting dropped, and so blank doc returned.

#18

DarrellDuane - June 29, 2009 - 20:51
Title:Views Export. Export .csv or .doc file empty» Export .doc file download popup box doesn't show up using .tpl files
Version:5.x-1.x-dev» 6.x-1.x-dev

I am not getting a word document file download popup from my browser when I add a template file to the mix for word documents. It happens even when the added template file is an exact copy of the default 'Style output:' template file for the document view. I have copied the file modules/views_bonus/export/views-bonus-export-doc.tpl.php to themes/theme_name/views-bonus-export-doc--view_name.tpl.php

I am using the patched version of views_bonus http://drupal.org/node/444412

One other quirk that I've noticed is that the variables that are available to the template files in
modules/views_bonus/export/*.tpl.php are not available to the templates that are created in themes/theme_name/*.tpl.php such as $themed_rows and $table. Anyone know if there is a way to make these variables accessible to contributed template files for views_bonus ?

#19

DarrellDuane - June 30, 2009 - 14:57

I have tested this problem further and used a different theme (Garland), as well as using CSV file download, and
I get the same blank white screen in my browser if I am overriding the theme's .tpl.php file with exactly the same file.
In this case I copied views-bonus-export-xls.tpl.php to my theme's directory and renamed it to
views-bonus-export-xls--user-list.tpl.php, and rescanned my system for theme files, which found this file.

When I go to view the xls file, it gives me a white screen instead of popping up a user interface to download the xls file.

#20

DarrellDuane - June 30, 2009 - 15:00

Any idea how I'd go about debugging this? I tried with firebug but firebug doesn't seem to pick up on file download popup windows. I did view the HTML from firebug and just saw the beginning and ending tags associated with a page on the white screen.

#21

neclimdul - June 30, 2009 - 20:38
Title:Export .doc file download popup box doesn't show up using .tpl files» Views Export. Export .csv or .doc file empty
Version:6.x-1.x-dev» 5.x-1.x-dev

Please don't steal issues.

#22

DarrellDuane - July 1, 2009 - 18:14

Sorry about that, was trying to avoid creating a new issue. As it turns out, I'm not getting this error at the moment, it seems to have resolved itself.

#23

TBarregren - July 9, 2009 - 22:36

I had the same problem with the 6.x-1.0-beta4. Since it worked with 6.x-1.0-beta1 I rolled it back, and now it works again. Hence, the bug is introduced in beta 2, 3 or 4.

#24

DarrellDuane - July 10, 2009 - 18:34

We have fixed the problem in 6.x views_bonus by hardcoding a:

drupal_set_header('Content-Type: application/msword');

into the beginning of the tpl.php file. It doesn't address the problem, but it fixes it.

We also found a nice tool to debug this problem:

http://livehttpheaders.mozdev.org/

#25

neclimdul - July 16, 2009 - 07:19

This means your preprocess functions aren't running for some reason. Try running update.php after updating the module.

#26

DarrellDuane - September 22, 2009 - 21:28

I found another funny issue related to this one. My DOC files and CSV files were coming up, and they have their header in them, but they weren't showing any data. It turned out that having a VID field at the end of the list of fields to display (which was configured as "Exclude from display") was causing the data not to appear. I'll have to see if I find anything more to the pattern, I don't know if it was just the VID that causes it or just having any field that has "Exclude from display"

#27

neclimdul - October 1, 2009 - 17:26

#28

neclimdul - October 2, 2009 - 17:35
Status:active» reviewed & tested by the community

http://drupal.org/project/cvs/75371 should fix this. Anyone want to make sure it solves it for them?

#29

neclimdul - October 2, 2009 - 17:35
Status:reviewed & tested by the community» needs review

err meant to set it for review when i asked for review....

 
 

Drupal is a registered trademark of Dries Buytaert.