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

Please enter a valid length! #13158

Closed
lightnb opened this Issue Apr 6, 2017 · 14 comments

Comments

Projects
None yet
10 participants
@lightnb

lightnb commented Apr 6, 2017

Steps to reproduce

  1. Choose to create a new table
  2. Name the fields, select types, add indexes and options
  3. Attempt to save.

Expected behavior

Since nothing is invalid, it should save and create the new table.

Actual behavior

Many times, it does save the new table, but for some reason which I cannot determine, there is a 1 in 25 chance (approximately) of an error message popping up in a javascript alert which reads "Please enter a valid length!". Nothing is actually wrong.

If you start over by choosing to create a new table and re-enter all of the exact same data, it works fine. I suspect there may be some issue with the order in which fields are filled in.

I have attempted to re-produce this and it does recur often, but the best I can come up with so far is "get unlucky".

Server configuration

Operating system: Ubuntu 16.04

Web server: NginX 1.10.0

Database: MySQL

PHP version: 7.0.13

phpMyAdmin version: 4.5.4.1deb2ubuntu2

Client configuration

Browser: Firefox 45 LTS

Operating system: Mint 18

@OlafvdSpek

This comment has been minimized.

Show comment
Hide comment
@OlafvdSpek

OlafvdSpek Apr 7, 2017

phpMyAdmin version: 4.5.4.1deb2ubuntu2

I think you should try 4.7 first..

OlafvdSpek commented Apr 7, 2017

phpMyAdmin version: 4.5.4.1deb2ubuntu2

I think you should try 4.7 first..

@madhuracj

This comment has been minimized.

Show comment
Hide comment
@madhuracj

madhuracj Apr 7, 2017

Member

