Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Action "" not allowed on class when using page comments with nested urls build

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 956 Views
  • chris_d
    Avatar
    Community Member
    21 Posts

    Action "" not allowed on class when using page comments with nested urls build Link to this post

    hi,
    I installed the most recent checkout of the nested urls branch, but I'm having problems with the page comments feature.
    If someone submits a comment a popup box appears with Action "" isn't allowed on class.

    Example ->http://www.rustyspigot.com/webmasters/

    I've also been having simliar issues with the forum module.

    Anyone had this too, got any suggestions?
    I've tried installing a blank checkout but I still get the same problem.

    Im presuming that due to nested urls the action part of the url isn't being parsed correctly by RequestHandler.php
    if($this->checkAccessAction($action)) {
       101    if(!$action) {
       102    if(isset($_REQUEST['debug_request'])) Debug::message("Action not set; using default action method name 'index'");
       103    $action = "index";
       104    } else if(!is_string($action)) {
       105    user_error("Non-string method name: " . var_export($action, true), E_USER_ERROR);
       106    }
       107    $result = $this->$action($request);
       108    } else {
       109    return $this->httpError(403, "Action '$action' isn't allowed on class $this->class");
       110    }

    Cheers,
    chris

    956 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.