Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#22 | relation_select-missing-view-path-1307674-22.patch | 525 bytes | thissideup |
Comments
Comment #1
orbistertius CreditAttribution: orbistertius commentedWell, 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,
Comment #2
ben_scott CreditAttribution: ben_scott commentedHi -
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
Comment #3
orbistertius CreditAttribution: orbistertius commentedWith 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).
Comment #4
ben_scott CreditAttribution: ben_scott commentedSorry, that new code was throwing an SQL error when adding rels. I've just committed a fix.
Cheers,
Ben
Comment #5
orbistertius CreditAttribution: orbistertius commentedThanks 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.
Comment #6
klonos...better issue title.
Comment #7
ben_scott CreditAttribution: ben_scott commentedHi -
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
Comment #8
bayousoft CreditAttribution: bayousoft commentedI 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
Comment #9
thissideup CreditAttribution: thissideup commentedI 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?
Comment #10
Soul88Have the same problem as TS.
Comment #11
kclarkson CreditAttribution: kclarkson commentedI am seeing the same error message.
Love the work on the relation movement :)
Comment #12
gUtto CreditAttribution: gUtto commentedMe 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!
Comment #13
anouTo 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...
Comment #14
Gilles_C CreditAttribution: Gilles_C commentedSame problem for me, can't select anything & I have the error on views_ajax().
Comment #15
Gilles_C CreditAttribution: Gilles_C commentedThis patch solved my problem : relationSelectItems[id] is undefined
Comment #16
bmcclure CreditAttribution: bmcclure commentedJust 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
Comment #17
thissideup CreditAttribution: thissideup commentedI 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!
Comment #18
kclarkson CreditAttribution: kclarkson commentedI suggest entity_references and corresponding node references.
Comment #19
ben_scott CreditAttribution: ben_scott commentedHi -
I've applied the patch http://drupal.org/node/1318496#comment-5744594 to the latest dev release.
Cheers,
Ben
Comment #21
thissideup CreditAttribution: thissideup commentedI noticed that this bug still exists. Selecting a node through the selector outputs this error.
Comment #22
thissideup CreditAttribution: thissideup commentedI 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.
Comment #23
steveoliver CreditAttribution: steveoliver commented@thissideup: Have you updated to the latest version of Views 7.x?
Comment #24
thissideup CreditAttribution: thissideup commentednope, I have to confirm that this problem is now a fixed one!
very cool and thanks a very bunch to the commiters!
cheers!
Comment #25
steveoliver CreditAttribution: steveoliver commentedUpdate on the changing font-size issue many noticed: It has been fixed in #1805098: ajax callback breaks theming.