Download & Extend

FIX: spyc library is missing, thus YAML is disabled - put spyc.php in sites/all/libraries/spyc

Project:Services
Version:7.x-3.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

Status report return this msg since I updated to 7.x-3.3 version
I have spyc.php file in rest_server/lib folder

As soon as I confirm this is not my fault I be grateful in working in a path

Thank you

Comments

#1

Status:active» closed (works as designed)

You have to install the libraries module.

Its a required dependency

#2

Status:closed (works as designed)» active

Thanks for reply,
I had already installed

Other Libraries (libraries) Module Enabled 7.x-2.0
Services Services (services) Module Enabled 7.x-3.3

I receive the message with this module versions installed

#3

Project:Services» Libraries API
Version:7.x-3.3» 7.x-2.0

You may have a libraries bug then because we have tests for enabling YAML and they are passing.

#4

I'm having this same issue. Have libraries installed, have services installed, and have spyc.php in the rest_server/lib folder. This is on a relatively new installation with very few modules installed.

#5

It needs to be sites/all/libraries.

#6

I have the same issue. I have put it in sites /all/libraries and servers/rest_server/lib. Still says its missing.

Ok I figured it out you have to put the spyc.php in sites/all/libraries/spyc You need to create the folder spyc. Works after that. The error message in Drupal is wrong! Someone should fix that....

#7

Project:Libraries API» Services
Version:7.x-2.0» 7.x-3.3
Status:active» closed (works as designed)

#8

Title:The spyc library is missing, thus YAML is disabled» FIX: spyc library is missing, thus YAML is disabled - put spyc.php in sites/all/libraries/spyc

The documentation is wrong. The Status Report looks in sites/all/libraries to find the spyc directory.

#9

FWIW I can confirm the approach of placing in sites/all/libraries/spyc works.

If you run:

<?php
print libraries_get_path('spyc');
?>

You'll see the path that the libraries module is looking for. There is a fallback in the module to to look in the servers/rest_server/lib dir if the spyc.php lib is not found in the sites/all/libraries/spyc dir

http://drupalcontrib.org/api/drupal/contributions%21services%21servers%2...

<?php
function _rest_server_get_spyc_location() {
  if (
function_exists('libraries_get_path')) {
   
$libraries_spyc_loc = libraries_get_path('spyc') . '/spyc.php';
    if (
file_exists($libraries_spyc_loc)) {
      return
$libraries_spyc_loc;
    }
  }

 
// Libraries not in use fall back to straight look up.
 
$services_spyc_loc = dirname(__FILE__) . '/lib/spyc.php';
  return
file_exists($services_spyc_loc) ? $services_spyc_loc : false;
}
?>
nobody click here