Getting a usable CSV output from Drupal 5 Views 1.x - Errors from cookies + error-reporting corrupting output
schedal - November 7, 2009 - 01:49
| Project: | Views Bonus Pack |
| Version: | 5.x-1.2-alpha2 |
| Component: | Views Export |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This link:
http://cvs.drupal.org/viewvc/drupal/contributions/modules/views_bonus/ex...
Says "An Exception Has Occurred
An illegal value was provided for the "view" parameter.
HTTP Response Status
400 Bad Request"
When I access it with my web browser, I hope I don't need to figure out CSV just so I can read the documentation...?
:-(
All I want to do, is figure out where and how I am suposed to use this bonus pack to export a View as a CSV file. This is for Drupal 5.x. I can't seem to find the option where I would imagine it to be;
Thanks!
Sebastian.

#1
A recent infrastructure change was made that prevents project from linking directly to their documentation (!)
#618720: Enable checkout view in Viewvc
We are hoping for this to be repaired. :-(
#2
Oh, well, in the mean time; maybe I can ask for a little help? I installed it, it is enabled in the module list... but now how do I make a view become a CSV file? I can't seem to find the menu/button anywhere... any general help is appreciated. This is an older server: Drupal 5, Views 1.x
Thanks!
#3
If they used to be linked via CVS, the docs will be with the project files themselves. look in the module folder.
I know nothing about this module, but I think it will provide a new 'type' of view alongside 'unformatted', 'list' and 'table' in the view config UI
#4
Ok I found the view option under: Provide Page View [checked], and then View Type: Bonus: CSV File.
I filtered on just node title, body and published, and of the type: product.
When I go to the file it generates, I get the headers just fine, but after that I get an error in the actual CSV file, instead of the data, it reads: [see below]
any idea why this is happening?
I turned paging OFF, and I have it set to display 0 nodes = all nodes per page. All other settings default.
-=-=-=CSV file contents=-=-=-=-
Node: Title,Node: Body
functionfile: linearguments
warning: Cannot modify header information - headers already sent by (output started at /home/hidden/public_html/sites/all/modules/views_bonus/views_bonus_export.module:196) in /home/hidden/public_html/sites/all/modules/ubercartBU/ubercart/contrib/uc_cookie_check/uc_cookie_check.module on line 25.
setcookie/home/hidden/public_html/sites/all/modules/ubercartBU/ubercart/contrib/uc_cookie_check/uc_cookie_check.module: 25cookie_check, 1, 1289333100, /, .hidden.com
uc_cookie_check_form_alter/home/hidden/public_html/includes/form.inc: 365uc_product_add_to_cart_form_233, Array
(
[#base] => uc_product_add_to_cart_form
[nid] => Array
(
[#type] => value
[#value] => 233
)
[qty] => Array
(
[#type] => textfield
[#title] => Quantity
[#default_value] => 1
[#size] => 5
[#maxlength] => 6
)
[submit] => Array
(
[#type] => submit
[#value] => ADD TO CART
[#id] => edit-submit-233
[#attributes] => Array
(
[class] => node-add-to-cart
)
)
[#parameters] => Array
(
[0] => uc_product_add_to_cart_form_233
[1] => stdClass Object
(
[nid] => 233
[vid] => 6044
[type] => product
[status] => 1
[created] => 1192658986
[changed] => 1256853344
[comment] => 0
[promote] => 0
[sticky] => 0
[revision_timestamp] => 1256853344
(...)
-=-=-=-=-
[...and another 4mb of data is shown! which DOES include the title and body, but also all this error/gunk...]
#5
In the above csv file, it also puts in HTML tags, but when I post those, this text editor converts those into actual readable values; but in the CSV it obviously should NOT be putting any HTML in there; but it does... it starts with < table > then < thead > and then < tr > etc...
-=-=-
Oh and BTW, there is NO documentation inside of the module directory, nor in the package I downloaded. I love Drupal, but not having documentation as part of the module's code is a very common grievance of mine. I hope we will all get better at documenting our own work in the time to come.
:-/
#6
#7
Ok I turned OFF "report errors to screen and log" and instead made it "record errors to log ONLY"; which works, but that is a system-wide setting; is there anyway to either fix this issue [no idea what is wrong with the cookies??] or to turn off error reporting for JUST this export?
Thanks!
#8
That error
Cannot modify header information - headers already sentis sorta reflexive. You are getting errors because you are getting errors :-)I imagine it could be fixed by checking the output before setting the cookie - but only somewhere deep in uc or core.
This is beyond me, but does look like something csv output should try to prevent.
Or your view is trying to dump an actual form instead of the values from a form.
The view you have made must be of DATA, not of HTML form fields.
#9
Thanks for the feedback and ideas! I will just work around the issue for now. So unless someone wants to add "error filtering" to the CSV export module of Views-bonus, I'm fine with closing this ticket.
Best,
Seb.
#10