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

Column selector "See more" removes "Preview SQL" and "Save" area #14310

Closed
refreshdev opened this issue May 20, 2018 · 12 comments
Closed

Column selector "See more" removes "Preview SQL" and "Save" area #14310

refreshdev opened this issue May 20, 2018 · 12 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
Projects
Milestone

Comments

@refreshdev
Copy link

Steps to reproduce

  1. Add more than 25 central columns so the "See more" link appears
  2. In the structure edit screen, click "Pick from Central Columns"
  3. Click "See more" in the "Column selector"
  4. The blue "Preview SQL" and "Save" section is now gone and saving the structure is not possible

Expected behaviour

The blue "Preview SQL" and "Save" section should not disappear

Actual behavior

The blue "Preview SQL" and "Save" section disappears

Server configuration

Operating system:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

Web server:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-04-18T14:53:04

Database:
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper

PHP version:
PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )

phpMyAdmin version:
phpMyAdmin 4.5.4.1

Client configuration

Browser:
Google Chrome 66.0.3359.181 (Official Build) (64-bit)

Operating system:
Edition Windows Pro 10
Version 1803
OS Build 17134.48

phpmyadmin-1
phpmyadmin-2
phpmyadmin-3

@williamdes
Copy link
Member

Confirmed in 5.0.0-dev

$('#seeMore').on('click', function () {

phpmyadmin/js/functions.js

Lines 3606 to 3608 in 447f7ae

if (result_pointer === list_size) {
$('.tblFooters').hide();
}

.tblFooters is the class for the "Preview SQL" and "Save" section.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Nov 27, 2018
@williamdes williamdes added this to to be fixed soon in issues Apr 29, 2019
@thesmallstar
Copy link
Contributor

@williamdes Can I work on this?

@williamdes
Copy link
Member

@thesmallstar Yes, please use QA_5_0 as base and feel-free to ask questions ;)

@thesmallstar
Copy link
Contributor

@williamdes, does removing the $('.tblFooters').hide(); statement solve this issue?
also, I was wondering if does not provide any functionality why was it added in the first place, am I missing something?

@williamdes
Copy link
Member

Thank you for searching for this issue
Can you please post the link to the file you found that line ?

@thesmallstar
Copy link
Contributor

Confirmed in 5.0.0-dev

$('#seeMore').on('click', function () {

phpmyadmin/js/functions.js

Lines 3606 to 3608 in 447f7ae

if (result_pointer === list_size) {
$('.tblFooters').hide();
}

.tblFooters is the class for the "Preview SQL" and "Save" section.

I was referring to this comment.

@williamdes
Copy link
Member

Okay, then we can remove the line :)

@williamdes
Copy link
Member

Or fix the implementation

@thesmallstar
Copy link
Contributor

@williamdes okay thank you, I am looking into the best possible solution.

@thesmallstar
Copy link
Contributor

thesmallstar commented Jan 10, 2020

@williamdes I was trying to reproduce the issue, I got a fatal javascript error on clicking
Pick from Central Columns button, does this work for you? Am I Missing something?
I am attaching the error details.

details

image

{
    "pma_version": "5.0.1-dev",
    "browser_name": "CHROME",
    "browser_version": "79.0.3945.117",
    "user_os": "Win",
    "server_software": "Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.9",
    "user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36",
    "locale": "en",
    "configuration_storage": "enabled",
    "php_version": "7.2.9",
    "script_name": "tbl_structure.php",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "TypeError",
        "message": "Cannot read property 'length' of undefined",
        "stack": [
            {
                "line": "292",
                "func": "",
                "context": [
                    "            if (lastException === ex) {\r",
                    "                processLastException();\r",
                    "            }\r",
                    "        }, (stack.incomplete ? 2000 : 0));\r",
                    "\r",
                    "        throw ex; // re-throw to propagate to the top level (and cause wind//...",
                    "    }\r",
                    "\r",
                    "    report.subscribe = subscribe;\r",
                    "    report.unsubscribe = unsubscribe;\r",
                    "    return report;\r"
                ],
                "column": "",
                "uri": "js/vendor/tracekit.js?v=5.0.1-dev",
                "scriptname": "js/vendor/tracekit.js"
            },
            {
                "func": "HTMLAnchorElement.",
                "line": "3570",
                "column": "60",
                "context": [
                    "                },\r",
                    "                async:false\r",
                    "            });\r",
                    "        }\r",
                    "        var i = 0;\r",
                    "        var listSize = centralColumnList[db + '_' + table].length;\r",
                    "        var min = (listSize <= maxRows) ? listSize : maxRows;\r",
                    "        for (i = 0; i < min; i++) {\r",
                    "            fields += '
' +\r",
                    "                Functions.escapeHtml(centralColumnList[db + '_' + table][i]//...",
                    "                '
' + centralColumnList[//..."
                ],
                "uri": "js/functions.js?v=5.0.1-dev",
                "scriptname": "js/functions.js"
            },
            {
                "func": "HTMLAnchorElement.newFunc",
                "line": "267",
                "column": "33",
                "context": [
                    "     */\r",
                    "    wrapFunction: function (func) {\r",
                    "        if (!func.wrapped) {\r",
                    "            var newFunc = function () {\r",
                    "                try {\r",
                    "                    return func.apply(this, arguments);\r",
                    "                } catch (x) {\r",
                    "                    TraceKit.report(x);\r",
                    "                }\r",
                    "            };\r",
                    "            newFunc.wrapped = true;\r"
                ],
                "uri": "js/error_report.js?v=5.0.1-dev",
                "scriptname": "js/error_report.js"
            },
            {
                "func": "HTMLDocument.dispatch",
                "line": "2",
                "column": "42571",
                "context": [
                    "/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/l//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.0.1-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "HTMLDocument.$event.dispatch",
                "line": "374",
                "column": "19",
                "context": [
                    "$event.dispatch = function( event ){\r",
                    "\tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){\r",
                    "\t\t$.removeData( this, \"suppress.\"+ event.type );\r",
                    "\t\treturn;\r",
                    "\t}\r",
                    "\treturn $dispatch.apply( this, arguments );\r",
                    "};\r",
                    "\r",
                    "// event fix hooks for touch events...\r",
                    "var touchHooks = \r",
                    "$event.fixHooks.touchstart = \r"
                ],
                "uri": "js/vendor/jquery/jquery.event.drag-2.2.js?v=5.0.1-dev",
                "scriptname": "js/vendor/jquery/jquery.event.drag-2.2.js"
            },
            {
                "func": "HTMLDocument.v.handle",
                "line": "2",
                "column": "40572",
                "context": [
                    "/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/l//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.0.1-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            }
        ],
        "incomplete": "false",
        "partial": "true",
        "uri": "tbl_structure.php?"
    }
}

@yashrajbothra
Copy link
Contributor

Hey @thesmallstar I think maybe you are talking abt this. #15741

@williamdes
Copy link
Member

Yes, I renamed it to make it obvious

@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 Jan 13, 2020
@williamdes williamdes self-assigned this Jan 13, 2020
@williamdes williamdes added this to the 5.0.2 milestone Jan 13, 2020
williamdes added a commit that referenced this issue Jan 13, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Jan 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 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 has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants