liuch / dmarc-srg

A php parser, viewer and summary report generator for incoming DMARC reports.
GNU General Public License v3.0
218 stars 32 forks source link

List filter not working #6

Closed fingerprn closed 3 years ago

fingerprn commented 3 years ago

Filter feature isn't working on the Report List. When I click on it, the modal pops up, but the options are grayed out and it says "Error!".

Firefox console says "Failed to get a list of domains" on list.js:486:12

I checked and line 486 is about the error message, so that's not helpful.

I also tried it on Chrome and had the same problem with the same warning message.

liuch commented 3 years ago

It's very strange. Could you add this: throw $e; right before the line with text 'Failed to get a list of domains' in the file classes/Report/ReportList.php (line 389), and show me what the console of your browser says? The code must look like this:

        } catch (Exception $e) {
            throw $e;
            throw new Exception('Failed to get a list of domains', -1);
        }

And thank you for your report!

fingerprn commented 3 years ago

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'r.date' which is not in SELECT list; this is incompatible with DISTINCT

I'm using MySQL 5.7.35

liuch commented 3 years ago

I took a try to fix this issue with https://github.com/liuch/dmarc-srg/commit/a7d218a834d5633f6a052fa64b5d0ee73dee016b. Could you check it?

fingerprn commented 3 years ago

It's working great! Thanks!