5102 Posts in 1520 Topics by 1116 members
|Go to End|
23 September 2010 at 11:18pm Last edited: 23 September 2010 11:58pm
At the moment, I'm trying to program a new backend module. For this purpose, I subclassed LeftAndMain and created several different DataObjects. This all works quite well, except for one issue: I can use simple fields like TextField oder EmailField without any problems, but a ComplexTableField doesn't work. The table field itself is displayed correctly, but when trying to add a new object, a popup is opened and this error message is shown:
[User Error] Uncaught SS_HTTPResponse_Exception: I can't handle sub-URLs of a Form object. GET /admin/my_module/EditForm/field/Paragraphs/add
Line 305 in /srv/www/htdocs/xyz/silverstripe-v2.4.0/sapphire/core/control/RequestHandler.php
I tried to overwrite EditForm() and getEditForm(), but haven't found a solution so far. It would be nice if somebody could give me a hint.
3 April 2011 at 11:33am
Did you have any luck with this? I am having a similar problem.
3 April 2011 at 11:54am
Actually, I managed to resolve this after all - it's a bit of a hack, but it works.
I subclassed TableListField (ComplexTableField in your case), and in my subclass, I created a method Link() that pointed to the url of my custom admin area eg
return Director::absoluteBaseURL() . 'admin/<url of my custom admin>/';
Hopefully this works for you.
|Go to Top|