Booking rooms from front-end fails with message:

Fatal error: Call to a member function sub() on a non-object in /srv/www/htdocs/Rooms/sites/all/modules/rooms/modules/rooms_booking/includes/rooms_booking.availability_agent.inc on line 43

CommentFileSizeAuthor
#15 rooms-1615408-15.patch1.46 KBmsti

Comments

ronald_istos’s picture

This should be fixed in head, dev and beta3 - let me know if you can test it.

imevilduckie’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta3

I've tested with the beta3 and am still getting the same error.

imevilduckie’s picture

Version: 7.x-1.0-beta3 » 7.x-1.0-beta4

Also still getting the error with beta4.

ronald_istos’s picture

You need to give me some more info - Is this a clean install? have you run an update, are you clearing cache, etc.

Also would you mind visiting admin/rooms/config/bookings and save those settings and see if the error still persists.

If I cannot recreate I can't help I am afraid and right now on a clean Rooms install I can't recreate.

robertomete’s picture

robertomete’s picture

Booked,failed after checkout or trying to remove booked room. But menu shortcart to booking cart works well.Changed booking setting from 1 day advance to same day booking reverted to same error as beta3

ronald_istos’s picture

Seriously - I need more info or I can't help and please avoid cross posting between issues.

What does failed mean? What exactly did you do? What was the error?

Changing the setting to same day booking doesn't create the same error for me.

robertomete’s picture

Issue is resolved by creating a virtual host or using a live server as opposed to localhost. Thanks.

ronald_istos’s picture

Status: Active » Closed (fixed)
ila’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Closed (fixed) » Active

hi same error on a drupal 7.14 installation
and rooms
7.x-1.0-beta4+4-dev
Fatal error: Call to a member function sub() on a non-object in /web/htdocs/www.miosito.com/home/sites/all/modules/rooms/modules/rooms_booking/inclu... on line 43

please help me
thanks

rahul_jc’s picture

Yes , this bug is still there . Can anyone help us with this problem??

axel pressbutton’s picture

Hi, I've just encountered the same issue but knew it was working the other evening. After reviewing all changes I've made to settings etc. I noticed that I only get the error when the "Results presentation style" (/admin/rooms/config/bookings) is set to "Show availability of individual units".

"Show availability on a per-type basis" works fine.

Using Drupal 7.14 & Rooms 7.x-1.0-beta4

The full error was;

Fatal error: Call to a member function sub() on a non-object in
/home/quickstart/websites/drupalrooms.dev/sites/all/modules/rooms/modules/rooms_booking/includes/rooms_booking.availability_agent.inc on line 43 Call Stack: 0.0102 651768 1. {main}()
/home/quickstart/websites/drupalrooms.dev/index.php:0 0.4371 41477000 2. menu_execute_active_handler() /home/quickstart/websites/drupalrooms.dev/index.php:21 0.4372 41478216 3.
call_user_func_array() /home/quickstart/websites/drupalrooms.dev/includes/menu.inc:516 0.4372 41479088 4. rooms_booking_manager_results_page()
/home/quickstart/websites/drupalrooms.dev/includes/menu.inc:0 0.5482 44606328 5. rooms_booking_manager_present_individual_rooms()
/home/quickstart/websites/drupalrooms.dev/sites/all/modules/rooms/modules/rooms_booking_manager/rooms_booking_manager.module:147 0.7359 51583008 6. drupal_get_form()
/home/quickstart/websites/drupalrooms.dev/sites/all/modules/rooms/modules/rooms_booking_manager/rooms_booking_manager.module:240 0.7359 51585008 7. drupal_build_form()
/home/quickstart/websites/drupalrooms.dev/includes/form.inc:131 0.7497 52157824 8. drupal_process_form() /home/quickstart/websites/drupalrooms.dev/includes/form.inc:374 0.7612 52223728 9.
form_execute_handlers() /home/quickstart/websites/drupalrooms.dev/includes/form.inc:854 0.7612 52224240 10. book_unit_form_submit()
/home/quickstart/websites/drupalrooms.dev/includes/form.inc:1443 0.7683 52262776 11. AvailabilityAgent->__construct()
/home/quickstart/websites/drupalrooms.dev/sites/all/modules/rooms/modules/rooms_booking_manager/rooms_booking_manager.module:504
ronald_istos’s picture

Assigned: Unassigned » ronald_istos
Status: Active » Fixed

Pushed a fix to this to head - thanks for raising and apologies for the time to figure this out. Thanks to Axel for figuring out the exact situation that causes the error.

Status: Fixed » Closed (fixed)

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

msti’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.46 KB

please disregard this

msti’s picture

Status: Needs review » Closed (fixed)