I'm not sure why this hasn't been posted as a bug yet, but I found that newly created nodes with file attachments were attempting to add the file content to the index on node_save() but where failing because the node object passed to this module did not have the expected data structure required to add the file contents to the index.

Comments

nrambeck’s picture

StatusFileSize
new712 bytes

The attached patch fixed this issue on my installation by loading the file object using the file ID specified in the node object to load the file data.

lotyrin’s picture

Status: Active » Needs review
mike503’s picture

+1 please. we've put it into our code.

izus’s picture

Assigned: Unassigned » izus

assigning to me for test, review and merge

izus’s picture

Assigned: izus » Unassigned
Status: Needs review » Closed (cannot reproduce)

Hi,
So, i tested and it seems this is not accurate no more.
When creating a new node with a file attached, the $file contains the object, so it is not needed to load it as #1 was trying to do.

Please feel free to reopen again if i misunderstood it.

Thanks

izus’s picture