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

edit view not working #14868

Closed
matthiasradde opened this issue Jan 13, 2019 · 9 comments
Closed

edit view not working #14868

matthiasradde opened this issue Jan 13, 2019 · 9 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@matthiasradde
Copy link

Describe the bug

A clear and concise description of what the bug is.
On structure-page within a view there is a "Edit view"-link. But instead of editing the view I see an empty view-page.

To Reproduce

Steps to reproduce the behavior:

  1. have a database and a table and a view using this table
  2. got to "structure"-page within the view
  3. click on "Edit view" below structure/above partition
  4. an empty view is displayed

Expected behavior

instead of displaying an empty view I expected the contents of my view to be edited.

Server configuration

  • Operating system: Win 7 Home Premium x64
  • Web server: Apache 2.4.37 x64 (same with NginX 1.15.8.1)
  • Database version: MySQL 5.7.24 x64
  • PHP version: 7.2.14 x64
  • phpMyAdmin version: 4.8.4

Client configuration

  • Browser: Firefox 64.0.2 x64
  • Operating system: Win 7 Home Premium x64
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jan 14, 2019
@bahl24
Copy link
Contributor

bahl24 commented Jan 15, 2019

@matthiasradde Can you please share some screenshots for the same.
I tried reproducing your issue using two accounts with different privileges and obtained this
screenshot from 2019-01-15 17-46-23
which is correct, according to me.
You can change definition using 'AS' column.

@matthiasradde
Copy link
Author

@bahl24
thanks for your reply.
What you see is what I expected to see :-)

If I click on "edit view" I receive this screen
screenshot01
The URL in the addressbar is (as it is not completely visible in the screenshot) https://localhost/phpMyAdmin-4.8.4/view_create.php?db=lsy_kb4&table=anz_docs_per_tag&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_tag&view[as]=select+%60t%60.%60id%60+AS+%60id%60%2C%60t%60.%60tag%60+AS+%60tag%60%2Ccount%280%29+AS+%60anz_docs%60+from+%28%60lsy_kb4%60.%60kb_tags%60+%60t%60+left+join+%60lsy_kb4%60.%60kb_doc_tag%60+%60dt%60+on%28%28%60dt%60.%60tag_id%60+%3D+%60t%60.%60id%60%29%29%29+group+by+%60t%60.%60id%60+order+by+%60anz_docs%60+desc%2C%60t%60.%60tag%60&view[with]=NONE&view[algorithm]=UNDEFINED

The corresponding lines within Apache's log are
::1 - - [15/Jan/2019:15:15:44 +0100] "GET /phpMyAdmin-4.8.4/view_create.php?db=lsy_kb4&table=anz_docs_per_tag&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_tag&view[as]=select+%60t%60.%60id%60+AS+%60id%60%2C%60t%60.%60tag%60+AS+%60tag%60%2Ccount%280%29+AS+%60anz_docs%60+from+%28%60lsy_kb4%60.%60kb_tags%60+%60t%60+left+join+%60lsy_kb4%60.%60kb_doc_tag%60+%60dt%60+on%28%28%60dt%60.%60tag_id%60+%3D+%60t%60.%60id%60%29%29%29+group+by+%60t%60.%60id%60+order+by+%60anz_docs%60+desc%2C%60t%60.%60tag%60&view[with]=NONE&view[algorithm]=UNDEFINED&ajax_request=true&ajax_page_request=true&_nocache=1547561744112505637&token=%5Cqu5.PH%3Bb%3C%3ELbK_E HTTP/2.0" 200 2344
::1 - - [15/Jan/2019:15:15:44 +0100] "GET /phpMyAdmin-4.8.4/index.php?ajax_request=1&recent_table=1&no_debug=true&_nocache=1547561744391403491&token=%5Cqu5.PH%3Bb%3C%3ELbK_E HTTP/2.0" 200 1613

Whereas I see this when I manually want to display the view's definition (using a SQL-statement) - just to see that there is really data/content within the view
screenshot02

@bahl24
Copy link
Contributor

bahl24 commented Jan 16, 2019

I'm confused, the parameters passed via url seems correct and similar to mine. There is no reason why you should get an empty form.

@matthiasradde
Copy link
Author

