Closed (won't fix)
Project:
Custom Formatters
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 May 2011 at 18:54 UTC
Updated:
24 Jun 2015 at 14:14 UTC
Jump to comment: Most recent
Comments
Comment #1
clintthayer commentedHey Fehin... any resolution on your end?
Comment #2
fehin commentedNope, I can't find what is wrong.
Comment #3
Korinvall commentedSubscribing
Comment #4
taits commentedSubscribed...
Comment #5
WesleyTx commentedIssue stopped for me after updating to the latest dev.
Comment #6
decipheredMarking as fixed, please re-open if otherwise.
Comment #8
fehin commentedStill having this problem.
Comment #9
decipheredHi fehin,
Apologies for the confusion, I can't see any reason why I marked this as fixed... who knows what I was thinking at the time.
Can you confirm if this formatter is supposed to handle multiple values? If so, it seems to work perfectly for me.
If not, then there is either an issue in the code or a regression error on my behalf (which I'm in the process of trying to confirm). Currently if it's not a multiple values formatter there will be no element children to loop through, the single item will be in #item.
Hope we can get this one sorted.
Cheers,
Deciphered.
Comment #10
tinker commentedI upgraded to 1.6 and all my customer formatters stopped working. I tracked down two problems:
Theme formatter function names seems to have changed.
I noticed this using devel render and it was under: $node['content'][(fieldname)]['field']['items']['theme'].
The stored value, I'm guessing from pre upgrade was (customer formatter is called 'decimal_measurement'):
number_formatter_custom_formatters_decimal_measurementThis did not work and I finally edited the content type setting the 'display fields' values again. Without changing the custom formatter the new theme function stored became:
custom_formatters_formatter_custom_formatters_decimal_measurementThis correctly triggers the formatter.
The custom formatter is no longer chained with the default formatter.
I was comparing $element['#item']['value'] with $element['#item']['view'] to quickly get field suffixes. Now $element['#item']['view'] is no longer there. I have created probably better code that looks up the content field suffix.
Comment #11
decipheredI am no longer supporting any Drupal 6 modules, as such I am marking this as closed.
However, I am open to taking on co-maintainers, if you wish to do so contact me via me D.o contact form.