kswan/super_nodereference — Issue #7: NID not found on first save for certain content types
Author: jared-sp
Created: 2011-11-11 20:05:55+00:00
State: open

Hi,

First thanks for your work on this - it's very helpful and exactly what I was looking for.

I am seeing something similar to "NID:XX not parsed on first save" - however it only appears to be happening for 1 of my content types and it seems like the problems happen prior to parsing. My NIDs are not getting saved upon node creation. I have the latest and greatest super_nodereference code and am using Drupal 6.22. A diff shows that my version of the module is the same as the latest ones on here.

After initial creation, if I re-edit the node and click save without making any changes, the NID is parsed and saved correctly.

I created several new Content Types to test, but everything is working fine for these new content types with the combinations I've tried.

I added some logging to the module and I can see that when this first save problem occurs, super_nodereference_field() receives something like this for $items

Array ( [0] => Array ( [value] => Heather S. [nid:645] [_error_element] => field_project_author][0][value][value ) )

In comparing the db log data of situations where the NID is correctly saved and when it is not, this _error_element seems to be a key difference. When googling, I did see this page (https://github.com/kswan/super_nodereference/pull/1) -but in my situation there is no 'race condition' with assigning references and updating other nodes, so I don't think that's the case with this.

kswan - Do you have any idea what might be causing this _error_element to appear in certain cases when super_nodereference_field() is called? Do you have any advice on debugging from this point? It does seem to be something unique to my content type - but I'm really at a loss and would appreciate any help or guidance.

Thanks,

Jared