When setting an alternative template for the header, body or footer for an xml export view, the user interface appears to find the template file and highlight it in the user interface but the export does not use this template when creating the xml file.
If I edit the template files in the module directly (e.g. sites/all/modules/views_data_export/theme/views-data-export-xml-header.tpl.php) then the changes are reflected in the output file
Steps to reproduce:
On a fresh install of drupal 6.20
$ drush dl devel,views,views_data_export,admin_menu
$ drush en devel_generate,views,views_data_export,views_ui,admin_menu
$ drush genc 20 2
import attached view (view.txt) in the interface, give it the name example and press save once loaded
$ drush vde example default test.xml --format=xml
inspect test.xml to see its as expected
copy attached views-data-export-xml-header--example--views-data-export-1.tpl.php to themes/garland
In the interface, check that the theme informaion is picking up this new theme file at admin/build/views/edit/example (rescan the template files and save)
$ drush vde example default test2.xml --format=xml
You should see that test2.xml is the same as test.xml despite using a different header xml file. There should be a tag at the top of the xml
I have tried supplying custom templates of all four template types (views-data-export.tpl.php, views-data-export-xml-header.tpl.php, views-data-export-xml-body.tpl.php, views-data-export-xml-footer.tpl.php) but they are all ignored in favour of the files in the modules own theme directory
| Comment | File | Size | Author |
|---|---|---|---|
| views_data_export_bug_files.zip | 3.12 KB | johnennew |
Comments
Comment #1
tahiticlic commentedsubscribe, same here
Comment #2
steven jones commentedYup, I'm actually doing this on purpose at the moment, because there is a Drupal 7 core bug that prevents the preprocessors from running: #1096770: Includes are not included for template suggestions
I suspect that what we'll do is pop in a slightly ugly fix until that core bug is fixed.
Comment #3
steven jones commentedThis has been committed to the 7.x branch, it will need backporting to 6.x, where the core issue possibly doesn't exist.
Comment #4
steven jones commentedPushed to all branches.
Comment #5
tahiticlic commentedWorks fine in D7, thanks.
Comment #6
wildfeed commentedSame for D6. Thanks!
Comment #8
johnennew commentedI've downloaded both the latest views_data_export-6.x-2.0-beta4.tar.gz and views_data_export-6.x-2.x-dev.tar.gz but cannot get the theme template overrides to work. They are always ignored in favour of the ones in the modules directory. I am following the instructions to reproduce at the top of this issue on a clean version of drupal 6.20.
Can anyone else reproduce or am I missing something to make the theme overrrides work as expected on drupal 6.20 with views 2.12?
Comment #9
Apfel007 commentedsub
Comment #10
kpv commentedD7-dev
subscribe
Comment #11
steven jones commentedThis issue was fixed, if there is a new issue in #8 please open a new issue.