UCRM-plugins
UCRM-plugins copied to clipboard
No route found - UCRM Client Signup
States are missing from the drop down after choosing a country
error in console No route found for "GET /crm/api/v1.0/countries/249/states""
I am also running into this issue, were you able to resolve it?
This is because the route is different between UNMS CRM and the original UCRM
GET /crm/api/v1.0/countries/249/states
would need to be changed to
GET /crm/api/v1.0/countries/states?countryId=249
https://unmscrm.docs.apiary.io/#reference/general/countriesid/get
Because of this, the plugin is not compatible with UNMS CRM
Thanks. We will make a pull request later or perhaps submit a new plugin for review.
On Sat, Feb 15, 2020, 12:23 PM Brandon [email protected] wrote:
This is because the route is different between UNMS CRM and the original UCRM
GET /crm/api/v1.0/countries/249/states
would need to be changed to
GET /crm/api/v1.0/countries/states?countryId=249
https://unmscrm.docs.apiary.io/#reference/general/countriesid/get
Because of this, the plugin is not compatible with UNMS CRM
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ubiquiti-App/UCRM-plugins/issues/161?email_source=notifications&email_token=AAV2E5RXO7YM6CHFJGWY623RDAXJHA5CNFSM4I75BJX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL3TVKQ#issuecomment-586627754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV2E5R2DIBPERT33FNVPT3RDAXJHANCNFSM4I75BJXQ .
I updated that block of code and still get the same error
states: Ember.computed("model.client.countryId", function() { return 249 == this.get("model.client.countryId") || 54 == this.get("model.client.countryId") ? this.get("ajax").post(t.default.APP.host, { data: { frontendKey: t.default.APP.frontendKey, api: { type: "GET", endpoint: "countries/states?countryId=" + this.get("model.client.countryId"), data: {} } } }) : (this.set("model.client.stateId", null), !1) }),
It will need to be updated in the PHP which acts as middleware. The javascript doesn't directly hit that endpoint. @AlanGreyjoy
@charuwts I can't find that anywhere, in any folder.
When I updated that part in the javascript, it updated in console->network tab. But it says No route found for "GET /crm/api/v1.0/countries/states?countryId=249""
GET /crm/api/v1.0/countries/249/states should be GET /crm/api/v1.0/countries/states?countryId=249
They need to update the UCRM API doc as well as its still reflecting the old way.
https://ucrm.docs.apiary.io/#reference/general/countriesidstates/get
Honestly, I rewrote this completely. Ditched ember and used Vue.JS with Vuetify. Now our client signup page is perfect.
Yeah doing the same thing, except ditched plugins as PHP needs to go the way of classic asp. Made a simple Node.js app and wrapped it in a docker container as I needed some sms text messages using AWS and a way to organize the drone 360 views while we are doing client site surveys.
I like the way they exposed the ucms API's but if your going to change them especially something as simple as states leave the old call there or change the endpoint to reflect a new version.
Hey @Andrewiski, the docs are up-to-date, you're just looking in the wrong place. The docs over at https://ucrm.docs.apiary.io/#reference/general/countriesidstates/get are for the legacy UCRM v2. You can find docs for CRM in UNMS v1 at https://unmscrm.docs.apiary.io/#reference/general/countriesstatescountryid/get