Help please, I have made several facilities and follows the same mistakes.
The calendar does not show availability and clicking on a date shows us a ajax error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Follows Debbuginn information.
path:
/ hotel3 /? q = admin / rooms / units / unit / 1 / event / -2 / 1418688000/1418688000
StatusText: Internal Server Error
Response Text:
Also shows the availability of prices as this in the attached figures.
I have installed the following modules:
commerce 7.x-1.10
Commerce Cart Expiration 7.x-1.1
Rules 7.x-2.7
Date 7.x-2.8
Variable 7.x-2.5
Address Field 7.x-1.0-beta5
Entity Reference 7.x-1.1
Chaos tools 7.x-1.5
Entity API 7.x-1.5
Libraries 7.x-2.2

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plopesc’s picture

Status: Active » Postponed (maintainer needs more info)

Hello @dialn
I was trying to reproduce your bug without luck for now. Could you review the Drupal log page and the Apache logs in order to get more detailed information about the bug?

Thank you so much.

dialn’s picture

thanks for replying
I am using PHP Version 5.3.8 with the following values:
max_execution_time 44000
max_file_uploads 20
max_input_nesting_level 64
max_input_time -1
memory_limit 1024M 1024M
post_max_size 500M 500M

- Apache 2.2.21
- MySQL 5.5.18
- PHP 5.3.8
- phpMyAdmin 3.4.8
- Go-Pear 1.1.6
- msmtp 1.4.25
- eAccelerator 1.0-snv427
- APC 3.1.9
- OpenSSL 1.0.0e

mariusm’s picture

Erorr on Update Unit Availability
Display only current month

WAMP 2.2
PHP 5.3.13
MYSQL 5.5.24

scalas89’s picture

Hello @mariusm - I think that it's a different issue. Feel free to open a new node issue, thanks!

@dialn - You can try to inspect availability json. Go to "your_site_name/?q=rooms/units/unit/1/availability/json/2015/3". If it's all ok you should the availability json.

dialn’s picture

I changed my server for one more updated and the problem was solved, thanks for your support

ronald_istos’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

k7creative’s picture

Hi I'm having this same problem. How did you solve it? What about your server did you change? Thanks so much for the help!

sahaj’s picture

Also getting some issue with Rooms 1.10 and no color/label about availability.

This is on my local MAMP server (PHP 5.5.18). Do not see any error message in the consol.

Any idea what is wrong? Thanks for help.

ronald_istos’s picture

Is BAT API 1.0 installed and active?

sahaj’s picture

Yes, here is my services export:

$endpoint = new stdClass();
$endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
$endpoint->api_version = 3;
$endpoint->name = 'bat_api';
$endpoint->server = 'rest_server';
$endpoint->path = 'bat/v1';
$endpoint->authentication = array(
  'services' => 'services',
);
$endpoint->server_settings = array(
  'formatters' => array(
    'json' => TRUE,
    'bencode' => FALSE,
    'jsonp' => FALSE,
    'php' => FALSE,
    'xml' => FALSE,
    'yaml' => FALSE,
  ),
  'parsers' => array(
    'application/json' => TRUE,
    'application/vnd.php.serialized' => TRUE,
    'application/x-www-form-urlencoded' => TRUE,
    'application/x-yaml' => TRUE,
    'application/xml' => TRUE,
    'multipart/form-data' => TRUE,
    'text/xml' => TRUE,
  ),
);
$endpoint->resources = array(
  'units' => array(
    'operations' => array(
      'index' => array(
        'enabled' => '1',
      ),
      'update' => array(
        'enabled' => '1',
      ),
    ),
    'actions' => array(
      'add' => array(
        'enabled' => '1',
      ),
    ),
  ),
  'availability' => array(
    'operations' => array(
      'index' => array(
        'enabled' => '1',
      ),
      'update' => array(
        'enabled' => '1',
      ),
    ),
  ),
  'pricing' => array(
    'operations' => array(
      'index' => array(
        'enabled' => '1',
      ),
      'update' => array(
        'enabled' => '1',
      ),
    ),
  ),
  'booking' => array(
    'operations' => array(
      'index' => array(
        'enabled' => '1',
      ),
    ),
    'actions' => array(
      'add' => array(
        'enabled' => '1',
      ),
    ),
  ),
  'user' => array(
    'actions' => array(
      'login' => array(
        'enabled' => '1',
      ),
      'logout' => array(
        'enabled' => '1',
        'settings' => array(
          'services' => array(
            'resource_api_version' => '1.0',
          ),
        ),
      ),
    ),
  ),
);
$endpoint->debug = 0;
ronald_istos’s picture

