inex / IXP-Manager

Full stack web application powering peering at over 200 Internet Exchange Points (IXPs) globally.
https://www.ixpmanager.org/
GNU General Public License v2.0
379 stars 164 forks source link

Exception raised for /customer/unread-notes #404

Closed rfc1036 closed 6 years ago

rfc1036 commented 6 years ago
ISSUE TYPE
OS

Ubuntu 16.04.3 LTS

VERSION
define( 'APPLICATION_VERSION', '4.7.3' );
define( 'APPLICATION_VERDATE', '2018021900' );
CONFIGURATION
APP_DEBUG=false
APP_URL="https://manager.minap.it"
APP_TIMEZONE="Europe/Rome"
APP_LOG="single"
IXP_API_JSONEXPORTSCHEMA_PUBLIC=true
IXP_MULTIIXP_ENABLED=false
IXP_RESELLER_ENABLED=false
IXP_AS112_UI_ACTIVE=false
GRAPHER_BACKENDS="mrtg"
GRAPHER_BACKEND_MRTG_DBTYPE="rrd"
GRAPHER_BACKEND_MRTG_SNMPPASSWD=""
GRAPHER_BACKEND_MRTG_WORKDIR="/var/lib/mrtg/"
GRAPHER_BACKEND_MRTG_LOGDIR="/var/lib/mrtg/"
VIEW_SKIN="minap"
VIEW_SMARTY_SKIN="minap"
CACHE_DRIVER=memcached
SESSION_LIFETIME=10080
SESSION_DRIVER=memcached
DOCTRINE_PROXY_AUTOGENERATE=true
DOCTRINE_CACHE=memcached
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE
IXP_FE_FRONTEND_DISABLED_LOGO=false
IXP_FE_FRONTEND_DISABLED_CONSOLE=true
IXP_FE_FRONTEND_DISABLED_CUSTKIT=true
IXP_FE_FRONTEND_DISABLED_LOOKING_GLASS=false
IXP_FE_LAYER2_ADDRESSES_CUST_CAN_EDIT=true
IXP_FE_LAYER2_ADDRESSES_CUST_PARAMS_MIN_ADDRESSES=1
IXP_FE_LAYER2_ADDRESSES_CUST_PARAMS_MAX_ADDRESSES=2
IXP_FE_LAYER2_ADDRESSES_EMAIL_ON_CUSTOMER_CHANGE=true
IXP_FE_LAYER2_ADDRESSES_EMAIL_ON_SUPERUSER_CHANGE=true
IXP_FE_LAYER2_ADDRESSES_EMAIL_ON_CHANGE_DEST=noc
IXP_FE_FRONTEND_DISABLED_RS_PREFIXES=true
SUMMARY

An exception is raised when opening the "unread notes menu" as superuser.

ACTUAL RESULTS
--------------------------- EXCEPTION --------------------------

Message: An exception occurred while executing 'SELECT c0_.name AS name_0, c0_.id AS id_1, c0_.shortname AS shortname_2, MAX(c1_.updated) AS sclr_3 FROM cust c0_ LEFT JOIN cust_notes c1_ ON c0_.id = c1_.customer_id GROUP BY c1_.customer_id HAVING COUNT(c1_.customer_id) > 0 ORDER BY sclr_3 DESC':

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ixpmanager.c0_.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Line: 115
File: /srv/ixpmanager/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php

Trace:

#0 /srv/ixpmanager/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /srv/ixpmanager/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(855): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT c0_.name...', Array)
#2 /srv/ixpmanager/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT c0_.name...', Array, Array, NULL)
#3 /srv/ixpmanager/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /srv/ixpmanager/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(962): Doctrine\ORM\Query->_doExecute()
#5 /srv/ixpmanager/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(917): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 2)
#6 /srv/ixpmanager/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(732): Doctrine\ORM\AbstractQuery->execute(NULL, 2)
#7 /srv/ixpmanager/database/Repositories/CustomerNotes.php(61): Doctrine\ORM\AbstractQuery->getArrayResult()
#8 /srv/ixpmanager/application/controllers/CustomerController.php(781): Repositories\CustomerNotes->getLatestUpdate()
#9 /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): CustomerController->unreadNotesAction()
#10 /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('unreadNotesActi...')
#11 /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#13 /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#14 /srv/ixpmanager/app/Exceptions/Handler.php(62): Zend_Application->run()
#15 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(83): IXP\Exceptions\Handler->render(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#16 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): Illuminate\Routing\Pipeline->handleException(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#17 /srv/ixpmanager/vendor/fideloper/proxy/src/TrustProxies.php(56): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#21 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#22 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#24 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#30 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#31 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#33 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#34 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#35 /srv/ixpmanager/public/index.php(85): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#36 {main}

Array
(
    [0] => Array
        (
            [file] => /srv/ixpmanager/library/OSS/Controller/Trait/Error.php
            [line] => 78
            [function] => compact_debug_backtrace
            [class] => OSS_Debug
        )

    [1] => Array
        (
            [file] => /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php
            [line] => 516
            [function] => errorAction
            [class] => ErrorController
        )

    [2] => Array
        (
            [file] => /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php
            [line] => 308
            [function] => dispatch
            [class] => Zend_Controller_Action
        )

    [3] => Array
        (
            [file] => /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php
            [line] => 954
            [function] => dispatch
            [class] => Zend_Controller_Dispatcher_Standard
        )

    [4] => Array
        (
            [file] => /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php
            [line] => 105
            [function] => dispatch
            [class] => Zend_Controller_Front
        )

    [5] => Array
        (
            [file] => /srv/ixpmanager/vendor/zendframework/zendframework1/library/Zend/Application.php
            [line] => 384
            [function] => run
            [class] => Zend_Application_Bootstrap_Bootstrap
        )

    [6] => Array
        (
            [file] => /srv/ixpmanager/app/Exceptions/Handler.php
            [line] => 62
            [function] => run
            [class] => Zend_Application
        )

    [7] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 83
            [function] => render
            [class] => IXP\Exceptions\Handler
        )

    [8] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 32
            [function] => handleException
            [class] => Illuminate\Routing\Pipeline
        )

    [9] => Array
        (
            [file] => /srv/ixpmanager/vendor/fideloper/proxy/src/TrustProxies.php
            [line] => 56
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [10] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 149
            [function] => handle
            [class] => Fideloper\Proxy\TrustProxies
        )

    [11] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 53
            [function] => Illuminate\Pipeline\{closure}
            [class] => Illuminate\Pipeline\Pipeline
        )

    [12] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
            [line] => 30
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [13] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 149
            [function] => handle
            [class] => Illuminate\Foundation\Http\Middleware\TransformsRequest
        )

    [14] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 53
            [function] => Illuminate\Pipeline\{closure}
            [class] => Illuminate\Pipeline\Pipeline
        )

    [15] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
            [line] => 30
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [16] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 149
            [function] => handle
            [class] => Illuminate\Foundation\Http\Middleware\TransformsRequest
        )

    [17] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 53
            [function] => Illuminate\Pipeline\{closure}
            [class] => Illuminate\Pipeline\Pipeline
        )

    [18] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php
            [line] => 27
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [19] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 149
            [function] => handle
            [class] => Illuminate\Foundation\Http\Middleware\ValidatePostSize
        )

    [20] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 53
            [function] => Illuminate\Pipeline\{closure}
            [class] => Illuminate\Pipeline\Pipeline
        )

    [21] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
            [line] => 46
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [22] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 149
            [function] => handle
            [class] => Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode
        )

    [23] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
            [line] => 53
            [function] => Illuminate\Pipeline\{closure}
            [class] => Illuminate\Pipeline\Pipeline
        )

    [24] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
            [line] => 102
            [function] => Illuminate\Routing\{closure}
            [class] => Illuminate\Routing\Pipeline
        )

    [25] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
            [line] => 151
            [function] => then
            [class] => Illuminate\Pipeline\Pipeline
        )

    [26] => Array
        (
            [file] => /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
            [line] => 116
            [function] => sendRequestThroughRouter
            [class] => Illuminate\Foundation\Http\Kernel
        )

    [27] => Array
        (
            [file] => /srv/ixpmanager/public/index.php
            [line] => 85
            [function] => handle
            [class] => Illuminate\Foundation\Http\Kernel
        )

)
nickhilliard commented 6 years ago

fixed in internal commit 34660afa7b607327b186230463d1e927ec8329e1