Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

Action "" not allowed on class when using page comments with nested urls build


Reply

1017 Views

Avatar
chris_d

13 January 2009 at 3:17am (Last edited: 13 January 2009 3:17am), Community Member, 21 Posts

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