Hello!
I have restored my MODX site using backup on another hosting. The site and MODX manager worked fine, but today MODX manager does not show resources list. I have only one resource with id=1 in my site. MODX version 2.4.3
I have tried to use the following snippet:
echo $resourceId.' resId';
$q = $modx->newQuery('modResource', array('show_in_tree' => 0));
$q->orCondition(array('hide_children_in_tree' => 1));
$res = $modx->getCollection('modResource', $q);
foreach ($res as $v) {
$v->set('show_in_tree', 1);
$v->set('hide_children_in_tree', 0);
$v->save();
echo $v->get('id').'';
}
$q = $modx->newQuery('modResource', array('show_in_tree' => 0));
$q->orCondition(array('hide_children_in_tree' => 1));
$res = $modx->getCollection('modResource', $q);
foreach ($res as $v) {
$v->set('show_in_tree', 1);
$v->set('hide_children_in_tree', 0);
$v->save();
echo $v->get('id').' ';
}
But it shows only "1 resId" (current id resource).
If I create new resource then I am able to edit it using link "site.ru/manager/?a=resource/update&id=6", but I am not able edit resource with id=1 using ("site.ru/manager/?a=resource/update&id=1") - shows only manager header and left column.
Also, I've tried to clear cache including core/cache/ folder, but it did not help.
Is it possible to fix it manually using Database or other ways?
Thanks!