Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined array key "n0_pos2_name" #16973

Closed
williamdes opened this issue Jun 19, 2021 · 12 comments
Closed

Undefined array key "n0_pos2_name" #16973

williamdes opened this issue Jun 19, 2021 · 12 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@williamdes
Copy link
Member

williamdes commented Jun 19, 2021

Describe the bug

Fatal error: Uncaught ErrorException: Undefined array key "n0_pos2_name" in 
libraries/classes/Navigation/NavigationTree.php:171 Stack trace: #0 
libraries/classes/Navigation/NavigationTree.php(171): PhpMyAdmin\ErrorHandler->handleError(2, 'Undefined array...', '/mnt/Dev/@phpmy...', 171) #1 
libraries/classes/Navigation/Navigation.php(60): PhpMyAdmin\Navigation\NavigationTree->__construct(Object(PhpMyAdmin\Template), Object(PhpMyAdmin\DatabaseInterface)) #2 [internal function]: PhpMyAdmin\Navigation\Navigation->__construct(Object(PhpMyAdmin\Template), Object(PhpMyAdmin\Relation), Object(PhpMyAdmin\DatabaseInterface)) #3 
vendor/symfony/dependency-injection/ContainerBuilder.php(1104): ReflectionClass->newInstanceArgs(Array) #4 
vendor/symfony/dependency-injection/ContainerBuilder.php(602): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'navigation') #5 
vendor/symfony/dependency-injection/ContainerBuilder.php(1227): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('navigation', 1, Array, true) #6 
vendor/symfony/dependency-injection/ContainerBuilder.php(1175): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\Reference), Array, true) #7 
vendor/symfony/dependency-injection/ContainerBuilder.php(1077): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Array, Array, true) #8 
vendor/symfony/dependency-injection/ContainerBuilder.php(602): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'PhpMyAdmin\\Cont...') #9 
vendor/symfony/dependency-injection/ContainerBuilder.php(547): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('PhpMyAdmin\\Cont...', 1) #10 
libraries/classes/Routing.php(190): Symfony\Component\DependencyInjection\ContainerBuilder->get('PhpMyAdmin\\Cont...') #11 
index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/navigation', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #12 {main} thrown in 
libraries/classes/Navigation/NavigationTree.php on line 171

To Reproduce

Steps to reproduce the behavior:

  1. Click on empty db
  2. Click refresh tree

Expected behavior

No Undefined array key "n0_pos2_name"

Server configuration

  • phpMyAdmin version: 5.2 (but affects 5.1)

Additional context

curl 'http://8.0.local/@phpmyadmin/theREALphpMyAdminREPO/index.php?route=/navigation&ajax_request=1' \
...
  --data-raw 'reload=true&no_debug=true&server=1&n0_aPath=cm9vdA%3D%3D.YWlyLWJhbGxvb25fYnVybmVyX2RldjI%3D&n0_vPath=cm9vdA%3D%3D.YWlyLWJhbGxvb24%3D.YnVybmVyX2RldjI%3D&_nocache=162413655548217997&token=xxxxxxxxxxxx'
reload: true
no_debug: true
server: 1
n0_aPath: cm9vdA==.YWlyLWJhbGxvb25fYnVybmVyX2RldjI=
n0_vPath: cm9vdA==.YWlyLWJhbGxvb24=.YnVybmVyX2RldjI=
_nocache: 162413655548217997
token: xxxxxxxxxxxx
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jun 19, 2021
@williamdes williamdes added this to the 5.1.2 milestone Jun 19, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jun 19, 2021
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jun 19, 2021
@williamdes
Copy link
Member Author

williamdes commented Jun 19, 2021

Also reported to our error reporting back-ends

Also exists in n1_pos2_name flavor

@MauricioFauth
Copy link
Member

To see this error as Fatal error: Uncaught ErrorException, you will need to have $cfg['environment'] = 'development'; in your config.inc.php file.

@shucontech
Copy link
Contributor

Working on it.

@shucontech
Copy link
Contributor

shucontech commented Jun 20, 2021

I'm unable to reproduce this issue. What exactly do you mean by Click refresh tree ? Also, it is Click on empty db or Click on an empty db ?

@williamdes
Copy link
Member Author

image

You can repeat 1 and 2

@shucontech
Copy link
Contributor

That's exactly what I did. Can't reproduce it on the demo server or the local machine.

@williamdes
Copy link
Member Author

That's exactly what I did. Can't reproduce it on the demo server or the local machine.

you will need to have $cfg['environment'] = 'development'; in your config.inc.php file.

Do you have it ?

@shucontech
Copy link
Contributor

Do you have it ?

Yup, still can't reproduce.

@liviuconcioiu
Copy link
Contributor

Do you have it ?

Yup, still can't reproduce.

I can reproduce it. Just go to index.php?route=/ and click on the refresh icon.

refresh

@shucontech
Copy link
Contributor

I can reproduce it. Just go to index.php?route=/ and click on the refresh icon.

Still can't reproduce it. Maybe someone else can take up this issue.

@williamdes
Copy link
Member Author

I wrote a test and could reproduce it, working on the fix now

@williamdes
Copy link
Member Author

pos2 and pos3 implementation seem broken in some way

This issue was also reported as n0_pos2_value

Also found something wrong on pos3: 52fcbdf#diff-369499f525ad093000e69699d805d7e3ee9857219351069c80e86fbff1189084R110

@williamdes williamdes self-assigned this Jul 19, 2021
williamdes added a commit that referenced this issue Jul 19, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 20, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Jul 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants