I've created View with two fields with following order:
Node: Nid (default options)
Node: Body (Link path: node/add/something/[nid])
When I'm testing my View, first field appearing as number (that's fine), but second field where is pattern, [nid] is empty.
Any help?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 442768-php-4-references-are-annoying.patch | 660 bytes | merlinofchaos |
Comments
Comment #1
kenorb commentedI think the problem can be related to PHP4 compability.
The same database on my local host is working, and on the server doesn't (where is still PHP4).
I can't upgrade it.
Which function is responsible for returning those Replacement patterns?
Comment #2
dawehneryou have to search for
function render_altered and get_render_tokens in handlers/views_handler_field.inc
Comment #3
kenorb commented$this->view->display_handler->get_handlers('field')
returns different values on PHP4 and PHP5
Comment #4
stevekerouac commentedI've just had the same problem here http://drupal.org/node/456240 and upgrading to PHP5 has cured it.
Comment #5
kenorb commentedThanks for pointing that.
Comment #6
kenorb commentedI wondering which PHP report is related to this behaviour.
Possible related bugs:
http://bugs.php.net/bug.php?id=39614
Related PHP4 issues:
#313371: On PHP 4.x evaluation of content type is always FALSE
Comment #7
vitamink commentedAfter hours trying to work out why the replacement patterns don't work in the online version of my site I've finally tracked it down to this issue. As this is caused by a php4 bug is it likely that there will never be a fix or does anyone know of a possible work around that doesn't invovle upgrading PHP versions.
Comment #8
kenorb commentedIf there is some difference between 4 and 5 behaviour (related bug) for specified code, this code can be re-written in other way.
It could be related to wrong reference assignment, some code can give you just value instead of reference.
But I'm not sure which line exactly is responsible for that.
Comment #9
kenorb commentedFor those who have similar problem, but on PHP 5.x, there is very similar issue:
#382852: [Calendar Views] Replacement patterns don't work if referencing a field excluded from display
But in this case I'm definitely sure that's PHP4 issue, because it's working fine on PHP5.
Comment #10
v8powerage commentedI have PHP 5.2.0-8+etch15 and this doesn't works neither for me…
Comment #11
kenorb commentedFor PHP 5.x probably it's something different.
#456240: 'Output this field as a link' ignoring replacement patterns
Comment #12
merlinofchaos commentedOk, spent a few minutes finding this.
I'm pretty sure this will work without breaking anything, but am posting it for testing just to see.
Comment #13
merlinofchaos commentedLooks like I committed this by accident. No one reported any problems!