I can't make reverse direction work on node reference in views fusion widget. I get a fusion with empty column 'using' in views fusion widget.
Here's what I did:
1. Patched nodereference.module (cck 5.x-1.4, Drupal 5.0) with cck_nodereference_views_fusion_47.patch (see http://drupal.org/node/123482)
2. Patched nodereference.module with cck_nodereference_views_fusion_47_2.patch (onto previously patched version)
3. Run update.php
4. Created 'referenced' content type (title field only) and 'referencer' content type (title field and nodereference field to 'referenced'). Added some content of both types. Added table views for both types (Node: Title field only).
5. In views fusion widget I could fuse successfully 'referencer' (primary) with 'referenced' view using "straight" Node Reference. But when I tried to fuse 'referenced' as primary with 'referencer' using Node Reference - reverse direction something goes wrong and views fusion widget reports new fusion with 'using' column empty.
I attached error message (when trying to view referenced table view) concatenated with my nodereference.module contents.
Comment | File | Size | Author |
---|---|---|---|
error_and_nodereference.module_0.txt | 19.23 KB | CentEur |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedComment #2
CentEur CreditAttribution: CentEur commentedComment #3
CentEur CreditAttribution: CentEur commentedI've finally nailed the problem described above. The SQL query generated is broken because for some reason the generated names are cut short. It's 'node_data_field_referencja_rever' instead of 'node_data_field_referencja_reverse'. The bug dissapears when I shorten the reference field name (referencja -> ref1). The bug appeared only in reverse direction fusion, because it's the added '_reverse' that made the generated name too long.
Comment #4
Mac Clemmens CreditAttribution: Mac Clemmens commentedAny idea as to why this happens? I have many fields with long names that are getting cut short... Do you know where I could fix this?
Comment #5
Mac Clemmens CreditAttribution: Mac Clemmens commentedI FIGURED IT OUT! :) Finally. After a miserable morning of trying to diagnose this issue.
I had long field names and tried to create a views fusion. Much to my dismay I got nothing but errors. (Similar to what is described above.) The culprit is in the Database! In the views_fusion table, column "uses" has a varchar length of 32 which is insufficient. Change it to 64 or 128 and it works great. Because "uses" stores the field names, and because field names can be longer than 32 characters, increasing this field size solves the problem.
Comment #6
gnosis CreditAttribution: gnosis commented+1 to solution in #5 - fixed me right up after mind-boggling fusion failure
Comment #7
bneel CreditAttribution: bneel commented+ 1
U are the man
Comment #8
liquidcms CreditAttribution: liquidcms commentednever hurts to check the issue queue.. i posted this same issue and the solution last night.. :)
Comment #9
joachim CreditAttribution: joachim commented+1.
Nice job!
Be nice to see a fix in a new version :)