#715 (ok 4.0) Activate codemirror in querywindow

closed-fixed
Marc Delisle
1
2013-05-09
2012-01-28
Eric Krona
No

Codemirror gets activated in querywindow to have the full effect of syntax highlightning in all places.

Discussion

  • Marc Delisle
    Marc Delisle
    2012-01-29

    Thanks for the patch.

    When I try it on master, it causes a problem: I can no longer submit a query (I get "Missing value in the form")

     
  • Marc Delisle
    Marc Delisle
    2012-01-29

    • status: open --> pending
     
  • Eric Krona
    Eric Krona
    2012-01-29

    I did the patch against last git master yesterday. How did you do it?

    This works for me:
    1. Browse a table
    2. Click edit for the query
    3. Add some where-argument to the query
    4. Click Go
    Works.

    I noticed the codemirror is not active when doing an inline edit as well, will see whats needed for that.

     
  • Marc Delisle
    Marc Delisle
    2012-01-30

    • status: pending --> open
     
  • Marc Delisle
    Marc Delisle
    2012-01-30

    • assigned_to: nobody --> lem9
     
  • Marc Delisle
    Marc Delisle
    2012-01-30

    I'm also testing with current master. Your scenario works for me too.

    What does not work for me is:
    1. click on a db name (not a table name)
    2. click on the query window icon from the navigation (left) panel
    3. enter a query like "select * from actor"
    4. click on Go

     
  • Eric Krona
    Eric Krona
    2012-01-30

    Ah, thanks for the testing, I'll fix that and get back with a new patch.

     
  • Eric Krona
    Eric Krona
    2012-02-03

    lem9, check patch query_window_codemirror_20120203.patch, it works for the scenario you describe as well. Thanks for testing.

     
  • Marc Delisle
    Marc Delisle
    2012-02-09

    • priority: 5 --> 1
    • summary: Activate codemirror in querywindow --> (ok 3.6) Activate codemirror in querywindow
    • status: open --> open-accepted
     
  • Marc Delisle
    Marc Delisle
    2012-02-09

    Your patch was merged in the repository, thanks.

     
  • Marc Delisle
    Marc Delisle
    2012-02-13

    • summary: (ok 3.6) Activate codemirror in querywindow --> (ok 4.0) Activate codemirror in querywindow
     
  • Marc Delisle
    Marc Delisle
    2012-02-14

    Eric,
    any progress on this?

     
  • Eric Krona
    Eric Krona
    2012-02-14

    I'm having trouble reproducing this, tried it on latest master from github as suggested in the wiki.
    Last commit is bfd24b8a24105c0b0744ae2fcbcfdae8c9434460

     
  • Marc Delisle
    Marc Delisle
    2012-02-14

    Hi Eric,
    with the latest master having the same last commit as you, I can reproduce under Firefox 9.0.1 (Windows XP) the problem mentioned by Alex:
    "some_database ->some_table -> SQL tab -> press go on the "Run SQL query/queries on database some_database" form
    nothing will happen, the form will not be submitted."

    Did you clear your browser's cache?

     
  • Eric Krona
    Eric Krona
    2012-02-14

    Hi again, quick reply! :)

    I tried this:
    "some_database(left frame) ->some_table(tried both left and right frame) -> SQL tab(at the top of the right frame, right?) -> press go on the "Run SQL
    query/queries on database some_database"

    Just tried it in Firefox 9.0.1(normally use chrome) on linux, emptied the cache first, but no luck. :/

    query/queries on database some_database

     
  • Marc Delisle
    Marc Delisle
    2012-02-14

    Yes, it's the SQL tab in the right frame. I can also reproduce the problem on http://demo.phpmyadmin.net/master login with root and no password, choose the sakila db, then the actor table, then click SQL on the right panel. The query appears, clicking on Go produces nothing but an error in Firebug.

     
  • Eric Krona
    Eric Krona
    2012-02-14

    Ah, found the problem. I noticed I've disabled ajax on my installation, Home -> Settings -> General -> Enable ajax.

    If you disable ajax the submit works, not much better though. At least I can reproduce it, let me check if a fix is simple. :)

     
  • Eric Krona
    Eric Krona
    2012-02-14

    New patch posted that fixes the problem, fixed-ajax-querywindow-codemirror-problem-20120214.patch

     
  • Marc Delisle
    Marc Delisle
    2012-02-15

    New patch accepted, thanks.

     
  • Michal Čihař
    Michal Čihař
    2013-05-09

    • Status: open-accepted --> closed-fixed