Try 4.7 on our demo server (https://demo.phpmyadmin.net/QA_4_7, username: root, no password)
If you can recreate the issue there, please provide us with a screenshot of the values you've entered, so it would be easy for us to recreate and fix the issue.

Member

madhuracj commented Apr 7, 2017

Try 4.7 on our demo server (https://demo.phpmyadmin.net/QA_4_7, username: root, no password)
If you can recreate the issue there, please provide us with a screenshot of the values you've entered, so it would be easy for us to recreate and fix the issue.

@poush

This comment has been minimized.

Show comment
Hide comment
@poush

poush Apr 8, 2017

Contributor

I also encountered this error once in one of my competitions where we were using PHPMyAdmin for database importing. I wasn't able to check the version due to short of time there. Although that PHPMyAdmin was part of Xampp installation on that system. The problem was occurring continuously until I reloaded PHPMyAdmin.
I was stuck with importing process for 10 minutes due to this PHPMyAdmin issue that day.
@lightnb Please try this on 4.7 and see if you can recreate it.

Contributor

poush commented Apr 8, 2017

I also encountered this error once in one of my competitions where we were using PHPMyAdmin for database importing. I wasn't able to check the version due to short of time there. Although that PHPMyAdmin was part of Xampp installation on that system. The problem was occurring continuously until I reloaded PHPMyAdmin.
I was stuck with importing process for 10 minutes due to this PHPMyAdmin issue that day.
@lightnb Please try this on 4.7 and see if you can recreate it.

@lightnb

This comment has been minimized.

Show comment
Hide comment
@lightnb

lightnb Apr 8, 2017

lightnb commented Apr 8, 2017

@udan11

This comment has been minimized.

Show comment
Hide comment
@udan11

udan11 Apr 11, 2017

Member

The relevant code is found here and looks correct.

field_X_1 is the "Name" field and field_X_3 is the "Length/Values" field. It checks if there is a valid number and the field name is not empty, which is correctly.

Member

udan11 commented Apr 11, 2017

The relevant code is found here and looks correct.

field_X_1 is the "Name" field and field_X_3 is the "Length/Values" field. It checks if there is a valid number and the field name is not empty, which is correctly.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Jul 18, 2017

Member

Anybody can reproduce this or current version? If not, it's probably close this report as it has been fixed meanwhile...

Member

nijel commented Jul 18, 2017

Anybody can reproduce this or current version? If not, it's probably close this report as it has been fixed meanwhile...

@nijel nijel added the question label Jul 18, 2017

@nijel nijel self-assigned this Jul 18, 2017

@nijel nijel closed this Aug 29, 2017

@aornt

This comment has been minimized.

Show comment
Hide comment
@aornt

aornt Sep 28, 2017

I see this thread is closed, but in version 4.7.4 (up to date) the problem still is there.

aornt commented Sep 28, 2017

I see this thread is closed, but in version 4.7.4 (up to date) the problem still is there.

@OlafvdSpek

This comment has been minimized.

Show comment
Hide comment
@OlafvdSpek

OlafvdSpek Sep 28, 2017

Could you provide instructions on how to reproduce this, preferably via https://www.phpmyadmin.net/try/ ?

OlafvdSpek commented Sep 28, 2017

Could you provide instructions on how to reproduce this, preferably via https://www.phpmyadmin.net/try/ ?

@aornt

This comment has been minimized.

Show comment
Hide comment
@aornt

aornt Sep 28, 2017

At this moment I have logged off and on in phpMyAdmin and the problem has solved for the moment.
It's just very annoying that having filled in all 15 field definitions you have to redo it.
I filled now just 2 rows and then already created the database. This worked OK.
(before the log-on log-off it did also not work with 2 rows)
Maybe the error appeared because I used the "add column"-button at the top, in order to extend the input rows for adding more fields.

I'll try to determinate the conditions more precise when it happens again.

aornt commented Sep 28, 2017

At this moment I have logged off and on in phpMyAdmin and the problem has solved for the moment.
It's just very annoying that having filled in all 15 field definitions you have to redo it.
I filled now just 2 rows and then already created the database. This worked OK.
(before the log-on log-off it did also not work with 2 rows)
Maybe the error appeared because I used the "add column"-button at the top, in order to extend the input rows for adding more fields.

I'll try to determinate the conditions more precise when it happens again.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 28, 2017

Member

Thanks, having reproducer would certainly allow us to fix this.

Member

nijel commented Sep 28, 2017

Thanks, having reproducer would certainly allow us to fix this.

@PaapaAsare

This comment has been minimized.

Show comment
Hide comment
@PaapaAsare

PaapaAsare Feb 9, 2018

SOLVED
if you have set the datatype of any of the fields to "VARCHAR" then you would have to set the length of those fields. under LENGTH/VALUES, put any number there.

PaapaAsare commented Feb 9, 2018

SOLVED
if you have set the datatype of any of the fields to "VARCHAR" then you would have to set the length of those fields. under LENGTH/VALUES, put any number there.

@lightnb

This comment has been minimized.

Show comment
Hide comment
@lightnb

lightnb Feb 9, 2018

lightnb commented Feb 9, 2018

@pagan-bear

This comment has been minimized.

Show comment
Hide comment
@pagan-bear

pagan-bear Feb 11, 2018

I agree with @lightnb above. I have just gotten this error now. I always enter a length for varchar fields. What ever "happens", until you do a browser page reload the error seems to repeat. One thing I did notice is that after the error occurs you can subsequently, successfully add table rows one-at-a-time. After the initial exception I tried to run SQL manually to add table rows, but this failed with the above exception too.

phpmyadmin - version details

pagan-bear commented Feb 11, 2018

I agree with @lightnb above. I have just gotten this error now. I always enter a length for varchar fields. What ever "happens", until you do a browser page reload the error seems to repeat. One thing I did notice is that after the error occurs you can subsequently, successfully add table rows one-at-a-time. After the initial exception I tried to run SQL manually to add table rows, but this failed with the above exception too.

phpmyadmin - version details

@emmjk

This comment has been minimized.

Show comment
Hide comment
@emmjk

emmjk Jun 14, 2018

I also face the same problem .

emmjk commented Jun 14, 2018

I also face the same problem .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment