Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.10
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 May 2010 at 01:53 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerWhat do you mean with "references views"?
I suggest you to update to 2.10 first.
Comment #2
cerup commentedSorry I marked this for the wrong version. I am on 2.10.
However, I narrowed this down to a problem with the date module so i'll close the issue here for the time being.
Comment #3
dkinzer commentedI'm reopening this issue only to see if I can learn the correct way of overriding a handler in views.
I needed to override the 'views_handler_field_file_size' in order to add a custom format (@see img#1). So I defined my own handler and then I tried to override the filesize field default field handler by defining and returning this $data array:
But this cuased a problem with Views, because instead of using my handler for the 'filesize' field, it merged it's default handler with the one I gave into an array. This was causing views to return an error of "warning: class_exists() expects parameter 1 to be a string" (@see img#2).
I ended up creating a new psudo field and using it to accomplish my need:
That work.
But I'm still wondering if I just missed something and there was a way to override the default handler?
Comment #4
dawehnerSo you didn't used hook_views_data_alter. If you want to change something alter is nearly always the better use case
Comment #5
dkinzer commentedThanks!