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

All Fields Readonly on Edit/Insert Screens #14934

Closed
smartinec opened this issue Feb 6, 2019 · 18 comments
Closed

All Fields Readonly on Edit/Insert Screens #14934

smartinec opened this issue Feb 6, 2019 · 18 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@smartinec
Copy link

Unable to type in fields on the Edit and Insert screens (inline edits work fine).

To Reproduce

Steps to reproduce the behavior:

  1. Browse table records
  2. Click on Edit action for a single row
  3. Attempt to type in field

Expected behavior

Ability to edit values.

Screenshots

2019-02-06_13-24-40

Server configuration

  • Operating system: Amazon Linux AMI 3.14.35-28.38.amzn1.x86_64
  • Web server: Apache 2.4.37
  • Database version: MySQL 5.6.34
  • PHP version: 5.5.38
  • phpMyAdmin version: 4.8.5

Client configuration

  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
  • Operating system: OSX 10.13.6

Additional context

I'm guessing it may be some kind of config issue, but I couldn't find a setting to adjust.

@bahl24
Copy link
Contributor

bahl24 commented Feb 6, 2019

@smartinec What error message are you getting?
I am unable to reproduce your issue both on my local machine as well as https://demo.phpmyadmin.net/QA_4_8/index.php.

@smartinec
Copy link
Author

There is no error message. The fields are simply locked from editing. Notice the code in the developer tools window where it's set to readonly="readonly". Also notice how the Function column is missing all the drop-downs. I just tested in Firefox with the same result. Is there a config setting or internal error checking that would cause the screen to go into this mode?

@bahl24
Copy link
Contributor

bahl24 commented Feb 6, 2019

Actually, for me the fields are editable and function drop-down is also visible.
screenshot from 2019-02-07 01-51-20

@bahl24
Copy link
Contributor

bahl24 commented Feb 6, 2019

@smartinec Do you have the permissions to edit the table?
You can click the Priviledges tab to check

@smartinec
Copy link
Author

Ok, here is what privileges looks like (I am logged in as "shaun"). It seems that phpMyAdmin is not properly detecting my wildcard DB privilege. Like I mentioned before, I can make inline edits, but it doesn't think I have permission on the edit page. I verified that if I login as "root", the edit page shows properly. This setup used to work in older versions of phpMyAdmin.

2019-02-06_15-41-01

@smartinec
Copy link
Author

@bahl24 Did you see my comment above? Any chance this will be addressed soon?

@bahl24
Copy link
Contributor

bahl24 commented Feb 27, 2019

@smartinec Sorry I must have missed it, I will try to resolve it.

@bahl24
Copy link
Contributor

bahl24 commented Feb 27, 2019

@smartinec I think I got it, the global privileges on shaun account supersedes the wildcard ones.
screenshot from 2019-02-28 03-04-51
When only wildcard privileges are there, I was able to edit. But when I changed it to
screenshot from 2019-02-28 03-12-43
I was unable to edit.
You should include ALTER privileges in global or remove global altogether. Just test it once and keep me posted.

@bahl24
Copy link
Contributor

bahl24 commented Feb 27, 2019 via email

@smartinec
Copy link
Author

@bahl24 I went back to version 4.0.10.20 and it works fine again. Database specific permissions should override global permissions.
2019-02-28_09-24-46

@bahl24
Copy link
Contributor

bahl24 commented Feb 28, 2019

To find where is the bug, I tried ALTER and UPDATE table from terminal and got the error-
screenshot from 2019-02-28 20-13-11
screenshot from 2019-02-28 20-12-42
thus I think there is no bug in current version. Still doesn't explain why it works fine for you in v4.0

@smartinec
Copy link
Author

I don't think you have your permissions setup to match mine or maybe need to reload the privileges table. Local privileges should override global (see below). Also, as I mentioned before, phpMyAdmin is letting me do inline edits in latest version. I'm pretty sure there is a bug.
2019-02-28_10-02-13

@bahl24
Copy link
Contributor

bahl24 commented Feb 28, 2019

Ok, Iet me test and make a patch

@bahl24
Copy link
Contributor

bahl24 commented Feb 28, 2019

@smartinec I confirm the issue and have started working on it

@williamdes williamdes added the Bug A problem or regression with an existing feature label Feb 28, 2019
@bahl24
Copy link
Contributor

bahl24 commented Mar 2, 2019

It looks like PMA isn't able to detect wildcard priv
@williamdes After few hours of trying to debug this code, I came across the problem mentioned as @todo on line 270. Can you help me as to how to proceed further as to solve @todo problem more $GLOBAL variables must be required which in turn need to be fetched by some SQL query.
screenshot from 2019-03-02 11-08-41

@williamdes
Copy link
Member

@bahl24 Maybe use Privileges.php::getGrants ?

If you can add a failing unit test to CheckUserPrivilegesTest in order to validate the fix that would be great :)

@williamdes williamdes added this to Needs triage in issues via automation May 1, 2019
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues May 1, 2019
@MauricioFauth MauricioFauth self-assigned this May 4, 2019
@MauricioFauth MauricioFauth added this to the 4.8.6 milestone May 4, 2019
MauricioFauth added a commit that referenced this issue May 4, 2019
Fixed all fields readonly on Edit/Insert screens

- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
@MauricioFauth
Copy link
Member

Closed in #14993

issues automation moved this from to be fixed soon to Closed May 4, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@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
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants