On my site, there are times when I run some fairly complicated views outputs... many which I need field overrides so that I can manipulate the data before being sent out.

In the example I'm using... I want to modify some taxonomic data that is going through and list a particular image based on the type. This is not possible using the views GUI and requires using these field template overrides to get at it.

This isn't a huge priority, as I know the maintainers probably have bigger fish to fry. But being able to get the data perfectly altered is important, at least to me.

Comments

allisterbeharry’s picture

Assigned: Unassigned » allisterbeharry

Hello, sorry for taking so long to reply. I've made the changes to allow proper theme overriding using external templates - it was broken before which I didn't realize. Thanks for finding this bug. I plan on making the 2nd beta release tomorrow (Thursday). In the meantime you can pull the latest code from CVS version DRUPAL-6--1 or wait for the packaging scripts to create the latest tarball for the dev version.

allisterbeharry’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta2

Fixed in beta2: http://drupal.org/node/855894 Leaving this open for now in case there are any additional problems

rickmanelius’s picture

Dude, you rock. Thanks for being such a responsive maintainer!

I'm going to test mid week (got a lot of client todo's due tomorrow) and I'll give you feedback once I know it's working.

rickmanelius’s picture

Hey allisterbeharry,

I tried this again with no luck. My views theme menu shows that my views-view-field.tpl.php file is there and selected, but when I change the default action from echo $output to echo "INSERT TEST STRING", it never seems to catch.

I've flushed cache and everything. Am I missing some configuration?

I appreciate any and all assistance! I hard coded a work around before that I'll revert to until this works...

rickmanelius’s picture

If it would be of help, I can provide a dummy/shell view for testing purposes.

allisterbeharry’s picture

StatusFileSize
new7.11 KB

Hello frankrizzo - yes you're right again. Basically I wasn't extending the theming pipeline to cover individual fields. I've committed the changes to CVS and this will be fixed in the next release. The attached patch should apply to the BETA2 release, or just update your checkout copy if you're using CVS or get the most recent -dev release. Thanks (again) for finding this bug.

allisterbeharry’s picture

Category: feature » bug
Status: Active » Needs review
rickmanelius’s picture

Awesome, will test in the next couple of days and get back to you.

Thanks so much for your responsiveness. I know maintaining modules can be a thankless job, so I just want to say how much I appreciate your work!

rickmanelius’s picture

Hey allisterbeharry,

It still seems like this isn't working. When I use views-view-field--audios.tpl.php (my view is audios) simply to try and rewrite all fields, views detects that these overrides exist but doing a simple echo "hello world"; in this field tpl does not fix things.

I could be my local install, so I'm going to test on another box to see if it's just me! Sorry for the long turn around time here. My client has been all over the place these days.

rickmanelius’s picture

Anyone else experiencing the same issue? I can get views to acknowledge (through the GUI) that this template file is being used, but I can't get it to actually use the file... using an echo 'hello world' as an example.

I've flushed all cache and ran all updates. Any pointers would be appreciated!

rhache’s picture

I'm experiencing the same issue, with both the dev and the beta2 release. In the view's theme information, it picks up my override, but it doesn't translate on output.

Thanks,
Rene

rhache’s picture

I just noticed something odd when trying to get field overrides to work.

Putting the field tpl override in my theme directory (after clearing the cache) didn't work. However, I tried rewritting the field, and that point the override started working. Don't ask me why!

Thanks,
Rnee

rickmanelius’s picture

rhache,

When you said 'rewriting the field', what exactly do you mean? Do you mean rewriting the filename? Changing the field in views GUI?

Any help might help me through this as well!

joshuajabbour’s picture

hmm, I'm not having any issues here. I've created a 'views-view-field--title.tpl.php' file, and it is correctly used to output the title field. I've also created more specific template files, and they work too.

All I needed to do was rescan the template files in views. I'm on beta2. Not sure what would be causing this...

rickmanelius’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Needs review » Closed (fixed)

Hey joshuajabbour.

I just updated to the latest development version and this is now working! So I'm closing this issue.

Also, big thanks to allisterbeharry once again. Great module!

austin_drupal’s picture

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

I am having the same problem with the latest dev version 7.x-1.x-dev. Views sees my field template but it is never rendered. Did all these fixes make it into the 7x code base? Following some of the patches here it looks like 7x has the old code not the post patch. Unfortunately not all the fixes in this issue made it into patches on this issue.

austin_drupal’s picture

Created new issue. See [1480884]

rfay’s picture

Status: Closed (fixed) » Needs work

This was a worthy patch. Could we get a release that includes it? It's the only patch since the last release.

bmcginnis’s picture

I second the request for a release including this patch. It's been quite a while since we've had a release.

davidneedham’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs work » Closed (fixed)

There is a patch for this issue unique to 7.x-1.x-dev over at #1480884: views field templates not working.