Menu

#3939 (ok 4.0.10) PHP NavigationTree error when paging through list

4.0.9
fixed
None
1
2015-02-07
2013-05-16
pb30
No

We've got a couple database servers with a a lot of databases (600+). Setting MaxNavigationItems to something high like 500 displays the PHP error below. Lowering it to something like 100 allows the page to load, if you start paging through the list you'll eventually get the same error. Lowering it more will cause the error to appear at an even later page. Even the default will display the error at some point. Not sure if it matters but most of the databases are grouped (eg. projectname_dev and projectname_staging). MySQL servers with fewer databases (125) do not exhibit the problem at all.

( ! ) Fatal error: Call to a member function getPresence() on a non-object in /var/.../libraries/navigation/NavigationTree.class.php on line 1046
Call Stack
#   Time    Memory  Function    Location
1   0.1505  11898000    PMA_OutputBuffering::stop( )    ../OutputBuffering.class.php:0
2   0.1505  11876568    PMA_Response::response( )   ../OutputBuffering.class.php:117
3   0.1506  11876568    PMA_Response->_htmlResponse( )  ../Response.class.php:370
4   0.1506  11876568    PMA_Response->_getDisplay( )    ../Response.class.php:273
5   0.1506  11876568    PMA_Header->getDisplay( )   ../Response.class.php:260
6   0.1514  11884536    PMA_Navigation->getDisplay( )   ../Header.class.php:367
7   0.1525  11890288    PMA_NavigationTree->renderState( )  ../Navigation.class.php:54
8   1.4586  15630280    PMA_NavigationTree->_renderNode( )  ../NavigationTree.class.php:646
9   1.4590  15643216    PMA_NavigationTree->_renderNode( )  ../NavigationTree.class.php:973
10  1.4623  15658720    PMA_NavigationTree->_fastFilterHtml( )  ../NavigationTree.class.php:980

Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny16

Discussion

  • pb30

    pb30 - 2013-07-02

    Still an issue on 4.0.4.1

     
  • Serge Barth

    Serge Barth - 2013-08-08

    Still an issue on 4.0.5.
    Due to database name containing one of these words : tables, views, fonctions, procédures, events. See code below.
    Example of problematic database name : "ucem_tables_et_chaises_prod".

    Patch : add && method_exists($node->realParent(),'getPresence') in libraries/navigation/NavigationTree.class.php :

        } else if (($node->type == Node::CONTAINER
            && (   $node->real_name == 'tables'
                || $node->real_name == 'views'
                || $node->real_name == 'functions'
                || $node->real_name == 'procedures'
                || $node->real_name == 'events')
            )
            && method_exists($node->realParent(),'getPresence')
            && $node->realParent()->getPresence($node->real_name) >= (int)$GLOBALS['cfg']['NavigationTreeDisplayItemFilterMinimum']
        ) {
    
     
  • Marc Delisle

    Marc Delisle - 2013-11-12
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-11-12
    • summary: PHP NavigationTree error when paging through list --> (ok 4.0.10) PHP NavigationTree error when paging through list
    • status: open --> resolved
    • Group: 4.0.1 --> 4.0.9
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2013-12-04
    • status: resolved --> fixed
     
MongoDB Logo MongoDB