@bahl24
I agree - there is no (obvious) reason why it is not working as expected for me.
Tried again with different client + server-versions:
phpMyAdmin 4.8.4 + PHP 5.6 running on a Synology NAS with Firefox 60.4.0esr on OSX as client
phpMyAdmin 4.8.5 + PHP 7.2 running on OSX with Apache and Safari or Firefox 60.4.0esr on OSX as client.
phpMyAdmin 4.8.5 + PHP 7.2 running on Win7x64 (home premium) with Apache or Nginx and Firefox or Chrome (both up to date) as client.
We checked the JavaScript-console and only found some notes about deprecated function-calls, but no error

The colleague with the Synology NAS first tried with phpMyAdmin 4.7.0 and the form was working. After updating to phpMyAdmin 4.8.4 the form was empty.

Will try with some older phpMyAdmin-version later this day to check the version in which the problem started.

@matthiasradde
Copy link
Author

@bahl24
Tested with older phpMyAdmin-versions on my test-server. All URLs look the same (of course except for the version-number in the path :-) ):
https://192.168.0.14/phpMyAdmin-4.8.2/view_create.php?db=lsy_kb4&table=anz_docs_per_year&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_year&view[as]=select+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+AS+%60year%60%2Ccount%280%29+AS+%60anz_docs%60+from+%60lsy_kb4%60.%60kb_docs%60+group+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+order+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29&view[with]=NONE&view[algorithm]=UNDEFINED

https://192.168.0.14/phpMyAdmin-4.8.3/view_create.php?db=lsy_kb4&table=anz_docs_per_year&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_year&view[as]=select+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+AS+%60year%60%2Ccount%280%29+AS+%60anz_docs%60+from+%60lsy_kb4%60.%60kb_docs%60+group+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+order+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29&view[with]=NONE&view[algorithm]=UNDEFINED

https://192.168.0.14/phpMyAdmin-4.8.4/view_create.php?db=lsy_kb4&table=anz_docs_per_year&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_year&view[as]=select+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+AS+%60year%60%2Ccount%280%29+AS+%60anz_docs%60+from+%60lsy_kb4%60.%60kb_docs%60+group+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+order+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29&view[with]=NONE&view[algorithm]=UNDEFINED

https://192.168.0.14/phpMyAdmin-4.8.5/view_create.php?db=lsy_kb4&table=anz_docs_per_year&goto=tbl_structure.php&back=tbl_structure.php&view[operation]=alter&view[definer]=root%40localhost&view[sql_security]=DEFINER&view[name]=anz_docs_per_year&view[as]=select+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+AS+%60year%60%2Ccount%280%29+AS+%60anz_docs%60+from+%60lsy_kb4%60.%60kb_docs%60+group+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29+order+by+year%28%60lsy_kb4%60.%60kb_docs%60.%60modifydatetime%60%29&view[with]=NONE&view[algorithm]=UNDEFINED

In the result there is no difference between 4.8.4 and 4.8.5. The difference between 4.8.2 and 4.8.3 is minimal ("algorithm" and "sql security"). But there is a difference is between 4.8.3 and 4.8.4 as you can see from these screenshots:
4.8.2
4 8 2

4.8.3
4 8 3

4.8.4
4 8 4

4.8.5
4 8 5

Server is a Ubuntu 16.04.5 LTS with nginx/1.10.3 and PHP 7.0.32-0ubuntu0.16.04.1
Client was (for the screenshots) a Win7x64(home premium) with Firefox 64.0.2. The result was the same with a Chrome 71.0.3578.98 and the IE 11.0.9600.19236 on the same client.

What can I do to create more/meaningful information? As the error also occured with the colleagues database + view it seems to be independent from the definition of the table and the view.

@williamdes
Copy link
Member

Confirmed on demo servers (root, no password)

use `world`;
CREATE VIEW `citycity` AS SELECT 1 ;

@Bournvita1998
Copy link
Contributor

Is anyone working on this issue? If not, I would like to take it up.

@williamdes
Copy link
Member

@Bournvita1998 You can take it if you want :)

Bournvita1998 added a commit to Bournvita1998/phpmyadmin that referenced this issue Mar 5, 2019
Fixes: phpmyadmin#14868

Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
@Bournvita1998 Bournvita1998 mentioned this issue Mar 5, 2019
6 tasks
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Mar 5, 2019
williamdes added a commit that referenced this issue Mar 6, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes self-assigned this Mar 6, 2019
@williamdes williamdes added this to the 4.8.6 milestone Mar 6, 2019
@williamdes
Copy link
Member

Merged, thank you @matthiasradde !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
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 has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants