zfcampus / zf-apigility-admin

Admin API and UI for Apigility
BSD 3-Clause "New" or "Revised" License
90 stars 64 forks source link

Error during adding a RPC field - ZF3 #371

Open divix1988 opened 7 years ago

divix1988 commented 7 years ago

I have Zend 3 and Apigility 1.4, rwoverdijk/assetmanager 1.7 and I can't create a field to RPC endpoint.

After presing a save on field modal I get message "Field saved" and error:

76d13e21.vendor.js:5 Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: field in vm.rpc.fields, Duplicate key: string:<, Duplicate value: "<"
http://errors.angularjs.org/1.2.30/ngRepeat/dupes?p0=field%20in%20vm.rpc.fields&p1=string%3A%3C&p2=%22%3C%22
    at 76d13e21.vendor.js:3
    at 76d13e21.vendor.js:6
    at Object.d [as fn] (76d13e21.vendor.js:5)
    at k.$digest (76d13e21.vendor.js:5)
    at k.$apply (76d13e21.vendor.js:5)
    at i (76d13e21.vendor.js:4)
    at r (76d13e21.vendor.js:4)
    at XMLHttpRequest.w.onreadystatechange (76d13e21.vendor.js:4) 

Plus the field doesn't appear in list of fields.

EDIT: After further investigations I've added the following components:

composer require zendframework/zend-validator
composer require zendframework/zend-filter
composer require zendframework/zend-inputfilter
composer require zendframework/zend-code

Now the API: http://localhost/zend3/apigility/api/module/ApplicationApi/rpc/ApplicationApi-V1-Rpc-Encryption-Controller/input-filter returns: Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Unable to resolve service "FilterManager" to a factory; are you certain you provided it during configuration?' in D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php:670

EDIT 2: I've added Zend\Filter into modules.config.php file and it started to work.

Seriously guys, can't we require crucial dependecies to Apigility composer? So people like me won't end up in the same configuraction issues? It's a killer for newbies..

weierophinney commented 4 years ago

This repository has been closed and moved to laminas-api-tools/api-tools-admin; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-admin/issues/14.