Jump to:

1999 Posts in 1408 Topics by 613 members

Form Questions

SilverStripe Forums » Form Questions » Problems using ComplexTableField

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1538 Views
  • gieser
    Avatar
    Community Member
    13 Posts

    Problems using ComplexTableField Link to this post

    Hi guys,
    I want to migrate the webpage of my hockeyclub to Silverstripe. Since we have special subsites for each of our teams, I wanted to write a module to manage them. For displaying and adding I took a ComplexTableField but I can't get it to work properly. I alwas receive the following error: "Action 'Players' isn't allowed on class TeamManagementAdmin" if I try to show/edit a member.
    I've tried to find my error for some days but I just don't have a clue, what I am doing wrong.
    It would be nice if you guys could look through my code and tell me what mistake I have done. I develop under Silverstripe 2.3 rc2

    greetings,
    gieser

  • UncleCheese
    Avatar
    4085 Posts

    Re: Problems using ComplexTableField Link to this post

    Please post all your relevant code.

  • gieser
    Avatar
    Community Member
    13 Posts

    Re: Problems using ComplexTableField Link to this post

    oh man, i'm not very awake today I guess ^^ forgot to attach the code
    TeamManagementAdmin.php: http://pastebin.com/m48dfaa01
    Team.php: http://pastebin.com/d3515c0a3

    Do you need the other files to?
    Btw, is FileAttachment in this forum not working?

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Problems using ComplexTableField Link to this post

    For security reasons SilverStripe only allows certain actions. So you can define an $allowed_actions on TeamManagementAdmin

    static $allowed_actions = array(
    'Players'
    );

  • gieser
    Avatar
    Community Member
    13 Posts

    Re: Problems using ComplexTableField Link to this post

    Thank you,
    but now I get the following error message: I can't handle sub-URLs of a TeamManagementAdmin object.
    What can I do about that?

    greetings, gieser

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Problems using ComplexTableField Link to this post

    Have you resolved the problem? If yes, how?

  • chrclaus
    Avatar
    Community Member
    29 Posts

    Re: Problems using ComplexTableField Link to this post

    Hi gieser,

    did you resolve your issue? I am currently looking for a solution of the same problem. I´m not sure how to handle the actions of the ComplexTableField (e.g. .../trainingschedule/EditForm/field/Training/item/238/edit) correctly. I was looking for special functions like item() oder Training() but I never wrote one of them and did not find anyone.

    I think, there is a little issue in handling the actions but I don´t know where.

    Best regards,
    chrclaus

    1538 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.