I was getting the error undefined function _services_build_resources() when I tried to set a path for any services views I created. It references line 130 in services_views/includes/views/views_plugin_display_services.inc which is as follows:
module_load_include('resource_build.inc', 'services');
$resources = _services_build_resources();
However, looking at the services module, this include file is in a sub directory at services/includes/services.resource_build.inc. (I thought the module_load_include accepted arguments like this: module_load_include($type, $module, $name = NULL)).
I changed it as such on line 129:
- module_load_include('resource_build.inc', 'services');
+ module_load_include('inc','services','includes/services.resource_build');
Changing the offending module_load_include seems to fix the issue.
Services : 7.x-3.3+31-dev
Services_Views: 7.x-1.0-beta2+10-dev
Views: 7.x-3.5+42-dev
Drupal: 7.20
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Workspace 1_442.png | 129.03 KB | sumeet.pareek |
Comments
Comment #1
ygerasimov commentedI have fixed this bug already. Sorry forgot to push the code.
Comment #3
guypaddock commentedStill seeing this in the latest dev release. Has this been pushed?
Comment #4
guypaddock commentedOkay, it looks like the change to the include path got pushed, but services_views.resource.inc is not in the right place (it's at the root of the module).
Comment #5
guypaddock commentedCorrection: services.resource_build.inc is just plain missing...
Comment #6
ygerasimov commentedI see in latest dev version of the services_views module (line 128 views_plugin_display_services.inc).
services.resource_build.inc file is in includes folder of services module, so I can't see any problem.
Please advise step by step instructions how to reproduce the problem.
Comment #7
sumeet.pareek commented@ygerasimov: I ran into the same issue today and can confirm @GuyPaddock is right in saying that the file services.resource_build is entirely missing. Both from the latest dev version and the latest beta marked. See my attached snapshot for what I have when I download the latest dev version (as updated on 2013-Apr-29)
Comment #8
sumeet.pareek commentedJust in case it helps, I have also checked through all the commits and found that no file by the name services.resource_build.inc was ever added to the repo in any of the commits.
I hope I got the git commands right though.
Comment #9
ygerasimov commentedservices.resource_build.inc file is in services module and not services_views
Comment #10
sapenov commentedI had a problem adding up a new service in my views, resulting in similar error message in popup and nginx error log file.
After looking through the code, I've noticed that the 'includes' directory was not present in my installation of Services module, so I took a liberty to make a slight modification and that fixed the issue for me.
Comment #11
les limThere's a patch over here: #2019891: Ajax http error when adding path field
Marking this as duplicate.
Comment #11.0
les limAdded Drupal Core version.