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.

Comments

robloach’s picture

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

josedazagz’s picture

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.

robloach’s picture

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

josedazagz’s picture

StatusFileSize
new111.64 KB

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

josedazagz’s picture

StatusFileSize
new105.59 KB

Here they are the other screens

josedazagz’s picture

StatusFileSize
new82.02 KB

Here they are the other screenshot

robloach’s picture

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.

josedazagz’s picture

StatusFileSize
new90.15 KB

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.

josedazagz’s picture

StatusFileSize
new78.84 KB

Another screenshot

seanr’s picture

Category: support » bug

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

neclimdul’s picture

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.

jeff h’s picture

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

neclimdul’s picture

@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.

greg.harvey’s picture

StatusFileSize
new7.99 KB

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? =)

Rosamunda’s picture

+1 subscribing

aren cambre’s picture

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.

greg.harvey’s picture

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

darrellduane’s picture

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 ?

darrellduane’s picture

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.

darrellduane’s picture

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.

neclimdul’s picture

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.

darrellduane’s picture

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.

TBarregren’s picture

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.

darrellduane’s picture

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/

neclimdul’s picture

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

darrellduane’s picture

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"

neclimdul’s picture

neclimdul’s picture

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?

neclimdul’s picture

Status: Reviewed & tested by the community » Needs review

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

greg.harvey’s picture

I can confirm this is re-resolved for 6.x-1.0, which was broken for beta4 as noted above. Can't confirm 5.x version though. Mind you, you can stop supporting that in about 3 months time. ;-)

pomliane’s picture

Status: Needs review » Closed (won't fix)

This version of Views Bonus Pack is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.