Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 569467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:17:53+00:00 2026-05-13T13:17:53+00:00

I could’ve sworn I’ve done the tutorial correctly, but I am getting an error

  • 0

I could’ve sworn I’ve done the tutorial correctly, but I am getting an error message and my aros_acos table is empty.

What I’ve already done:

  1. On this page: http://book.cakephp.org/view/646/Creating-ACOs
    I’ve run “cake acl create aco root controllers” and it returned “New Aco ‘controllers’ created.”. I’ve also added “$this->Auth->actionPath = ‘controllers/’;” to the beforeFilter() of AppsController. I do not understand the other piece of code since it is badly explained where it should go — what exactly does it mean by “using the AclComponent”?

  2. I’ve run the build_acl() from this page: http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs
    It has populated my ‘acos’ table with 46 entries.

  3. This is the page where I believe the issues lies: http://book.cakephp.org/view/648/Setting-up-permissions I copied the code found on the page into my apps_controller.php and ammended it slightly to point to the ids of the groups I’m using:

    function initDB() {
    $group =& $this->User->Group;

    //Allow admins to everything
    $group->id = 5;
    $this->Acl->allow($group, 'controllers');
    
    //allow managers to posts and widgets
    $group->id = 6;
    $this->Acl->deny($group, 'controllers');
    $this->Acl->allow($group, 'controllers/Posts');
    $this->Acl->allow($group, 'controllers/Widgets');
    
    //allow users to only add and edit on posts and widgets
    $group->id = 7;
    $this->Acl->deny($group, 'controllers');
    $this->Acl->allow($group, 'controllers/Posts/add');
    $this->Acl->allow($group, 'controllers/Posts/edit');
    $this->Acl->allow($group, 'controllers/Widgets/add');
    $this->Acl->allow($group, 'controllers/Widgets/edit');
    

    }

I’ve also taken all references to allowedActions from my users and groups controllers, and added the correct code to my posts, widgets and AppController pages…

When running the initDB() inside AppController by visiting http://localhost/basic_cake2/groups/initDB I get a warning message on the top of my screen. It says:

DbAcl::allow() – Invalid node
[CORE/cake/libs/controller/components/acl.php,
line 325]

CONTEXT:

$aro = stdClass stdClass::$id = 5
$aco = “controllers” $actions = “*”
$value = 1 $perms = false
$permKeys = array( “_create”,
“_read”, “_update”, “_delete” )
$save = array()

CODE:

    if ($perms == false) {
        trigger_error(__('DbAcl::allow() -

Invalid node’, true), E_USER_WARNING);

AND ALSO SHOWS:

DbAcl::allow() –
CORE/cake/libs/controller/components/acl.php,
line 325 AclComponent::allow() –
CORE/cake/libs/controller/components/acl.php,
line 101 AppController::initDB() –
APP/app_controller.php, line 23
Object::dispatchMethod() –
CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() –
CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() –
CORE/cake/dispatcher.php, line 194
[main] – APP/webroot/index.php, line
88

On checking the aros_acos table I find that nothing has been added!

Therefore the authentication doesn’t work on any pages… 🙁
Does anybody have any ideas? I’ve no idea how to debug this and I asked on #cakephp but they were quite silent in response and basically just told me to re-read the documentation.

EDIT:
Okay, so I read the tutorial a little harder and it turns out I’ve been running the function from the wrong file. I moved it to the Users Controller and it added 3 rows to the aros_acos table.

However, I’m still getting that error message so I think something is still going wrong!

The context for the error message does seem to have changed, which is interesting. It now reads:

$aro = Group

Group::$name = “Group”

Group::$validate = array

Group::$hasMany = array

Group::$actsAs = array

Group::$useDbConfig = “default”

Group::$useTable = “groups”

Group::$displayField = “name”

Group::$id = 6

Group::$data = array

Group::$table = “groups”

Group::$primaryKey = “id”

Group::$_schema = array

Group::$validationErrors = array

Group::$tablePrefix = “”

Group::$alias = “Group”

Group::$tableToModel = array

Group::$logTransactions = false

Group::$transactional = false

Group::$cacheQueries = false

Group::$belongsTo = array

Group::$hasOne = array

Group::$hasAndBelongsToMany = array

Group::$Behaviors = BehaviorCollection object

Group::$whitelist = array

Group::$cacheSources = true

Group::$findQueryType = NULL

Group::$recursive = 1

Group::$order = NULL

Group::$__exists = NULL

Group::$__associationKeys = array

Group::$__associations = array

Group::$__backAssociation = array

Group::$__insertID = NULL

Group::$__numRows = NULL

Group::$__affectedRows = NULL

Group::$_findMethods = array

Group::$_log = NULL

Group::$User = User object

Group::$Aro = Aro object

$aco = “controllers/Posts”

$actions = “*”

$value = 1

$perms = false

$permKeys = array(

“_create”,

“_read”,

“_update”,

“_delete”

)

$save = array()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:17:53+00:00Added an answer on May 13, 2026 at 1:17 pm

    I fixed it. For future reference:

    1. I deleted the contents of all of the tables in order to start from scratch.
    2. I’d been running the initDB() from the wrong file. I correctly moved it to the Users Controller. Running it no longer gave an error message and added the correct entries to aros_acos.

    Fixed!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.