Bug: 500 Error Undefined index trying to list any contact group that is not "ROLE" type #706
Closed
Description
ISSUE TYPE
Bug Report
VERSION
define( 'APPLICATION_VERSION', '5.7.0' );
define( 'APPLICATION_VERDATE', '2020082000' );
ENVIRONMENT
PHP 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jan 23 2020 13:58:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.14-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
ii libapache2-mod-php7.3 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php-common 2:72+ubuntu16.04.1+deb.sury.org+1 all Common files for PHP packages
ii php-ds 1.2.9-1+ubuntu16.04.1+deb.sury.org+20191129 amd64 PHP extension providing efficient data structures for PHP 7
ii php-igbinary 3.1.0+2.0.8-2+ubuntu16.04.1+deb.sury.org+1 amd64 igbinary PHP serializer
ii php-memcached 3.1.4+2.2.0-1+ubuntu16.04.1+deb.sury.org+20191129 amd64 memcached extension module for PHP, uses libmemcached
ii php-msgpack 2.0.3+0.5.7-2+ubuntu16.04.1+deb.sury.org+20191129 amd64 PHP extension for interfacing with MessagePack
ii php-pear 1:1.10.8+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all PEAR Base System
ii php-rrd 2.0.1+1.1.3-7+ubuntu16.04.1+deb.sury.org+20191129 amd64 PHP bindings to rrd tool system
ii php-yaml 2.0.4+1.3.2-1+ubuntu16.04.1+deb.sury.org+20191129 amd64 YAML-1.1 parser and emitter for PHP
ii php7.3 7.3.17-1+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.3-bcmath 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 Bcmath module for PHP
ii php7.3-cgi 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (CGI binary)
ii php7.3-cli 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.3-curl 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php7.3-dev 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 Files for PHP7.3 module development
ii php7.3-gd 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.3-intl 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP
ii php7.3-json 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.3-mbstring 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php7.3-mysql 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.3-opcache 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.3-snmp 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 SNMP module for PHP
ii php7.3-xml 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.3-xmlrpc 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 XMLRPC-EPI module for PHP
ii php7.3-xsl 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 all XSL module for PHP (dummy)
ii php7.3-zip 7.3.14-1+ubuntu16.04.1+deb.sury.org+1 amd64 Zip module for PHP
ii pkg-php-tools 1.33+deb.sury.org~xenial+1 all various packaging tools and scripts for PHP packages
CONFIGURATION
APP_ENV=production
APP_DEBUG=false
APP_URL="https://portal.lonap.net"
APP_TIMEZONE="Europe/London"
APP_LOG="single"
APP_LOG_LEVEL=debug
IXP_FE_FRONTEND_DISABLED_LOGO=false
IXP_FE_CUSTOMER_BILLING_UPDATES_NOTIFY="xxxx@..."
IXP_FE_FRONTEND_DISABLED_RS_PREFIXES=true
IXP_FE_FRONTEND_DISABLED_NETINFO=true
IXP_FE_FRONTEND_DISABLED_CUSTKIT=false
IXP_FE_FRONTEND_DISABLED_CONSOLE=true
IXP_FE_FRONTEND_DISABLED_LOGO=false
IXP_FE_FRONTEND_DISABLED_LOOKING_GLASS=false
IXP_FE_VLANINTERFACES_HOSTNAME_REQUIRED=false
AUTH_PEERINGDB_ENABLED=true
PEERINGDB_OAUTH_CLIENT_ID="(removed)"
PEERINGDB_OAUTH_CLIENT_SECRET="(removed)"
PEERINGDB_OAUTH_REDIRECT="(removed)"
AUTH_PEERINGDB_PRIVS=2
IXP_API_JSONEXPORTSCHEMA_PUBLIC=true
IXP_MULTIIXP_ENABLED=false
IXP_RESELLER_ENABLED=true
IXP_RESELLER_RESOLD_BILLING=false
IXP_AS112_UI_ACTIVE=false
GRAPHER_BACKENDS="mrtg|sflow"
GRAPHER_BACKEND_MRTG_WORKDIR="/srv/mrtg"
GRAPHER_BACKEND_MRTG_LOGDIR="http://192.168.82.39/mrtg"
GRAPHER_BACKEND_SFLOW_ENABLED=true
GRAPHER_BACKEND_SFLOW_ROOT="http://sflow-old.lonap.net/grapher-sflow"
GRAPHER_BACKEND_SMOKEPING_ENABLED=false
GRAPHER_CACHE_ENABLED=false
VIEW_SKIN="lonap"
VIEW_SMARTY_SKIN="lonap"
AUTH_ZF1_PWHASH="bcrypt"
CACHE_DRIVER=memcached
SESSION_DRIVER=file
DOCTRINE_PROXY_AUTOGENERATE=false
DOCTRINE_CACHE=array
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE
IXP_API_RIR_EMAIL_TO=xxxx@...
IXP_API_RIR_EMAIL_FROM=xxxx@...
IXP_IRRDB_BGPQ3_PATH=/usr/local/bin/bgpq3
IXP_IRRDB_MIN_V4_SUBNET_SIZE=24
IXP_IRRDB_MIN_V6_SUBNET_SIZE=48
IXP_FE_FRONTEND_DISABLED_FILTERED_PREFIXES=false
IXP_RPKI_RTR1_HOST=5.57.93.31
IXP_RPKI_RTR1_PORT=3323
IXP_RPKI_RTR2_HOST=5.57.93.32
IXP_RPKI_RTR2_PORT=3323
IXP_FE_BETA_CORE_BUNDLES=true
SUMMARY
When trying to list members of contact groups, interface crashes with 500 Error unless the group type is set to ROLE.
STEPS TO REPRODUCE
- Go to /contact-group/list
- Select the List Contacts option on any group that's not a ROLE group
See screen recording: https://www.youtube.com/watch?v=Adj39iQZMOk
EXPECTED RESULTS
List of contacts matching the contact group
ACTUAL RESULTS
Error 500
Server Error | :: Undefined index:
IMPORTANCE
Workaround: Temporarily set the group to role.
Other workaround: SQL Query like the following:
SELECT
cont.name,
cont.email,
cust.abbreviatedName,
cogr.name AS contactgroup
FROM
contact cont
INNER JOIN contact_to_group cotg ON cotg.contact_id = cont.id
INNER JOIN contact_group cogr ON cotg.contact_group_id = cogr.id
INNER JOIN cust cust ON cont.custid = cust.id
WHERE
cogr.name = "attend_agm_2020"
RELEVANT LOGS
[2021-04-22 13:49:16] production.ERROR: Undefined index: {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined index: at /srv/ixpmanager/resources/views/contact/list-preamble.foil.php:3)
[stacktrace]
#0 /srv/ixpmanager/resources/views/contact/list-preamble.foil.php(3): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined index...', '/srv/ixpmanager...', 3, Array)
#1 /srv/ixpmanager/vendor/foil/foil/src/Template/Template.php(287): require('/srv/ixpmanager...')
#2 /srv/ixpmanager/vendor/foil/foil/src/Template/Template.php(231): Foil\\Template\\Template->collect('/srv/ixpmanager...')
#3 /srv/ixpmanager/vendor/foil/foil/src/Engine.php(307): Foil\\Template\\Template->render(Array)
#4 /srv/ixpmanager/vendor/foil/foil/src/Engine.php(211): Foil\\Engine->doRender('/srv/ixpmanager...', Array)
#5 /srv/ixpmanager/vendor/foil/foil/src/Template/Template.php(188): Foil\\Engine->render('contact/list-pr...', Array)
#6 /srv/ixpmanager/resources/views/frontend/list.foil.php(53): Foil\\Template\\Template->insert('contact/list-pr...')
#7 /srv/ixpmanager/vendor/foil/foil/src/Template/Template.php(287): require('/srv/ixpmanager...')
#8 /srv/ixpmanager/vendor/foil/foil/src/Template/Template.php(231): Foil\\Template\\Template->collect('/srv/ixpmanager...')
#9 /srv/ixpmanager/vendor/foil/foil/src/Engine.php(307): Foil\\Template\\Template->render(Array)
#10 /srv/ixpmanager/vendor/foil/foil/src/Engine.php(231): Foil\\Engine->doRender('/srv/ixpmanager...', Array, NULL)
#11 /srv/ixpmanager/vendor/foil/foil/src/Engine.php(204): Foil\\Engine->renderTemplate('/srv/ixpmanager...', Array)
#12 /srv/ixpmanager/app/Services/FoilEngine.php(51): Foil\\Engine->render('/srv/ixpmanager...', Array)
#13 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/View/View.php(143): IXP\\Services\\FoilEngine->get('/srv/ixpmanager...', Array)
#14 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/View/View.php(126): Illuminate\\View\\View->getContents()
#15 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#16 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Http/Response.php(42): Illuminate\\View\\View->render()
#17 /srv/ixpmanager/vendor/symfony/http-foundation/Response.php(205): Illuminate\\Http\\Response->setContent(Object(Illuminate\\View\\View))
#18 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(749): Symfony\\Component\\HttpFoundation\\Response->__construct(Object(Illuminate\\View\\View), 200, Array)
#19 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
#20 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Router->prepareResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
#21 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#22 /srv/ixpmanager/app/Http/Controllers/Doctrine2Frontend.php(158): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(153): IXP\\Http\\Controllers\\Doctrine2Frontend->IXP\\Http\\Controllers\\{closure}(Object(Illuminate\\Http\\Request), Object(Closure))
#24 /srv/ixpmanager/app/Http/Middleware/Google2FA.php(74): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): IXP\\Http\\Middleware\\Google2FA->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /srv/ixpmanager/app/Http/Middleware/Doctrine2Frontend.php(71): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): IXP\\Http\\Middleware\\Doctrine2Frontend->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /srv/ixpmanager/app/Http/Middleware/ControllerEnabled.php(96): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): IXP\\Http\\Middleware\\ControllerEnabled->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#30 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#31 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(77): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#34 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#35 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#38 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#39 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#44 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#45 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#46 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#47 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#48 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#49 /srv/ixpmanager/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#52 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#55 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#56 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#57 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#58 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#59 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#60 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#61 /srv/ixpmanager/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#62 /srv/ixpmanager/public/index.php(85): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#63 {main}
"}
Metadata
Assignees
Labels
No labels