Hi there!
When I export the view in a doc file, this is the only thing that I get when I opne that file:
Fatal error: Call to undefined method views_bonus_plugin_style_export_doc::sanitize_columns() in ............\sites\all\modules\views\theme\theme.inc on line 288
Rosamunda
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | export.zip | 13.76 KB | anrikun |
| #37 | export-2.zip | 13.84 KB | anrikun |
| #26 | views_bonus-444412-26.patch | 14.72 KB | agileware |
| #22 | export.zip | 19.01 KB | anrikun |
| #14 | view_export.txt | 5.94 KB | kalis1 |
Comments
Comment #1
darthf1 commentedIm getting the same error.
Any more info available?
Comment #2
Rosamunda commentedI´m sorry, but I would like to bump this :)
Comment #3
neclimdulAre you sure this is beta2? I can't come up with any reason it would be trying to call this function.
Comment #4
Rosamunda commentedI´m upgrading views2 now, so I can check if it solves the issue.
Yup, I´ve got beta2 and I´ve tried it with the dev version also.
Comment #5
Rosamunda commentedNope, the error is still there, even after upgrading views.
Comment #6
Rosamunda commentedI´ve tried all over again, within a fresh D.6 install... but the error is still there. And I´ve discovered that appears in the XML export too.
It´s ok with CVS and TXT, but it won´t work in any export if the view has arguments (even when I´ve added the % at the path, it will show up the "%" sign instead the argument number.
If I tried copying the link, paste it at the browser´s bar and replace it by hand, it will work (the file will open) but the original errors (at the first post in this queue) are still there.
Comment #7
neclimdul[453140]
this issue is specifically for the sanitize_columns error.
Comment #8
Rosamunda commentedYes, I´ll open a new bug issue, I just thought I would tell exactly which steps I´ve followed.
Sorry about that, I´ll open a new issue to avoid confusion.
Anyway, the sanitize_columns error is still there.
Comment #9
Rosamunda commentedI´m setting this as active, because it´s not clear what is the extra info that is needed.
Thanks,
Rosamunda
Comment #10
neclimdulYeah, I do have some new questions for you though.
1) Can you attach an export of your view?
2) Are you doing any extra theming or manipulation of any views? Is this on an unchanged core theme?
3) What version of views? and if applicable what version of any modules that might be interacting with views?
I try to set up a identical setup because I can't figure out any possible way to reproduce this. Mainly because that line is part of template_preprocess_views_view_table which has /nothing/ to do with any of the export plugins so something weird is going on.
Comment #11
Rosamunda commentedThanks for your reply! :)
The export route inside the editing views is: listado_del_grupo/%/feeds
The link that appears when I click on the orange feed button is: listado_del_grupo/%25/feeds (the node id is 18).
The file name is view-listado_del_grupo.doc
The only output is:
Fatal error: Call to undefined method views_bonus_plugin_style_export_doc::sanitize_columns() in .../sites/all/modules/views/theme/theme.inc on line 288Yes, I´ve a special theme, but after your question I´ve tried it again with the bluemarine, with the same results.
I´ve installed Views 6.x-2.3. But I´ve tried it with 6.x-2.5 because I thought that maybe was a views issue... with the same result.
Comment #12
Rosamunda commentedI can´t belive this error appeared in only two people. Anyone out there with the same issue?
Comment #13
ananto commentedsame issue here... :(
I am using views 6.x-2.3 and views bonus 6.x-1.0-beta2. Find any solution already ?
Thanks.
Comment #14
kalis1same issue here too, with Views 6.x-2.5 and Views Bonus 6.x-1.x-dev (2009-May-13 version).
I'm attaching the export version and can provide more info if you need...
Thanks
Comment #15
lucidus_neil commentedI'm having the same issue as well although XML and CSV seem to work just fine. DOC give me the sanitize_columns error.
Comment #16
Scolo commentedI have the same error. Any solution?
Comment #17
farald commentedConfirming error and subscribing
Comment #18
darrellduane commentedI am having the same problem. It happens whether my view is of style 'table' or of style 'unformatted'.
I think I've found the issue with the code but I'm not yet clear on how to fix it.
Here's what I see in the code:
class views_bonus_plugin_style_export_doc extends views_bonus_plugin_style_export
class views_bonus_plugin_style_export extends views_plugin_style
however, sanitize_columns() isn't in views_plugin_style, its only in class views_plugin_style_table
As an experiment, I tried changing class views_bonus_plugin_style_export to extend views_plugin_style_table but
then I get the error message : Fatal error: Class 'views_plugin_style_table' not found in ....drupal-6.12\sites\all\modules\views_bonus\export\views_bonus_plugin_style_export.inc on line 13
Also, FYI, there is a typo in views_bonus_plugin_style_export_doc.inc:
Line 54 should read '#title' => t('DOC filename'),
Here are EXPORTS of the two views:
$view = new view;
$view->name = 'student_view';
$view->description = 'View of Students';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'student';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'id' => array(
'label' => 'Student ID',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'id',
'table' => 'student',
'field' => 'id',
'relationship' => 'none',
),
'name' => array(
'label' => 'Name',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'name',
'table' => 'student',
'field' => 'name',
'relationship' => 'none',
),
'email' => array(
'label' => 'Email',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'email',
'table' => 'student',
'field' => 'email',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'name' => array(
'id' => 'name',
'table' => 'student',
'field' => 'name',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'List of Students');
$handler->override_option('header', 'This is a list of students that have been entered into the system. The text here is header text.');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 1);
$handler->override_option('footer', 'This is footer text');
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 0);
$handler->override_option('style_plugin', 'table');
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('sorts', array(
'name' => array(
'order' => 'ASC',
'id' => 'name',
'table' => 'student',
'field' => 'name',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('path', 'studentlist');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'List Students',
'description' => 'List of Students',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler = $view->new_display('page', 'Page', 'page_2');
$handler->override_option('filters', array(
'name' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 1,
'operator' => 'name_op',
'identifier' => 'name',
'label' => 'Student Group: Name',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'name',
'table' => 'student',
'field' => 'name',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('path', 'searchstudents');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Search Students',
'description' => 'Search Students by Name',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->override_option('style_plugin', 'views_doc');
$handler->override_option('style_options', array(
'mission_description' => FALSE,
'description' => '',
));
$handler->override_option('row_plugin', '');
$handler->override_option('path', 'studentreport');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
'page_2' => 0,
));
$handler->override_option('sitename_title', FALSE);
$view = new view;
$view->name = 'test_view2';
$view->description = 'this view won\'t use tables but is for generating a document';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'student';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'email' => array(
'label' => 'Email',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'email',
'table' => 'student',
'field' => 'email',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'name' => array(
'label' => 'Name',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'name',
'table' => 'student',
'field' => 'name',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'id' => array(
'label' => 'Student ID',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'id',
'table' => 'student',
'field' => 'id',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->override_option('style_plugin', 'views_doc');
$handler->override_option('style_options', array(
'mission_description' => FALSE,
'description' => '',
));
$handler->override_option('row_plugin', '');
$handler->override_option('path', 'docfeed');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler->override_option('sitename_title', FALSE);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'docpage');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'doc page',
'description' => 'Document Page',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
Comment #19
Rosamunda commentedbump?
Comment #20
agileware commentedI can confirm this bug. And it is the problem DarrellDuane decsribed in #18.
It is because of this line in views-bonus-export-doc.tpl.php
$table = theme('views_view_table', $view, $nodes, null);
This line means views treats this view as a table view, so it needs the table view functions like you find in views_plugin_style_table.inc
The solution in #18 won't work either because the views_bonus_plugin_style_export class is used by other classes in views_bonus that don't want to extend the class views_plugin_style_table (like views_bonus_plugin_style_export_csv)
One solution might be to move the attach_to function from views_bonus_plugin_style_export into views_bonus_plugin_style_export_doc and then make views_bonus_plugin_style_export_doc extend views_plugin_style_table instead of views_bonus_plugin_style_export.
In theory that would solve the problem. It may not be ideal but I have yet to think of a better way.
I will be looking into a solution for this very soon as I need the functionality to work.
Comment #21
anrikun commentedHi,
I've corrected the bug and also added XLS export but I don't know how to contribute it.
Also, should I correct dev version?
Thanks if you can help me.
Comment #22
anrikun commentedHere's the zip file of the fixed export module (made from 13 may's dev version) with XLS export added.
Also fixed t('CSV filename') and changed seperator to separator.
Sorry, don't know how to create a patch file!
Comment #23
anrikun commentedComment #24
Rosamunda commented+1 for the patched version on #22. It works just fine for me.
Please review it so it can be commited :)
Comment #25
Rosamunda commentedUPDATE: The patched version won´t work with arguments... It shows "page now found".
Still testing...
Comment #26
agileware commentedHere is a patch of anrikun's changes in #22
It applies to 6.x-1.x-dev (2009-May-13). It does not apply to 6.x-1.0-beta2.
Comment #27
agileware commentedThanks for the work anrikun
@Rosamunda:
Have you tried clearing all the caches?
You can fluch all caches with the devel module and also at admin/build/views/tools you can clear the views cache.
I was having problems until I cleared the caches but it seems to be working for me now. Even with arguments & exposed filters being used.
Can you give further information? Maybe attach a text file with the export of a view with arguments that doesn't work?
Comment #28
Rosamunda commentedYup, I´ve cleared all cache and the problem is that there is no file created at all. It just goes to a "page not found".
The argument that I´m using is from OG, to show stuff that only belongs to a certain group.
Comment #29
anrikun commentedThanks for the patch Justin! I need to learn how to make patches by myself now ;-)
To Rosamunda: did arguments use to work before you apply the patch?
AFAIK I haven't changed anything related to arguments...
Comment #30
Rosamunda commentedYup, they worked just fine. Maybe it´s because tit is a block and it is not a page?
I´m sorry for not mentioning this before, now I realize that it could be because of that...?
I´ll try it out with a page equally configured as the block...
Comment #31
neclimdulI'm not going to commit this as is because there are all sort of changes through made. Can we try to narrow down the problem?(add xls is not fixing this problem)
Comment #32
agileware commentedTo me this path contains 3 things:
* The fix for this .doc export bug
* Addition of .xls export
* A minor fix of some of the filename textfield titles
If this patch gets split into these three separate issues would it be committable?
Comment #33
anrikun commentedI don't understand why it cannot been committed as is.
It fixes bugs + adds a new feature. What's bad about that?
Comment #34
agileware commentedGenerally it is considered best practice and easier to follow and test if there is one issue per patch.
Some maintainers don't mind either way and some do.
Comment #35
anrikun commentedBut the export part of views_bonus is a relatively simple module, without a lot of code, so making a patch for every single issue doesn't seem really necessary to me. Maybe then should I only remove the XLS part?
Comment #36
agileware commentedYeah, that's what I was going to suggest initially.
Just have the two issues.
Comment #37
anrikun commentedHere's the new file, without XLS export, made from last dev version (1st july).
Comment #38
anrikun commentedOoops sorry for the previous file. Was buggy.
Comment #39
neclimdulI'm not going to apply this patch or this version of the fix because it breaks things current and future planned features with the parent class. Also, the class is already being used by contrib modules.
Comment #40
neclimdulsimple fix applied to -dev.
Comment #41
bendiy commentedI've created an updated patch for just the export to Excel via the HTML table option mentioned above in #26. Please download and review from Issue #519424.
Comment #42
agileware commented@neclimdul
Re: #39 & #40
Can you be a bit more specific with what has been committed and what hasn't?
The part you say you won't commit in #39 is the part that fixes this issue.
Thanks
Comment #43
neclimdulI just fixed it in a simpler way. The module in #40 removed the parent class and changed some other things as I remember(hard to review since it was not in a patch).