Problem:
If you using PHP4 with classified ads created CCK views does not display the ad body.

Solution:
In module code line: 1159.

function ed_classified_view($node, $teaser = FALSE, $page = FALSE) {

proper argument list would be:

function ed_classified_view(&$node, $teaser = FALSE, $page = FALSE) {

($node called by reference, because $node is modified inside this function)

It tooks me one and half hour to figure out what's going on, plz submit a patch.

Comments

mcurry’s picture

Status: Active » Fixed

I'm not sure why this is necessary, because I've not tested it with CCK. I thought I was following the Views documentation at the time the views integration was added, so perhaps I missed something. Ah well, live and learn.

I've committed the minor change. Please download and test the next -dev nightly build and let me know if this behaves as expected, and if so, I'll roll an official release.

attb2’s picture

Thanks! I'm tested it with PHP 4.4.10 and Drupal 5.5, and works!
You have right, this site http://api.drupal.org/api/function/hook_view/5 does not mention $node as "pass by reference" argument.

mcurry’s picture

Yeah, the new $node value is returned, so I'm not sure why the parameter needs to be passed by reference in order for it to work with CCK views. Is this due to a bug in CCK Views?

I don't have time to dig in to this, though.

Anyway, good luck!

attb2’s picture

I've submitted a bug report to Views too, but no reply. :-o
http://drupal.org/node/226172

csc4’s picture

I think this might cause errors under PHP 5 as call by reference has been deprecated and other modules are patching to _remove_call by reference (including CCk itself in the past http://drupal.org/node/81599

Anonymous’s picture

Status: Fixed » Closed (fixed)

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