We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52275
    • 3 Posts
    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!
      • 52275
      • 3 Posts
      Any ideas?
        • 38783
        • 571 Posts
        Did you clear the cache from the MODX Manager? If you did it might be worth deleting the contents of the cache via FTP as the Manager does not always completely clear it.

        And it would also be good to clear the web browsers own cache.
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 52275
          • 3 Posts
          Quote from: andytough at May 20, 2016, 08:08 AM
          Did you clear the cache from the MODX Manager? If you did it might be worth deleting the contents of the cache via FTP as the Manager does not always completely clear it.

          And it would also be good to clear the web browsers own cache.
          Yes, I did these two things.
            • 38783
            • 571 Posts
            I am sure you have done everything correctly but it is always worth double checking that you have got the new paths correct in:
            /config.core.php
            /connectors/config.core.php
            /manager/config.core.php

            Re-running Setup has helped me with a few peculiar problems as well.

            https://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server
              If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

              email: [email protected] | website: https://andytough.com