I have two node reference fields in my add/node form and the add and reference popup link appears next to only one of them. Not sure if this is a bug or whether I'm missing something?

Comments

starbow’s picture

Status: Active » Postponed (maintainer needs more info)

I have been unable to replicate this issue.
Can you give me the exact names of the types, and the types of node references.
And please test with RC1 to make sure the issue still exists.
Thanks!

gionnibgud’s picture

Hi i'm having the same issue here. I'm not sure what kind of information to give about this issue.
I also have a case of a content type where i have 2 NR fields and none of them is working. In all content types with only 1 NR field everything is working as expected.

@starbow: Are you asking us for the name of the fields?

This is my case:

From type 'us' i add and reference type 'struttura' which has a field 'field_ref_area' that references type 'area'.

Also from type 'us' i add and reference type 'rapp_strat' which has a field 'field_ref_us' that references type 'us'.

thx

starbow’s picture

are you using select, autocompletes or checkboxes?

gionnibgud’s picture

Hi in both cases the fileds that are not working are autocomplete. If i turn them into a select the fields do work.

starbow’s picture

I am still not able to replicate this issue.
Are you testing with RC1?

gionnibgud’s picture

Hi starbow, forget about the second example. My bad, I was calling the node editing form via popups from the node view interface, not the node edit form, so no autocomplete.js was loaded. It's a complete different issue. Still the first case it was causing me trouble. I managed to get it working by changing one of the autocomplete in a select, the list wasn't too long after all. ;)

In any case this is my setup:

Drupal 6.9
CCK 6.x-2.1
Popups API 6.x-1.x-dev
Add & Reference 6.x-1.0-beta2

btw, I was going through the issues and i read something about having troubles with underscore in node type names. It was a different issue but could it be something like this?

cheers

starbow’s picture

Ok, let me see if I can understand this issue.

You have a note type "us". It has two autocomplete node reference fields, "struttura", which references type "area" and "rapp_strat" which references type "us".

When you look at at the node/add/us, below the struttura field it says "Add new: Area", but below the rapp_strat field, there is nothing.

Is this correct?

ps. The underline bug should already be fixed for the 6.x branch.

gionnibgud’s picture

Hi strabow. My case is actually like this:

I have a note type "us". It has two autocomplete node reference fields, "struttura", which references type "struttura" and "rapp_strat" which references type "us".
In node type us i can see both 'add new ...' links, the popup opens correctly but in the node form inside the popup i can't use the autocomplete:

let's say i'm in type 'us' node form.
I click on add new struttura.
Popups opens struttura node edit form.
In this form ( struttura node edit ) the field 'field_ref_area' references a different type 'area'. This field it should be autocomplete, it look like autocomplete but it doesn't work.

thx

starbow’s picture

@gionnibgub - ok, that is a good bug report, but it is a completely different issue than gondwanan has.
Please create a new issue to report your bug.
Thanks.

andrewsuth’s picture

My error sounds similar so I will post my findings here.

I have 2 node references (autocomplete) but only the first one has an "Add" button below it.

I also get the following error message:
warning: Invalid argument supplied for foreach() in \htdocs\sites\all\modules\popups_reference\popups_reference.module on line 133.

My Content Type setup:
2 x node references (both with autocomplete)
2 x Date (one with just date, the other with date and time)
1 x Fivestar Rating

starbow’s picture

Are you sure you have selected a reference type for the second reference?
Also, are you sure the user has permission to add the type?
This might be a duplicate of #390146: administer nodes permission should allow adding references

starbow’s picture

Go ahead and try RC3 and see if it solves your problem.

andrewsuth’s picture

Hi again,

Firstly, let me tell you how valuable I think your module is - it give me a whole new level of flexibility when designing my complex node relations on my site.

But.. the issue I found is still persisting even after installing RC3.

To answer your questions: yes, both fields were selected as node reference and autocomplete.
This error occurs for both administration and authenticated uses with permission to add or edit these fields.

This error does not occur on the pages where I have just one node reference autocomplete field.

If you need more information to attempt to recreate this error, please ask.

EDIT: I am also getting an error when in Display Fields for this Content Type:
warning: Invalid argument supplied for foreach() in \cck\includes\content.admin.inc on line 595.

I will investigate this first to see if it solves the error I am also getting with foreach() in your module.

RE-EDIT: Issue solved. It was because I had not selected a content type to be referenced for that particular node reference (I think this is what you mentioned in your previous message). It has solved the errors I was receiving - thanks for your help and keep up the great work.

Best Regards,
Andrew

starbow’s picture

Status: Postponed (maintainer needs more info) » Fixed

great.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.