I just upgraded Views from 6.x-2.12 to 6.x-2.16 (It's a recommended security update) and then found that Custom fields no longer work.
Downgrading just the Views module back to 6.x-2.12 made the custom fields work again.
Custom Markup:
------------------------
Nothing is displayed. There is no column for the field in the resultant view (Formatted as a table, have not tested other styles).
Custom PHP:
-------------------
Existing fields display and render correctly.
Newly created fields *do* get a column in the resultant table but the rows are blank.
I tried:<?php print "Hello"; ?> But saw no output
Then I tried setting the field to be rewritten to an arbitrary value of "Hello" and still saw no output.
Comments
Comment #1
hozt commentedI also am having the same problem with custom markup. Nothing is being displayed.
Comment #2
Rev314159 commentedSame issue here. Below is the code I entered in the custom field:
Here is the output in the views preview:
stdClass::__set_state(array('nid' => '16406',etc...
'vid' => 'node_vid', ), )), ))but not the actual data I was usually getting after this.
Comment #3
Lloyd commentedSame here.
Comment #4
pbosmans commentedSame here.
Comment #5
dhakshinait commentedSame problem with 6.x-3.0-rc3
Comment #6
alexgreyhead commentedAlso seeing this issue. Not entirely keen to downgrade but don't have any other option and don't have time to debug. What's changed in Views then I wonder?
Comment #7
Anonymous (not verified) commentedthere was a new checkbox added to Add a Hide Rewriting if field is empty option See the update list here. as soon as I unchecked that, the item was writing properly.
Comment #8
NPC commented@cjamesrun, you are a life-saver, THANK YOU!
Comment #9
druplicate commentedA fix was committed to Views back on November 20th, so you'll have to use the dev version of Views to get it.
http://drupalcode.org/project/views.git/commit/3026160
#1341882: 6.x-2.16 breaks customfield??
Comment #10
dhakshinait commentedi am facing same issue with views 6.x-3.0 after my updation from 6.x-3.0 dev..any solution for it?
Comment #11
Neha Seth commentedI am also facing the same problem. I have unchecked the Hide Rewriting if field is empty field but it still not showing any content.
Please suggest any possible way other than this.... I am using drupal 6.22 and php 5.3
Comment #12
traviscarden commentedAs @cjamesrun pointed out in #7, Views added a feature in the 6.x-2.16 release which, if enabled, necessarily conflicts with Views custom field. It is the new "Do not rewrite if empty" checkbox, which (retroactively) defaults to on! (See #1020540: Add a "Hide Rewriting if field is empty" option.) Since Views custom fields don't come from the database—they just have an empty string placeholder in the query—Views always perceives them as being empty. Thus, if that checkbox is checked on a custom field, it will never display. The immediate solution for site builders is to uncheck that checkbox on all their Views custom fields. The permanent solution would be, if possible, to disable that feature on custom fields in the module or, if not possible, to at least make it default to off. In the meantime, a notice should be added to the Views Custom Field project alerting users to the problem and pointing to this issue.