wejs / we-plugin-event

We.js plugin with event features
15 stars 3 forks source link

Rooms not populating in dropdown for creating new Session #33

Open SheaBelsky opened 8 years ago

SheaBelsky commented 8 years ago

When creating a new session, rooms are not populated in the dropdown menu based on rooms that have previously been created. The dropdown menu is empty and has no choices to select, even though I have a room created already.

albertosouza commented 8 years ago

Is working here with Firefox and Chrome then i need more information:

albertosouza commented 8 years ago

And check if url /event/:eventId/cfroom?limit=25&responseType=json&name= will return an room list

SheaBelsky commented 8 years ago
  1. Only error I get is bootstrap-datetimepicker.js?v=0.3.0:1477 Uncaught TypeError: option altFieldTimeOnly is not recognized!, but I get that on other pages so I don't think it's related
  2. Google Chrome
  3. When I do that and look at the console in Chrome, it just lists navigations to pages, and not requests for data. Example: Navigated to http://localhost:4000/event/5/admin/cfsession Navigated to http://localhost:4000/event/5/admin/cfsession/3/delete?redirectTo=/event/5/admin/cfsession Navigated to http://localhost:4000/event/5/admin/cfsession Navigated to http://localhost:4000/event/5/admin/cfsession/create?redirectTo=/event/5/admin/cfsession

Where in config.js should enableRequestLog go?

Running /event/:eventId/cfroom?limit=25&responseType=json&name= does return a JSON of rooms, I get this:

{"cfroom":[{"picture":[{"linkPermanent":"/api/v1/image/6","id":6,"label":null,"description":"Bailey Hall","name":"1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg","size":181819,"encoding":"7bit","active":true,"originalname":"BaileyHall-02.jpg","mime":"image/jpeg","extension":null,"width":"880","height":"570","createdAt":"2016-04-13T19:24:01.000Z","updatedAt":"2016-04-13T19:24:01.000Z","creatorId":1,"urls":{"original":"http://localhost:4000/api/v1/image/original/1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg","thumbnail":"http://localhost:4000/api/v1/image/thumbnail/1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg","mini":"http://localhost:4000/api/v1/image/mini/1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg","medium":"http://localhost:4000/api/v1/image/medium/1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg","large":"http://localhost:4000/api/v1/image/large/1460575441106_46da4b20-01ad-11e6-a23c-33dacd9a4784.jpg"}}],"linkPermanent":"/event/2/cfroom","id":2,"eventId":5,"name":"Bailey Hall","about":"Bailey Auditorium","vacancy":1300,"createdAt":"2016-04-13T19:36:06.000Z","updatedAt":"2016-04-13T19:36:06.000Z"}],"meta":{"cfRegistrationCount":0,"cfcontactCount":0,"count":1}}

SheaBelsky commented 8 years ago

Whenever I load the JSON with /event/:eventId/cfroom?limit=25&responseType=json&name=, I get this error:

2016-04-14T14:02:36.138Z - warn: Invalid or undefined argument: 2 { name: ':cfroomId', i: 4 } > undefined 1 cfroom.findOne

SheaBelsky commented 8 years ago

An additional error...But attempting to delete a session from /event/:eventID/admin/cfsession/5/edit gives me this error in console:

Unhandled rejection TypeError: Cannot read property 'title' of null at Object.adminCfSessionFindOne (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-plugin-event\lib\setBreadcrumbs.js:358:66) at Object.metatagMiddleware [as middleware] (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\breadcrumb.js:24:82) at Array.runBreadcrumbMiddleware (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\index.js:45:25) at runHookFunctions (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:59:15) at afterRunHookFN (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:66:7) at Object.defaultMiddleware [as default] (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\metatag.js:52:7) at Object.metatagMiddleware [as middleware] (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\metatag.js:33:46) at Array.runMetatagMiddleware (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\index.js:40:22) at runHookFunctions (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:59:15) at afterRunHookFN (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:66:7) at Object.recordField (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\title.js:28:7) at Object.titleMiddleware [as middleware] (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\title.js:10:72) at Array.runTitleMiddleware (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\index.js:35:20) at runHookFunctions (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:59:15) at HooksPrototype.weTriggerEvent (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\simple-hooks-callback\lib\index.js:52:3) at Object.contextLoaded (C:\Users\sheab\Documents\scioly\Ezra\we-project-events-ezra2\node_modules\we-core\lib\Router\index.js:653:14)

I can delete the session normally when I'm on event/:eventID/admin/cfsession, however

albertosouza commented 8 years ago

Thanks, i'll check

albertosouza commented 8 years ago

@SHBelsky enableRequestLog should be added as one attr in your project config/local.js file.

enableRequestLog: true

albertosouza commented 8 years ago

@SHBelsky The altFieldTimeOnly error may be version erros in we-core and we-plugin-form an update may solve this problem

And for room session search bug, try to use the add manager search to search for someone like admin Url: http://localhost:4000/event/:eventId/admin/managers and see if it will return one user

SheaBelsky commented 8 years ago

The only person who comes up is the default Administrator. I can also search for the Administrator when attempting to add a new event manager.

albertosouza commented 8 years ago

@SHBelsky you have others users created and active in you system right?

This search, search for users with query: displayName (contains), fullName (contains), email (equal)

SheaBelsky commented 8 years ago

I haven't been able to register new users because of the bug I informed you of before. When trying to register a new user, I get this:

ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect integer value: 'on' for column 'acceptTerms' at row 1

Was that issue fixed? I haven't downloaded the newest versions yet, so I'm not sure.

albertosouza commented 8 years ago

Yes, i changed the default browser value to "true" that are changed to true (boolean) in We.js body parser

Please, update your project modules and test For update you may use npm update , npm-check-updates or run the events generator in paren folder

albertosouza commented 8 years ago

But i think if user search is working and rooms search not, may be permission configuration but ... i will check this ...

albertosouza commented 8 years ago

nvn, i did some tests and dont are permissions. i will need more information to replicate and fix this problem