Hi there,
I'm evaluating if using modx for a project. My goal is use modx REST API and use the authoring tools provided by modx.
I created a simple XPOD doodle model and I can handle it via REST using GET|POST|PUT|DELETE /rest/doodles.
After that I started to create a doodle component / model following this tutorial:
http://rtfm.modx.com/revolution/2.x/case-studies-and-tutorials/developing-an-extra-in-modx-revolution/developing-an-extra-in-modx-revolution,-part-ii
I have a doodle menu and a doodle home page. However my grid is empty.
The grid calls /assets/components/doodles/connector.php and I receive a 200 but empty:
{"success":true,"total":"0","results":[]}
My /core/components/doodles/processors/mgr/doodle/getlist.class.php is called but it doesn't load a Doodle collection.
<?php
class DoodleGetListProcessor extends modObjectGetListProcessor {
public $classKey = 'Doodle';
public $languageTopics = array('doodles:default');
public $defaultSortField = 'name';
public $defaultSortDirection = 'ASC';
public $objectType = 'doodles.doodle';
}
return 'DoodleGetListProcessor';
On the other hand my /rest/doodles API return valid results like that:
{"results":[{"id":1,"name":"test","description":"","createdon":null,"createdby":0,"editedon":null,"editedby":0},{"id":2,"name":"test 2","description":"desc desc","createdon":null,"createdby":0,"editedon":null,"editedby":0}],"total":2}
<?php
class ControllerDoodles extends modRestController {
public $classKey = 'Doodle';
public $defaultSortField = 'id';
public $defaultSortDirection = 'ASC';
}
So using modRestController the Doodle model is loaded viceversa I can't loaded it using modObjectGetListProcessor
No logs or errors in core/cache/logs/*
Any idea?
Cheers
Lorenzo