Jump to:

4907 Posts in 6996 Topics by 1474 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » "Show deleted pages" gives me "error loading tree"

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1789 Views
  • tmkp
    Avatar
    Community Member
    40 Posts

    "Show deleted pages" gives me "error loading tree" Link to this post

    Hi,
    i've been pulling my hair out over this one for a couple hours already..

    A click on "Show deleted pages" in Site Content throws an "error loading tree", tree is not shown. Everything else is working just fine. Error appears on both 2.3.4 and 2.3.5, fresh installs.

    Here's some firebug output:

    2.3.4:

    POST http://[MYURL]/admin/getshowdeletedsubtree?ajax=1&ID=0 500 Internal Server Error

    500//ERROR [User Error]: Couldn't run query:
    CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
                RecordID INT NOT NULL PRIMARY KEY,
                Version INT NOT NULL
             )

    Access denied for user '[MYSQLCREDS]'@'%' to database '[MYSQLCREDS]'
    IN POST /admin/getshowdeletedsubtree?ajax=1&ID=0
    Line 401 in [PATH]/sapphire/core/model/MySQLDatabase.php

    Source
    ======
    392:    }
    393:
    394:    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    395:       // try to extract and format query
    396:       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    397:          $formatter = new SQLFormatter();
    398:          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    399:       }
    400:
    * 401:       user_error($msg, $errorLevel);
    402:    }
    403: }
    404:
    405: /**
    406: * A result-set from a MySQL database.
    407: * @package sapphire

    <ul>user_error(Couldn't run query:
    CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
                RecordID INT NOT NULL PRIMARY KEY,
                Version INT NOT NULL
             )

    Access denied for user '[MYSQLCREDS]'@'%' to database '[MYSQLCREDS]',256)
    line 401 of MySQLDatabase.php

    MySQLDatabase->databaseError(Couldn't run query: CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
                RecordID INT NOT NULL PRIMARY KEY,
                Version INT NOT NULL
             ) | Access denied for user '[MYSQLCREDS]'@'%' to database '[MYSQLCREDS]',256)
    line 102 of MySQLDatabase.php

    MySQLDatabase->query(CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
                RecordID INT NOT NULL PRIMARY KEY,
                Version INT NOT NULL
             ),256)
    line 120 of DB.php

    DB::query(CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
                RecordID INT NOT NULL PRIMARY KEY,
                Version INT NOT NULL
             ))
    line 108 of Versioned.php

    Versioned::requireArchiveTempTable(SiteTree)
    line 733 of Versioned.php

    Versioned::get_including_deleted(SiteTree,ParentID = 0)
    line 515 of Hierarchy.php

    Hierarchy->AllHistoricalChildren(CMSMain)

    call_user_func_array(Array,Array)
    line 550 of Object.php

    Object->__call(AllHistoricalChildren,Array)

    SiteTree->AllHistoricalChildren(CMSMain)
    line 151 of Hierarchy.php

    Hierarchy->markChildren(SiteTree,CMSMain,AllHistoricalChildren)
    line 85 of Hierarchy.php

    Hierarchy->markPartialTree(30,CMSMain,AllHistoricalChildren)

    call_user_func_array(Array,Array)
    line 550 of Object.php

    Object->__call(markPartialTree,Array)

    SiteTree->markPartialTree(30,CMSMain,AllHistoricalChildren)
    line 479 of LeftAndMain.php

    LeftAndMain->getSiteTreeFor(SiteTree,0,AllHistoricalChildren)
    line 159 of CMSMain.php

    CMSMain->getshowdeletedsubtree(HTTPRequest)
    line 159 of Controller.php

    Controller->handleAction(HTTPRequest)
    line 129 of RequestHandler.php

    RequestHandler->handleRequest(HTTPRequest)
    line 119 of Controller.php

    Controller->handleRequest(HTTPRequest)
    line 277 of Director.php

    Director::handleRequest(HTTPRequest,Session)
    line 121 of Director.php

    Director::direct(/admin/getshowdeletedsubtree)
    line 118 of main.php

    </ul>
    http://[MYURL]/jsparty/prototype.js?m=1264795354
    Line 658

    And in 2.3.5

    500//There has been an error
    http://[MYURL]/silverstripe/assets/base.js?m=1264788920
    Line 55

    which reads:
    var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;},activeRequestCount:0}

    Does this happen to look familiar to anyone?

    Silverstripe is running on subdomains in both cases, i'm not sure if that could be the problem at all though.. Like stated above, everything else seems to be working smoothly.

    Any help would be greatly appreciated!

    Thanks,
    Andi

  • OwenW
    Avatar
    Community Member
    45 Posts

    Re: "Show deleted pages" gives me "error loading tree" Link to this post

    Hi tmkp,

    I have not seen this error, but i suspect it may be that the database user is not able to create temporary tables, based on this bit;

    <quote>
    500//ERROR [User Error]: Couldn't run query:
    CREATE TEMPORARY TABLE IF NOT EXISTS _ArchiveSiteTree (
    RecordID INT NOT NULL PRIMARY KEY,
    Version INT NOT NULL
    )

    Access denied for user '[MYSQLCREDS]'@'%' to database '[MYSQLCREDS]'
    </quote>

    I suspect that if you grant the mysql user the CREATE TEMPORARY TABLES priv then you should hopefully be ok.

    Cheers
    Owen

    1789 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.