Please give me an idea what is going wrong:
Notice: Undefined index: view_path in views_ajax() (line 26 of .../sites/all/modules/views/includes/ajax.inc).
I made everything like you mentioned in your readme.
I do see the search results in the "pop-up" but I do not have the posibility to select one. I am using the las dev version of relation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

orbistertius’s picture

Well, now I changed from dev to last stable version of relation. To make sure there is an ID to relate to I created the node I would like to do the relation from and then edited it to add the relation. Now there is this error.
Fatal error: Call to undefined function relation_endpoints_field_is_empty() in .../modules/field/field.module on line 489 on a blank screen.
Last test will be to change the direction of the relation or to work without the direction.
Thanks for some help...

Regards,

ben_scott’s picture

Status: Needs review » Active

Hi -

I think your two issues are actually two different bugs...

1. It seems the javascript isn't working as it should. Please could you post the relation settings (arity etc.,) & field settings & I'll try & find the problem.

2. The relation module has had some pretty substantial changes in the past couple of weeks, & I'll need to update my module to work with that new stable release. It's top of my list to do - but in the meantime if you roll back to a previous relation release, it should fix that error.

Cheers,

Ben

orbistertius’s picture

With the recent change to the new dev version I do not have access to the content gives an sql error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (!(fde.endpoints_entity_type = 'node' AND fde.endpoints_entity_id = '1'))' at line 1: SELECT fde.endpoints_entity_id AS endpoints_entity_id, fde.endpoints_entity_type AS endpoints_entity_type, fde.endpoints_r_index AS endpoints_r_index, fde.revision_id AS revision_id FROM {field_data_endpoints} fde WHERE (fde.revision_id IN ()) AND (!(fde.endpoints_entity_type = :entity_type AND fde.endpoints_entity_id = :entity_id)) ; Array ( [:entity_type] => node [:entity_id] => 1 ) in relation_select_entity_get_relations() (line 762 of ../sites/all/modules/relation_select/relation_select.module).

ben_scott’s picture

Sorry, that new code was throwing an SQL error when adding rels. I've just committed a fix.

Cheers,

Ben

orbistertius’s picture

Thanks a lot, it is working but brings out an error:
Notice: Undefined index: view_path in views_ajax() (line 26 of /sites/all/modules/views/includes/ajax.inc).
The other thing is something not so urgend but important:
I have not found a way to add two relations with the same search button. My solution is to add the relation_select field as unlimited in values, this do not look nice and I do not think that this was the idea of invention but works out for me.

Thanks again.

klonos’s picture

Title: Ajax Problem » Notice: Undefined index: view_path in views_ajax(), line 26 of /sites/all/modules/views/includes/ajax.inc

...better issue title.

ben_scott’s picture

Hi -

Cheers, I'll look into the view_path notice now...

The number of relations you can choose is dictated by the relation max arity setting - if it's greater than 2, you'll be able to select multiple entities for the relation. Using the field's multiple value setting will create multiple relations, all with one entity endpoint.

Cheers,

Ben

bayousoft’s picture

I get: Notice: Undefined index: view_path in views_ajax() (line 26 of /var/www/example/sites/all/modules/views/includes/ajax.inc). when saving an entity after creating a relation. The relation appears to have been created successfully.

Update: got the error when saving the first relation, but not on the second

thissideup’s picture

Category: support » bug

I have the same problem, but actually only when the form is using other ajax as well. in my case, I have a special content type only for pictures, and the picture field is causing the problem (or rather the combination). so much so, that relation_select is working flawlessly until I upload a picture. then, the error message occurs and the relation is not being submitted. and it gets weirder, I have a custom validation, which should set a form error when the relation is not set, but that is not whining in that case. so $node->relation_select_field is set.

also, when I first upload a picture, the possible relatable nodes are shown, but I cannot choose one. but to underline once more: relation_select works flawlessly until another ajax call occurs. this is also why i changed to bug report.

for debugging:
relation type: non-directional only with endpoints. transitive and an arity of two.
field: max one value, with view (needed for exposed filters (ideas for a date api implementation still highly appreciated ;P))

hope that helps!
alex.

p.s. hitting the search button causes the whole form to change its font. is this intended?

Soul88’s picture

Have the same problem as TS.

kclarkson’s picture

I am seeing the same error message.

Love the work on the relation movement :)

gUtto’s picture

Me having the same issue... and the font size changes too in the viewed page once the search button is pressed
No news yet?

many thanks for your support!

anou’s picture

To add some info to the problem (Undefined index: view_path in views_ajax() line 26...), I've notice that the ajax pager is not functioning either, just got the "blue-loading" icon... So at the end I can't select nothing and have the possibility to see only 5... Changing the default view, not to use pager, didn't change anything for the selection to work...
Thanks for your work on this.
Courage !
Cheers

--edit--
Ok, after disabling Wysiwyg, the relation select worked has desired (still got the Notice : Undefined index: view_path dans views_ajax() (ligne 26 in /sites/all/modules/views/includes/ajax.inc)... Seems that this issue still happening Wysiwyg 7.x-2.1 not compatible

--edit 2--
For the pager, it seems like there is a conflict between the ajax of the pager and imce...

Gilles_C’s picture

Same problem for me, can't select anything & I have the error on views_ajax().

Gilles_C’s picture

This patch solved my problem : relationSelectItems[id] is undefined

bmcclure’s picture

Just a note: This appears to actually be an error with Views...

After applying this patch, the issue went away for me:

http://drupal.org/node/1509712

thissideup’s picture

I confirm that the patch from #15 solved this issue. review needed.

edit:
since this project is obviously not actively maintained (which is very sad and if I'd only had the time...), a little question: is there another project with about the same functionality as this one?

correction!
I confirmed the patch from #15, not #16. Simply updating views to 3.3 does not solve this issue!

kclarkson’s picture

Status: Active » Needs review

I suggest entity_references and corresponding node references.

ben_scott’s picture

Status: Needs review » Fixed

Hi -

I've applied the patch http://drupal.org/node/1318496#comment-5744594 to the latest dev release.

Cheers,

Ben

Status: Fixed » Closed (fixed)

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

thissideup’s picture

Status: Closed (fixed) » Needs work

I noticed that this bug still exists. Selecting a node through the selector outputs this error.

thissideup’s picture

Status: Needs work » Needs review
FileSize
525 bytes

I managed to circumvent the error message by setting the $_REQUEST['views_path'] value in relation_select_ajax().

In said function, the $_REQUEST variable is getting reset with the $_REQUEST[$subform_element_name] sub-value. This then has no views_path, which is obviously faulty.

This patch merely sets the variable (to nothing), so it shouldn't be considered a fix. However it works so far and views and views' ajax is totally way out of my league to debug, so this 'fix' is rather for debugging purposes.

steveoliver’s picture

Status: Needs review » Closed (cannot reproduce)

@thissideup: Have you updated to the latest version of Views 7.x?

thissideup’s picture

Status: Closed (cannot reproduce) » Closed (fixed)

nope, I have to confirm that this problem is now a fixed one!

very cool and thanks a very bunch to the commiters!
cheers!

steveoliver’s picture

Update on the changing font-size issue many noticed: It has been fixed in #1805098: ajax callback breaks theming.