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

CommentFileSizeAuthor
views_data_export_bug_files.zip3.12 KBjohnennew

Comments

tahiticlic’s picture

subscribe, same here

steven jones’s picture

Version: 6.x-2.0-beta3 » 7.x-3.x-dev

Yup, 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.

steven jones’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev

This has been committed to the 7.x branch, it will need backporting to 6.x, where the core issue possibly doesn't exist.

steven jones’s picture

Status: Active » Fixed

Pushed to all branches.

tahiticlic’s picture

Works fine in D7, thanks.

wildfeed’s picture

Same for D6. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

johnennew’s picture

Version: 6.x-3.x-dev » 6.x-2.0-beta4
Status: Closed (fixed) » Active

I'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?

Apfel007’s picture

sub

kpv’s picture

D7-dev
subscribe

steven jones’s picture

Status: Active » Closed (fixed)

This issue was fixed, if there is a new issue in #8 please open a new issue.