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

ENUM's radiobuttons reset on "Continue insertion with" changes #13864

Closed
zupsel opened this issue Dec 12, 2017 · 5 comments
Closed

ENUM's radiobuttons reset on "Continue insertion with" changes #13864

zupsel opened this issue Dec 12, 2017 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted ui Issues relating to the user interface
Projects
Milestone

Comments

@zupsel
Copy link

zupsel commented Dec 12, 2017

Steps to reproduce

  1. Having table with ENUM datatype column, having 2 option
  2. Going to table Insert section
  3. Choose a value for the enum
  4. Change the value of "Continue insertion with" to any other value

Expected behaviour

ENUM datatype column setting in all added (selected) items must remain as selected on "Continue insertion with" change

Actual behaviour

ENUM datatype column setting in all added (selected) items resets and loses the previously selected value

Server configuration

phpMyAdmin version: 4.7.4, 4.8.3, 5.0.0-dev

@williamdes williamdes assigned williamdes and unassigned williamdes Nov 15, 2018
@williamdes williamdes added Bug A problem or regression with an existing feature help wanted ui Issues relating to the user interface good first issue labels Nov 17, 2018
@williamdes
Copy link
Member

My test table:

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
CREATE TABLE `a` (
  `id` int(11) NOT NULL,
  `test` enum('a','b') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `a` (`id`, `test`) VALUES
(1, 'a'),
(2, 'a');

ALTER TABLE `a`
  ADD PRIMARY KEY (`id`);
ALTER TABLE `a`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;

@akkywadhwa
Copy link
Contributor

Hey @williamdes! I am a newbie. I have figured out that the issue lies in tbl_change.js

$last_row
.clone(true)
.insertBefore('#actions_panel')
.find('input[name*=multi_edit],select[name*=multi_edit],textarea[name*=multi_edit]')
.each(tempIncrementIndex)
.end()
.find('.foreign_values_anchor')
.each(tempReplaceAnchor);

but even after trying it for several hours (5-6 maybe!) I am not able to figure it out. Can you please tell me how to proceed further for such issues?

@williamdes
Copy link
Member

williamdes commented Nov 20, 2018

@akkywadhwa You can join our Slack or Gitter if you want to discuss in real time :)

Could you try to add breakpoints in your browser to find where the reset happens ?
It seems that you are on the good path.
Do you want me to try to find a solution ?
I quickly had a look on what you found and I think that it is maybe already handled for other input types

@akkywadhwa
Copy link
Contributor

akkywadhwa commented Nov 20, 2018

@williamdes
Thank you! I would try it again with using your quick finding.
No, I don't want you to find a solution. I will try myself at least for a day more.
Yes I figured out this code using breakpoints. Right now I am using Mozilla Firefox debugger to check all this. Is there any other tool which can show me the whole call stack without putting breakpoints? Figuring out this thing using breakpoints took my hell lot of time.

@williamdes
Copy link
Member

Is there any other tool which can show me the whole call stack without putting breakpoints?

I don't know, I always use console logs to debug ^^

@williamdes williamdes added this to To be sorted in issues May 2, 2019
@williamdes williamdes moved this from To be sorted to Reproduced in issues May 3, 2019
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 16, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 16, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 16, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 16, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 16, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
victorphoenix3 added a commit to victorphoenix3/phpmyadmin that referenced this issue Dec 17, 2019
 fixes phpmyadmin#13864

Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
@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 Dec 17, 2019
@williamdes williamdes added this to the 5.0.2 milestone Jan 9, 2020
@williamdes williamdes self-assigned this Jan 19, 2020
williamdes added a commit that referenced this issue Jan 19, 2020
Fixes: #13864
Pull-request: #15657
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jan 19, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Jan 19, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2021
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 good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

3 participants