[go: nahoru, domu]

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

Designer is broken #12804

Closed
ibennetch opened this issue Dec 13, 2016 · 8 comments
Closed

Designer is broken #12804

ibennetch opened this issue Dec 13, 2016 · 8 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@ibennetch
Copy link
Member

Steps to reproduce

  1. Open Designer tab

Expected behaviour

Designer should appear without errors.

Actual behaviour

Designer opens, but there are errors hidden behind the window.

95064ed seems to be the first bad commit.

@ibennetch ibennetch added this to the 4.7.0 milestone Dec 14, 2016
@nijel nijel added the Bug A problem or regression with an existing feature label Dec 19, 2016
@nijel nijel modified the milestones: 4.6.6, 4.7.0 Dec 19, 2016
@nijel
Copy link
Contributor
nijel commented Dec 19, 2016

Your bisect is most likely wrong as the bug happens on QA_4_6 as well, where this commit is not present.

@nijel
Copy link
Contributor
nijel commented Dec 19, 2016

The problematic commit is 8badbe3

@nijel nijel self-assigned this Dec 19, 2016
nijel added a commit that referenced this issue Dec 19, 2016
Issue #12804

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel nijel removed their assignment Dec 19, 2016
@nijel
Copy link
Contributor
nijel commented Dec 19, 2016

I'm not sure if I was looking at same issue you've found, but the designer code is completely broken (and was always broken) for tables containing special chars - it uses table names as HTML ids, while the IDs can not contain space (and probably some other chars as well). I've fixed some of the breakage, but complete fixing needs much deeper look into the codebase...

osaid-r added a commit to osaid-r/phpmyadmin that referenced this issue Dec 21, 2016
* Do not delete session on fatal error

I see no reason why this should be done, the fatal error is used
in following cases:

* Very early when there is no session (eg. missing extension)
* Invalid value for parameters
* Invalid invocation like too big request

In neither case session removal will do any good.

Signed-off-by: Michal Čihař <michal@cihar.com>

* Do not use control link when working with stored procedures

Fixed stored procedure execution.

Fixes phpmyadmin#12813

Signed-off-by: Michal Čihař <michal@cihar.com>

* Fix early fatal errors

We can not rely on whole stack being ready.

Fixes phpmyadmin#12810

Signed-off-by: Michal Čihař <michal@cihar.com>

* Fix display of custom header and footer in certain edge cases.
Issues phpmyadmin#12801 and phpmyadmin#12802

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>

* Translated using Weblate (Dutch)

Currently translated at 100.0% (3222 of 3222 strings)

[CI skip]

* Translated using Weblate (Dutch)

Currently translated at 100.0% (3239 of 3239 strings)

[CI skip]

* Translated using Weblate (French)

Currently translated at 100.0% (3222 of 3222 strings)

[CI skip]

* Translated using Weblate (French)

Currently translated at 100.0% (3239 of 3239 strings)

[CI skip]

* Translated using Weblate (French)

Currently translated at 100.0% (3222 of 3222 strings)

[CI skip]

* MySQL allows precision to be specified for DATETIME, TIME type fields too

Fix phpmyadmin#12814

Ref : http://dev.mysql.com/doc/refman/5.7/en/fractional-seconds.html

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

* ChangeLog for phpmyadmin#12814

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

* Share code for cascading ajax flag

Signed-off-by: Michal Čihař <michal@cihar.com>

* Get response instance just once

Signed-off-by: Michal Čihař <michal@cihar.com>

* Register shutdown directly on singleton instance

This avoids additional call in the shutdown handler.

Signed-off-by: Michal Čihař <michal@cihar.com>

* Simplify checking for ajax request

Signed-off-by: Michal Čihař <michal@cihar.com>

* Include token in all filter requests

Fixes phpmyadmin#12786

Signed-off-by: Michal Čihař <michal@cihar.com>

* Fix documentation markup

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>

* Hints about using Composer for library dependencies

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>

* Use documentation link instead of wiki for Composer details

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>

* Uncomment mistakenly commented Selenium testing setting

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

* Translated using Weblate (Spanish)

Currently translated at 100.0% (3222 of 3222 strings)

[CI skip]

* Translated using Weblate (Spanish)

Currently translated at 99.8% (3234 of 3239 strings)

[CI skip]

* Remove .htaccess from tests

Issue phpmyadmin#12348

Signed-off-by: Michal Čihař <michal@cihar.com>

* Add source release support

See phpmyadmin#12348

Signed-off-by: Michal Čihař <michal@cihar.com>

* Share code for rendering custom header and footer

Fixes phpmyadmin#12802

Signed-off-by: Michal Čihař <michal@cihar.com>

* Fix empty password login for http authetication

Fixes phpmyadmin#12828

Signed-off-by: Michal Čihař <michal@cihar.com>

* Honor user configured connection collation

* the user set collation is now honored
* default value has been changed to utf8mb4
* it is downgraded to utf8 if server does not support it

Fixes phpmyadmin#12826

Signed-off-by: Michal Čihař <michal@cihar.com>

* Fix HTTP auth test expectations

