I get this error when I view a node.
/**
* Implements hook_comment().
*/
function file_aliases_comment($a1, $op) {
if ($op == 'view') {
$node = node_load($a1->nid);
$a1->type = $node->type;
if (($ffp = filefield_paths_get_fields($a1, $op)) == FALSE) {
**********************line 17
break;
**********************line 17
}
I changed this to...
**********************line 17
return false;
**********************line 17
...and its working fine so far. Not to familiar with php programming, but was the break; suppose to return from the funtion with a default value of false or continue executing the rest of the code?
Comments
Comment #1
ylavi commentedI experienced this too and the fix above solved my problem.
From my perspective the issue should be defined as follows:
(Nodes without comments displayed OK)
Comment #2
lpalgarvio commented@ #1 incorrect
this happens when you add comments or view comments in a node that has a file or more with FileField, even if File Aliases / File Paths aren't configured.
the way to reproduce the bug:
- enable CCK, FileField, File Aliases, FileField Paths, Comment Upload
- add FileField field to a content type
a)
- create a node of the same content type without a file
- view the node - so far it works fine...
- add a comment or two
- view the node - so far it works fine...
- add a File to the node, view node - returns error :(
b)
- create a node of the same content type with a file
- view the node - so far it works fine...
- add a comment - returns error :(
Comment #3
lpalgarvio commentedchanging line 17 to return false; as suggested above WORKS FINE
please review & patch
Comment #4
lpalgarvio commentedpatch for File Aliases 6.x-1.1, unix unified format
Comment #5
Vc Developer commentedKewl! Excellent job!
Comment #6
kinosura commentedVc Developer, thank you for your help!
Comment #7
Vc Developer commented@kinosura - Your welcome! :)
Comment #8
decipheredThe Drupal 6 version of this module will not be receiving any more support.