Roomify / bat_drupal

Booking and Availability Management Tools for Drupal 7 and Drupal 8
33 stars 7 forks source link

Default Value in BAT Availability Reference field instance settings does not work #5

Closed istos closed 8 years ago

biokstef commented 8 years ago

Hi Istos, I install bat module in drupal but there is no "BAT Availability Reference field type" for adding a field in unit type bundle. But i checked rooms' submodules and i saw these folders rooms_availability and rooms_availability_reference. We could use the structure and create bat_availability and bat_availability_reference, i guess.

biokstef commented 8 years ago

hi Istos, I found a way to add BAT Availability Reference field type. The field type is BAT Event state reference. But why did you say that Default Value in BAT Availability Reference field instance settings does not work ? I dont get it.

istos commented 8 years ago

Hi - bat has a module called bat_event_reference (which is still under development) that will replace the rooms availability reference field. This issue actually refers to something completely different - sorry about the confusion.

biokstef commented 8 years ago

This is why i can' see the list of rooms in calendar scheduler.

have-created-units list-of-rooms-not-found

But in which file can i put the license code to hide the license warning ?

Thanks

istos commented 8 years ago

Do you have the BAT API module 7.x-2.x installed?

biokstef commented 8 years ago

Yes, i do.

istos commented 8 years ago

Check to see if you get any js errors or 404 when loading that page - looks like for some reason info is not getting to your calendar. Should also add that licensing is definitely not the issue.

biokstef commented 8 years ago

Yes when i inspect element and find js error . error-404-when-inscpecting-element

istos commented 8 years ago

The problem is with the BAT API module and given that you have a 404 it generally means the module is not activated. Make sure you are using version 7.x-2.x and not bat api 1.0

biokstef commented 8 years ago

Thanks, i changed the bat api module version to 7.x-2.x and my list shows up.

list-rooms-show-up

I tried to do an event on a room. Wwhen i choose a state, i got ajax http error choosing-a-state-gets-ajax-error choosing-a-state-gets-ajax-error2

istos commented 8 years ago

BAT is in dev and under active development - your best bet is to get the last code from the roomify/bat_drupa and roomify/bat_api (branch 7.x-2.x) and give it a go. This is an error that is almost certainly showing up because of you are not using the very latest code for both modules.

biokstef commented 8 years ago

ok, i used the lastest version of bat and bat api, i saw no calendar but when i changed the version of bat to drupal version, the calendar showed up. the error http ajax is still there.

istos commented 8 years ago

Best thing is to use a debugger and figure out what is causing that 500 error in the code and add the info here linking to the code in bat or bat_api that is at root of the problem and we can look into it.

biokstef commented 8 years ago

ok there is the screeshot below :

error-ajax-code-500

biokstef commented 8 years ago

Errors :

Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://www.mysite.com/bat/v2/events-calendar?unit_types=1&event_types=disponibilit_des_livres&start=2016-01-20&end=2016-01-21&_=1453313304771

istos commented 8 years ago

Yes - already saw that. No need to repaste. A 500 error in this case is because there was an error in the code and the services module could not build a reply. Your best bet is to step through the code with something like XDebug and figure out what is causing the error that leads to the 500 error.

biokstef commented 8 years ago

hi Istos, I checked reports log of my drupal website and i found the issue. here is a screenshot :

report-event

istos commented 8 years ago

You probably need to start fresh with a clean install of BAT as the Bat Event UI module has changed (it does not even have 400 lines of code anymore) -https://github.com/Roomify/bat_drupal/blob/7.x-1.x/modules/bat_event_ui/bat_event_ui.module

biokstef commented 8 years ago

I will install bat and bat api's git version in other web site.

biokstef commented 8 years ago

After installing bat and bat api's git version, i get the same error.

istos commented 8 years ago

Would really love to help but if you are going to be trying a dev version of a Drupal module you are going to need to be able to do some debugging directly and we are going to need some more information about the error. How can it be the same if that code is not even there...

acrollet commented 8 years ago

@biokstef we will soon (hopefully in 1-2 days) be making a downloadable copy of a drupal installation with a working copy of BAT available. Please keep an eye on https://roomify.us and give that a go.

biokstef commented 8 years ago

ok thanks @acrollet .