laminas-api-tools / api-tools-admin

Laminas API Tools Admin module
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
13 stars 21 forks source link

Routing issue with Admin UI #30

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

I have this REST service routing:

'my_api.rest.myrequest' => array( 'type' => 'Segment', 'options' => array( 'route' => '/:myrequest[/:myrequest_id]', 'defaults' => array( 'controller' => 'MY_API\V1\Rest\MyRequest\Controller', ), ), 'priority' => '-1',

The MyRequest Service works great..

But then the new Apigility UI doesn't work! I get many errors because js is not loading properly: Navigated to http://appfun.localhost:8888/apigility/ui 6a8334db.vendor.js:1 Uncaught SyntaxError: Unexpected token : c22d22af.apigility.js:1 Uncaught SyntaxError: Unexpected token : ui:50 Uncaught ReferenceError: $ is not defined

Any help would be appreciated, I'm out of ideas.


Originally posted by @AprilMedinger at https://github.com/zfcampus/zf-apigility-admin/issues/312

weierophinney commented 4 years ago

Wow, you reported this a long time ago. Have you fixed it? Here's what I'd recommend:

1) You may have a buggy version of the apigility-ui code. Remove your "vendor" folder and run composer install again. Just to be sure. Also, make sure that you're requiring as few modules as possible in the composer.json file - let composer do the work. Finally, double-check that you're running on stable versions and that composer is configured to prefer stable packages. 2) If that doesn't work then disable any customizations you may have made to Apigility (e.g. added functionality) and see if that helps you get into the UI without that error. If the error is gone then the issue might be in something you added or changed in your project (e.g. forced a different jQuery version, or called "jQuery.noConflict", etc). 3) If none of the above helps then this might indeed be an issue with Apigility. In that case: this is the apigility-admin repo which has the code for Apigility's back-end services. Try to report this issue in the zfcampus/apigility-admin-ui project as well (leave a link to this issue) and someone there might help.

Hope this helps and that its not too late :)


Originally posted by @gsomoza at https://github.com/zfcampus/zf-apigility-admin/issues/312#issuecomment-174636940