Signed-off-by: Michal Čihař <michal@cihar.com>

* Remove default value for js parameter

The null is there implicitely anyway.

Fixes phpmyadmin#12829

Signed-off-by: Michal Čihař <michal@cihar.com>

* Add some missing html encoding

Issue phpmyadmin#12804

Signed-off-by: Michal Čihař <michal@cihar.com>

* Feature: phpmyadmin#12069: Filtering tables on table listing of particular database.

Signed-off-by: Yunus Çağrı <ycagriyurdakul@gmail.com>

* Feature: phpmyadmin#12069: Filtering tables on table listing of particular database.

Signed-off-by: Yunus Çağrı <ycagriyurdakul@gmail.com>

* Determine whether to use openssl just once

Issue phpmyadmin#12293

Signed-off-by: Michal Čihař <michal@cihar.com>

* Correctly report OpenSSL errors from cookie encryption

Without calling openssl_error_string() we pollute openssl global state
and some other library might report this as failure (eg. mysqlnd driver
when connecting to SSL enabled server).

Fixes phpmyadmin#12293

Signed-off-by: Michal Čihař <michal@cihar.com>

* Use same encryption key with openssl and phpseclib

Issue phpmyadmin#12293

Signed-off-by: Michal Čihař <michal@cihar.com>

* Test both with and without phpseclib

This ensures we generate compatible data in both cases.

Issue phpmyadmin#12293

Signed-off-by: Michal Čihař <michal@cihar.com>

* Use Header class for headers manipulation

* Added mocking of response object
* Rectified mistake of calling method once
* implemented mock properly
* replaced header with response header 

Issue phpmyadmin#12079

Signed-off-by: Osaid osaid.nasir@gmail.com

* Inline javascript codes are removed. Each is used for table search

Signed-off-by: Yunus Çağrı <ycagriyurdakul@gmail.com>

* Update db_structure.js

* Tab spaces are removed.

Signed-off-by: Yunus Çağrı <ycagriyurdakul@gmail.com>

* Unbind event on page unload

Issue phpmyadmin#12838, phpmyadmin#12069

Signed-off-by: Michal Čihař <michal@cihar.com>

* Use existing filtering template for table filtering

Issue phpmyadmin#12838, phpmyadmin#12069

Signed-off-by: Michal Čihař <michal@cihar.com>

* Changelog for issues phpmyadmin#12838 and phpmyadmin#12069

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel
Copy link
Contributor
nijel commented Jan 20, 2017

Can you please specify error you get?

It currently loads just fine for me on standard database with dozen of tables. It does however fail horribly when database and/or table name contains special chars such as ".

@ibennetch
Copy link
Member Author

Looking at the source view through Chrome's Developer Tools lets me see the error:

Notice in ./templates/database/designer/js_fields.phtml#5
Undefined index: token

Backtrace

./libraries/Template.php#152: include(./templates/database/designer/js_fields.phtml)
./libraries/db_designer.lib.php#152: PMA\libraries\Template->render(array)
./db_designer.php#145: PMA_getHtmlForJSFields(
array,
array,
array,
integer -1,
)

Additional notes I've discovered while looking at it:

Chrome's JavaScript console shows: Invalid JSON!Unexpected token < in JSON at position 0 in get_scripts.js.php:1192

Firefox has a similar message but different line number: "Invalid JSON!JSON.parse: unexpected character at line 1 column 1 of the JSON data get_scripts.js.php:479:21"

Here is what I see:
screen shot 2017-01-20 at 8 19 42 am

After clicking the "Report" button:
screen shot 2017-01-20 at 8 18 52 am

Firefox acts pretty much the same, except when I click Report I get a message that "An error has been detected and an error report has been generated but but failed to be sent..."

I have no idea if it's related, but in the Network tab (on Firefox), I'm seeing a few 302 "not found" messages to db_designer.php. For each, the Operation is "save_setting_value" and the indexes are: angular_direct, snap_to_grid, and relation_lines.

@ibennetch
Copy link
Member Author

What I really don't understand is why you're not seeing the same problem that I'm able to reproduce consistently across different sessions, servers, and browsers.

@nijel nijel modified the milestones: 4.7.0, 4.6.6 Jan 20, 2017
@nijel
Copy link
Contributor
nijel commented Jan 20, 2017

@ibennetch Is that on master or QA_4_6? I can see these errors on master, but not on QA_4_6.

... Reading your report again this was about master, but I've found different issue on QA_4_6 and moved it. I've adjusted the milestone accordingly.

@ibennetch
Copy link
Member Author

That was with master, and from what I recall I haven't had any of these problems with QA_4_6.

@ibennetch ibennetch changed the title Designer is broken, can't read error message Designer is broken Jan 29, 2017
ibennetch added a commit to ibennetch/phpmyadmin that referenced this issue Jan 30, 2017
Fixes phpmyadmin#12804

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
@nijel nijel self-assigned this Feb 13, 2017
@nijel nijel closed this as completed in bca2e1c Feb 13, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 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
None yet
Development

No branches or pull requests

2 participants