We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36083
    • 4 Posts
    http://front.investnchina.com/vip/

    Receiving this error:

    Fatal error: Out of memory (allocated 36438016) (tried to allocate 46 bytes) in /var/www/front/vip/manager/includes/document.parser.class.inc.php on line 1240

    This is the group of code within line 1240:

    1230 $childKey= array_search($childId, $this->documentListing);
    1231 if (!$childKey) {
    1232 $childKey= "$childId";
    1233 }
    1234 $c[$childKey]= $childId;
    1235 }
    1236 }
    1237 $depth--;
    1238 if (is_array($c)) {
    1239 if (is_array($children)) {
    1240 $children= $children + $c;
    1241 } else {
    1242 $children= $c;
    1243 }
    1244 if ($depth) {
    1245 foreach ($c as $child) {
    1246 $children= $children + $this->getChildIds($child, $depth, $children);
    1247 }
    1248 }
    1249 }
    1250 return $children;


    I also get this Parser error within system reports


    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Illegal offset type in isset or empty
    Error type/ Nr.: Warning - 2
    File: /var/www/front/vip/manager/includes/document.parser.class.inc.php
    Line: 1228
    Line 1228 source: if (isset ($mapEntry[$id])) {

    Parser timing
    MySQL: 0.0023 s (3 Requests)
    PHP: 0.0278 s
    Total: 0.0301 s


    Here’s the code for that group:

    1225 function getChildIds($id, $depth= 10, $children= array ()) {
    1226 $c= null;
    1227 foreach ($this->documentMap as $mapEntry) {
    1228 if (isset ($mapEntry[$id])) {
    1229 $childId= $mapEntry[$id];
    1230 $childKey= array_search($childId, $this->documentListing);
    1231 if (!$childKey) {
    1232 $childKey= "$childId";
    1233 }
    1234 $c[$childKey]= $childId;
    1235 }
    1236 }


    I’m able to remove certain lines to make the site work but drop down menus on the website become disabled. What is the problem?????
    • How many resources (documents) do you have?

      And that MODx version is very old, you really should upgrade to 1.0.5
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36083
        • 4 Posts
        Based on the tree to the left, there’s about 30 pages.
        • Sounds like your site cache file may be corrupted. Try emptying the assets/cache/siteCache.idx.php file, then go to the Configuration tab in the Manager and save it; that will re-create the cache file.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 36083
            • 4 Posts
            How do I empty the siteCache.idx.php? Just delete everything in that file?
            • Back it up first, but yes, open it in an editor and delete the contents. It should re-create in any case, but I’ve found that sometimes I need to "save" the configuration to get it to be refreshed.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 36083
                • 4 Posts
                Didn’t work >:(
                • Well, the problem occurs when it’s trying to use the arrays in that file. So something is wrong with it.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org