getObject not getting results although theres information on the table

Hi there, I’ve been trying to debug this issue for a couple hours without results.

I have the following resources on my MODX instance:
image

Those look like this from the manager
image

and If I run this query, it returns what I’m expecting

$result = $this->modx->query("SELECT * FROM modx_site_content WHERE pagetitle='serviceManager'");
      if (!is_object($result)) {
        return 'No result!';
      }
      else {
        $row = $result->fetch(PDO::FETCH_ASSOC);
        echo print_r($row,true);
        //return 'Result:' .print_r($row,true);
      }

This is the result from $row

But if run a simple getObject like this
$this->modx->getObject(modResource::class, ['pagetitle' => 'serviceManager']);

I get a null, even runnint a getCollection won’t show the Login childs

What I’m missing? I know im hitting the rigth DB because the simple query returns the results and also my MODX instance run inside docker with its own DB.

This is kinda driving me crazy and any help is appreciated

In case anyone stumbles with this, I wasn’t aware that the getObject was affected by ACLs, in this case both Login childs were assigned to specific resources Groups, and I wasn’t using a user belonging to any of those groups, so that was the reason for no results

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.