Closed klarazetkin closed 2 years ago
Hey @klarazetkin, unfortunately, I'm not sure how to reproduce. What OS and browser are you using (including versions)?
Hi, @ankane! I'm using Ubuntu 20.04 and Version 101.0.4951.64 (Official Build) snap (64-bit). I tried blazer with Firefox Browser 100.0.2 (64-bit) and the bug reproduced. Should I try some other browser, just Chrome maybe?
Trying other browsers would be helpful (if you have any Firefox extensions installed, try disabling those as well). Also, it'd be good to see how the statement is stored in the database.
Blazer::Query.find(query_id).statement
Thank you, will try a different browser and will try disabling Firefox extensions. I probably should try to disable Chromium extensions as well, shouldn't I?
Also, it'd be good to see how the statement is stored in the database.
This query:
Looks this way in the database:
irb(main):019:0> Blazer::Query.find(query_id).statement
=> "SELECT AVG(avg_income) AS avg_income\r\nFROM (\r\n SELECT SUM(avg_income) AS avg_income\r\n FROM ad_units\r\n WHERE deleted_at IS NULL\r\n AND avg_income > 0\r\n GROUP BY publisher_id\r\n) AS earning_publishers_income"
The database value looks good, so seems like something else is causing it.
Cleaning up issues. Seems like it may be specific to your installation, but will be on the lookout for similar reports.
Hey-hey, sad to say, the issue remains. It's persistent with both Firefox and Chrome with all extensions disabled. Might it be connected to the way blazer is integrated into our application? Is there anything we can check on our side?
The problem is as follows. You write a query with formating.
Then you save or update the query. When you look at the saved query code it keeps formating.
But as soon as you start editing the query, the formating is dropped.
If a query is a complicated one, it's a pain. Very annoying. :(