Open up the bulk availability page in Chrome and under Network you should be able to see what calls to the API are being made. Do you get 404s or 403s? The urls are things like:

/bat/v1/availability&units=1&start_date=2016-2-01&duration=1M

You can even try that directly on your own Drupal install and see what the response is (use a valid unit id)

sahaj’s picture

Thanks for your quick reply, Ronald.

Not sure if this screenshot is what you asked for, but I see no 404 nor 403 error.

And if I try http://mysite.com/bat/v1/availability&units=1&start_date=2016-2-01&durat..., I'm getting a copy of the spyc github page (second screenshot). Is this normal?

ronald_istos’s picture

No - getting redirected to github when you visit a URL of your own site that is supposed to provide Json data is not normal :-)

You need to check your Services installation - check out the readme for Services and what it says about the rest server:

http://cgit.drupalcode.org/services/tree/README.txt?h=7.x-3.x

sahaj’s picture

Hum.. asking the question, I kind of find an answer..
Just deleted the /libraries/spyc/spyc.php file and now I'm getting my availability information back to the calendars.

Only remain the question about what is this spyc for? Now the status report says that 'The Spyc library could not be found.'

It seems that it is linked with the REST_server module, the Services readme.txt saying:

If you are using the rest server you will need to download the latest version of SPYC:
wget https://raw.github.com/mustangostang/spyc/79f61969f63ee77e0d9460bc254a27... -O servers/rest_server/lib/spyc.php

Once downloaded you need to add spyc.php to the rest_server/lib folder which exists under
the location you have installed services in.

So, I guess that I added that spyc.php file in the wrong place, but it I move it to /modules/services/servers/rest_server/lib/spyc.php, then the status report still says that 'The Spyc library could not be found.'

Not very clear to me.. Any idea what I'm doing wrong?

sahaj’s picture

Well, this is a bit confusing topic and of course related with the Services module. While googling it, I find many issues about spyc.php where it was advised to put the file into /libraries/spyc.. Which was causing my issue.

However, according to https://www.drupal.org/node/1864308 it seems to me that it should work if spyc.php is placed in /modules/services/servers/rest_server/lib/, even if as stated there 'it is not pretty' and if the status report says that 'The Spyc library could not be found.'

On my side, I don't see any other error. Can you please confirme that /modules/services/servers/rest_server/lib/ is a correct place to put spyc.php?

Thanks for all.

ximx’s picture

I couldn't see availability or pricing in calendar that depends on colorbox and it has been solved with this solution. Now, the status report says that the spyc library could not be found. I don't know if it's the solution, but it seems that works for the moment. Thank you!

It would be fine if someone could check if it's the right solution.

aken.niels@gmail.com’s picture

Same here, removing Spyc.php worked. Strange... Is there any maintainer that could elaborate? Will to break things in other places?

geefin’s picture

I'm getting the 404 error,

page not found
http://mysite.combat/v1/availability?units=1&start_date=2019-2-01&durati...

I've tried spyc.php in both locations and no joy, is there a config step I'm missing?

jazzitup’s picture

I can also confirm: vanilla installation with all modules and core updated to the most recent version doesn't display availability unless you remove/rename spyc.php from libraries. Any ideas why?