Closed muety closed 3 years ago
Ugh, getting javascript and PHP mixed up. :-)
Should be fixed in commit d81bfdd. Please test and report back.
Thanks for the quick reaction. The above error seems to be fixed now, but there are new ones now:
Warning: Undefined variable $domains in /var/www/storage/dmarc/dmarcts-report-viewer.php on line 303
Warning: Undefined variable $orgs in /var/www/storage/dmarc/dmarcts-report-viewer.php on line 304
Warning: Undefined variable $periods in /var/www/storage/dmarc/dmarcts-report-viewer.php on line 305
Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /var/www/storage/dmarc/dmarcts-report-viewer.php:113 Stack trace: #0 /var/www/storage/dmarc/dmarcts-report-viewer.php(305): html() #1 {main} thrown in /var/www/storage/dmarc/dmarcts-report-viewer.php on line 113
@muety, no problem.
The error seems to say that $periods is null which says to me that the SQL for that returns 0 rows, so there might be something going on with the database.
How many records do you have in your database? Is this a new install or have you used previous versions of dmarcts successfully?
Never mind, the database was indeed empty. Everything's working now. Thanks for your help!
Well, we helped each other!
Actually, testing dmarcts-viewer on an empty database is in my list of things to do, so I'd like to know what you mean by "empty": do you mean a database with no tables, or a database with tables but no records?
I know the former is the database state after you've created the database but haven't yet run dmarcts-parser for the first time. I thought that threw SQL errors from dmarcts-viewer.
However, I don't know (I guess I can test, too) if you can run the parser without a report present and end up with the database structure (i.e. tables with columns) but with no data.
Yes, so if I recall correctly, what I did was run the parser without any records being present on IMAP. The tables got created properly, but remained empty. Maybe it would be cool to have a placeholder message telling the user like "no data found" or so.
Thanks, that's good to know.
I hadn't realized the parser would create the tables without records, so I agree that the viewer should take this into account. It's now on my to do list.
I'm getting this error when trying to open the viewer.
I'm on PHP 8.0 with FPM.