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

CommentFileSizeAuthor
#7 Workspace 1_442.png129.03 KBsumeet.pareek

Comments

ygerasimov’s picture

Status: Active » Fixed

I have fixed this bug already. Sorry forgot to push the code.

Status: Fixed » Closed (fixed)

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

guypaddock’s picture

Status: Closed (fixed) » Active

Still seeing this in the latest dev release. Has this been pushed?

guypaddock’s picture

Okay, 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).

guypaddock’s picture

Correction: services.resource_build.inc is just plain missing...

ygerasimov’s picture

I see in latest dev version of the services_views module (line 128 views_plugin_display_services.inc).

<?php
        // We build resources from database to bypass cache.
        module_load_include('inc', 'services', 'includes/services.resource_build');
        $resources = _services_build_resources();
?>

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.

sumeet.pareek’s picture

StatusFileSize
new129.03 KB

@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)

sumeet.pareek’s picture

Just 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.

kaka@Shambhu:/tmp/services_views$ git log --diff-filter=A -- services.resource_build
kaka@Shambhu:/tmp/services_views$ git log --diff-filter=A -- *services.resource_build*
kaka@Shambhu:/tmp/services_views$ git log --diff-filter=A -- *services*
commit eb57ba6f100cfe3994a32dd5b85f3bc8f1e03a9b
Author: Yuriy Gerasimov <yuri.gerasimov@gmail.com>
Date:   Wed Jan 2 12:03:46 2013 -0800

    Issue #1857234: Add alter hook to change output of the view results.

commit cdb7da4ff5102684def87d805bfe5006ea620b6f
Author: Pelle Wessman <pelle@kodfabrik.se>
Date:   Tue Apr 12 20:28:52 2011 +0200

    Initial commit of code from dragonwize at http://drupal.org/node/1042766#comment-4027626

ygerasimov’s picture

services.resource_build.inc file is in services module and not services_views

sapenov’s picture

I 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.

// module_load_include('inc', 'services', 'includes/services.resource_build');
module_load_include('inc', 'services', 'services.resource_build');
les lim’s picture

Status: Active » Closed (duplicate)

There's a patch over here: #2019891: Ajax http error when adding path field

Marking this as duplicate.

les lim’s picture

Issue summary: View changes

Added Drupal Core version.