Advanced Traffic Statistics: Live Radar, WAF & AI Security

Advanced Traffic Statistics: Live Radar, WAF & AI Security 1.8.3

No permission to download
I use the Brave browser. Yes, the auto-translate setting is on. I disabled it and refreshed with no change in appearance. I run Windows 11 Pro (26200.7922). I have not edited any templates. Thanks.

ETA: I downloaded Firefox and it has the same problem.


View attachment 334671
Depending on your server's PHP configuration, cache, or if an HTML minifier is active, XenForo's template compiler can mishandle that line-break, breaking the HTML tag and causing it to spill out as plain text.

I have completely cleaned up and reformatted the code, and I also forced a translate="no" attribute on those specific elements to prevent any future issues with browser extensions.

I have attached a ZIP file with the updated templates. Could you please test them on your board?

How to apply the test templates:

  1. Download and extract the attached .zip file.
  2. Go to your XenForo Admin Control Panel -> Appearance -> Templates.
  3. Search for the statistiche_pagina_report template, open it, delete all the existing code, and paste the entire code from the corresponding text file. Click Save.
  4. Do the exact same thing for the statistiche_widget_sidebar template.
  5. Refresh your front-end page (you might need to clear your forum/Cloudflare cache) and check if the chart displays correctly.
How to revert the changes:If you don't notice any differences or simply want to undo the manual edit, it's very easy to roll back. Just go back to the Template search, open the modified template, and click the Revert button (usually located at the top or bottom of the editor). This will instantly restore the default code from the current add-on version.

Let me know how it goes! Your feedback is highly appreciated so I can include this fix globally in the upcoming 1.8.2 release."
 

Attachments

Depending on your server's PHP configuration, cache, or if an HTML minifier is active, XenForo's template compiler can mishandle that line-break, breaking the HTML tag and causing it to spill out as plain text.

I have completely cleaned up and reformatted the code, and I also forced a translate="no" attribute on those specific elements to prevent any future issues with browser extensions.

I have attached a ZIP file with the updated templates. Could you please test them on your board?

How to apply the test templates:

  1. Download and extract the attached .zip file.
  2. Go to your XenForo Admin Control Panel -> Appearance -> Templates.
  3. Search for the statistiche_pagina_report template, open it, delete all the existing code, and paste the entire code from the corresponding text file. Click Save.
  4. Do the exact same thing for the statistiche_widget_sidebar template.
  5. Refresh your front-end page (you might need to clear your forum/Cloudflare cache) and check if the chart displays correctly.
How to revert the changes:If you don't notice any differences or simply want to undo the manual edit, it's very easy to roll back. Just go back to the Template search, open the modified template, and click the Revert button (usually located at the top or bottom of the editor). This will instantly restore the default code from the current add-on version.

Let me know how it goes! Your feedback is highly appreciated so I can include this fix globally in the upcoming 1.8.2 release."
Yes, these worked. Also, I needed to change the word visite to visits again. Just search and replace. Thanks!
 
Supergatto updated Advanced Traffic Statistics: Live Radar & WAF Security with a new update entry:

Update 1.8.2 - The Age of Artificial Intelligence

✨ NEW KEY FEATURES

🤖 AI Security Analyst (AI Radar)

Automated Daily Reports: Every night at 12:30 AM (UTC), the add-on collects the day's traffic data (humans, legitimate bots, blocked threats) and securely sends it to the AI (based on Google Gemini 2.5 Flash).

Advanced Forensic Analysis: The AI doesn't simply summarize the numbers; it thoroughly examines a sample of the last 200 connections to uncover suspicious patterns, aggressive scraping bots (e.g., HeadlessChrome), unauthorized AI...

Read the rest of this update entry...
 
Love the new update.

A couple small bugs I noticed.

Report page:
- The Statistics (overview) block, right side. The members count is off by one (1) added to the count. (edit to add: I just did a complete recount of all accounts in all states, and the only reason that the count could be accurate is if it also counts members awaiting confirmation at registration. I have one user that never confirmed. That's why I ask.)

Widget & Reports page:
- I notice I had a TOR visitor today and it logged as a country code "T1". If it is intended to be logged as a TOR "country" it needs an image for the flag displays. Right now the broken image displays in the flag cell on the widget and reports page.
 
Last edited:
Love the new update.

A couple small bugs I noticed.

Report page:
- The Statistics (overview) block, right side. The members count is off by one (1) added to the count. (edit to add: I just did a complete recount of all accounts in all states, and the only reason that the count could be accurate is if it also counts members awaiting confirmation at registration. I have one user that never confirmed. That's why I ask.)

Widget & Reports page:
- I notice I had a TOR visitor today and it logged as a country code "T1". If it is intended to be logged as a TOR "country" it needs an image for the flag displays. Right now the broken image displays in the flag cell on the widget and reports page.
"Thank you so much for the feedback and for loving the update!

Regarding the two points you noticed:

1. Member Count:The widget reads the official native XenForo cache (forumStatistics) to perfectly match your default forum stats block. If you see a discrepancy of 1, it's usually because XenForo's internal cache hasn't fully cleared a user who is in 'awaiting email confirmation' or 'rejected' state. Running the "Rebuild Board Totals" tool in your Admin CP should instantly resync XenForo's native cache and align the numbers!

2. TOR "T1" Flag Issue:This is a brilliant catch! Cloudflare natively assigns the pseudo-country code "T1" to all traffic originating from the TOR network. Since "T1" isn't a real country, XenForo doesn't have a matching flag sprite for it, resulting in the broken image. We will add a rule in the next patch to intercept "T1" and convert it to the default "Unknown" globe icon.

Thanks again for helping us polish the add-on!"
 
I am interested in this addon and downloaded the package and tried to install it.

There was an error message about the UTF code and the process did not complete.

Here is the error report
Code:
[LIST]
[*]XF\Db\Exception: Batch install error: MySQL query error [3988]: Conversion from collation utf8mb3_general_ci into utf8mb4_unicode_ci impossible for parameter
[*]src/XF/Db/AbstractStatement.php:225
[*]Generated by: Tom McIntyre
[*]Mar 10, 2026 at 5:01 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO `xf_phrase` (`addon_id`, `title`, `version_id`, `version_string`, `language_id`, `global_cache`, `phrase_text`, `phrase_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL query err...', 3988, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(83): XF\Db\Mysqli\Statement->getException('MySQL query err...', 3988, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(219): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1578): XF\Db\AbstractAdapter->insert('xf_phrase', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1306): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/AddOn/DataType/Phrase.php(102): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Job/AddOnData.php(111): XF\AddOn\DataType\Phrase->importAddOnData('Statistiche', Object(SimpleXMLElement), 0, 7.99253)
#8 src/XF/Job/AddOnInstallBatch.php(343): XF\Job\AddOnData->run(7.99253)
#9 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer))
#10 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#11 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#12 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#13 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#14 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#16 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#17 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#19 src/XF.php(814): XF\App->run()
#20 admin.php(15): XF::runApp('XF\\Admin\\App')
#21 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(44) "https://mb.nawcc.org/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(81) "https://mb.nawcc.org/admin.php?add-ons/install-from-archive-complete&batch_id=209"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(15) "1344659,1344662"
  }
}
Delete
We are running XenForo 2.3.9
 
I am interested in this addon and downloaded the package and tried to install it.

There was an error message about the UTF code and the process did not complete.

Here is the error report
Code:
[LIST]
[*]XF\Db\Exception: Batch install error: MySQL query error [3988]: Conversion from collation utf8mb3_general_ci into utf8mb4_unicode_ci impossible for parameter
[*]src/XF/Db/AbstractStatement.php:225
[*]Generated by: Tom McIntyre
[*]Mar 10, 2026 at 5:01 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO `xf_phrase` (`addon_id`, `title`, `version_id`, `version_string`, `language_id`, `global_cache`, `phrase_text`, `phrase_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL query err...', 3988, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(83): XF\Db\Mysqli\Statement->getException('MySQL query err...', 3988, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(219): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1578): XF\Db\AbstractAdapter->insert('xf_phrase', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1306): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/AddOn/DataType/Phrase.php(102): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Job/AddOnData.php(111): XF\AddOn\DataType\Phrase->importAddOnData('Statistiche', Object(SimpleXMLElement), 0, 7.99253)
#8 src/XF/Job/AddOnInstallBatch.php(343): XF\Job\AddOnData->run(7.99253)
#9 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer))
#10 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#11 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#12 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#13 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#14 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#16 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#17 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#19 src/XF.php(814): XF\App->run()
#20 admin.php(15): XF::runApp('XF\\Admin\\App')
#21 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(44) "https://mb.nawcc.org/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(81) "https://mb.nawcc.org/admin.php?add-ons/install-from-archive-complete&batch_id=209"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(15) "1344659,1344662"
  }
}
Delete
We are running XenForo 2.3.9
Hi Tom, thank you for reporting this!

The error was caused by a character encoding conflict: the special "block" characters used in the new AI report phrases were not compatible with certain database collations.

I have just released version 1.8.3, which replaces those symbols with standard characters to ensure a smooth installation and full compatibility across all server setups.

Please download the update and let me know if everything works correctly now!
 
Supergatto updated Advanced Traffic Statistics: Live Radar, WAF & AI Security with a new update entry:

Update 1.8.3 - Maintenance & Compatibility Release

🛠️ FIXES & IMPROVEMENTS
  • 🌍 Improved GeoIP handling (TOR Network):
    • Fixed a bug where visitors originating from the TOR network (via Cloudflare's "T1" code) would display a broken image instead of a flag.
    • These connections are now correctly mapped to the default "Unknown" icon to maintain a clean UI.
  • 💾 Database Compatibility (MySQL Fix):
    • Fixed a critical installation error (MySQL query error 3988) that occurred on servers with...

Read the rest of this update entry...
 
Widget & Reports page:
- I notice I had a TOR visitor today and it logged as a country code "T1". If it is intended to be logged as a TOR "country" it needs an image for the flag displays. Right now the broken image displays in the flag cell on the widget and reports page.
Fix applied in release 1.8.3
 
  • Like
Reactions: CTS
I downloaded the new release and was not sure what to do about the broken incomplete installation, so I selected the option to delete files. I expected this warning notice to go away, but it did not.

One or more add-ons currently have actions pending and may be in an inconsistent state. Because of this, some errors may be suppressed and unexpected behavior may occur. If this does not change shortly, please contact the add-on author for guidance.

I would welcome a suggestion.
 
I downloaded the new release and was not sure what to do about the broken incomplete installation, so I selected the option to delete files. I expected this warning notice to go away, but it did not.



I would welcome a suggestion.
Hi!


Don't worry, your forum is perfectly fine. This is a very common XenForo safety behavior.


When an installation is interrupted and files are manually deleted, XenForo gets stuck in a "pending action" state because it needs the add-on files (specifically the Setup.php file) to properly cancel or finish the process in the database.


I have just released version 1.8.3. You can use this new release to easily unblock your situation. Here is what you need to do:


  1. Upload the new version: Upload the 1.8.3 release via the "Install/upgrade from archive" button (or via FTP). This will put the necessary files back on your server.
  2. Clear the pending action: Go to your Admin Control Panel -> Add-ons. The warning might already be gone. If it is still there, click on the gear icon next to the add-on. Because the files are now restored, XenForo will finally let you select "Cancel" or "Upgrade" without throwing errors.
  3. Complete the upgrade: If you clicked Cancel, you can now safely click "Install/Upgrade" to cleanly install the 1.8.3 version.

Let me know if this clears the warning and gets you up and running!
 
The gear icon does not appear with the new addon but rather the install action. I tried to install, but get this error.

Add-on batch result​

One or more of the add-ons in this batch failed to install/upgrade. Click or hover over the error icon to view details of the error.
Advanced Traffic Statistics Error1.8.2
[th]Add-on[/th][th]Action[/th][th]Version[/th]

I will try deleting the files from the Admin CP and try again. The version I just downloaded and installed was your current 1.8.3 version.
 
I get the same results.
I have quite a few addons installed so there may be a conflict with some other addon.

Add-on batch result​

One or more of the add-ons in this batch failed to install/upgrade. Click or hover over the error icon to view details of the error.
Advanced Traffic Statistics Error1.8.2
[th]Add-on[/th][th]Action[/th][th]Version[/th]

When I hover over the error I see the same mysql 3988 error as before.
 
I get the same results.
I have quite a few addons installed so there may be a conflict with some other addon.

Add-on batch result​

One or more of the add-ons in this batch failed to install/upgrade. Click or hover over the error icon to view details of the error.

Advanced Traffic StatisticsError1.8.2
[th]Add-on[/th][th]Action[/th][th]Version[/th]

When I hover over the error I see the same mysql 3988 error as before.
Hi!

Thank you for the update. The MySQL 3988 error is a specific database restriction related to how your MySQL server handles transactions when there is a mismatch in table collations (e.g., mixing utf8mb4_general_ci and utf8mb4_unicode_ci) or when "GTID mode" is enabled on your server.

Since the automated web-installer is getting blocked by this MySQL safety check, the best way to bypass it and complete the upgrade is using the XenForo Command Line (CLI). The CLI bypasses certain web-server timeouts and transaction locks.

Please follow these steps:

  1. Access your server via SSH (using Terminal or PuTTY).
  2. Navigate to your XenForo root directory (where the cmd.php file is located).
  3. Run the following command:php cmd.php xf:addon-upgrade Statistiche
  4. Follow the on-screen prompts.
If the command above still shows the error, you can try to force it by running:php cmd.php xf:run-jobs

Running the upgrade via CLI usually resolves 99% of these MySQL transaction errors because it executes the queries in a different environment than the web browser. Let me know if the CLI command completes the process!
 
I tried this approach, but it seems to be beyond my skill level.

Wouldn't it be better to just upgrade my system software to the level needed? We have our own server on KnownHost and my system consultant should be able to install a later database. Our PHP needs an upgrade in any case.
 
Thanks to the insights obtained from the Radar, we slammed the door on this massive waste of resources.Here is the ideal, optimized robots.txt file for XenForo 2.3 that we highly recommend all administrators use (to be placed in the main root directory of your server):
Looks like they stopped obeying robots.txt on my site. The robots.txt additions you recommended worked up till today. But now I am getting hit by hundreds a day again starting this afternoon from many countries and IPs.


Edit to add:
Strange thing happened and reflected in the 7 day and 30 day charts. Like I said above. Then I hit the UTC rollover, the charts went to the next day. But the charts 2 recent day totals are less than the current online count. And the charts no longer showed the 1000+ style-variation bot hits now. Although logged as human. Not in the new day or the yesterday. They now just reflect my normal average traffic counts. Just seems odd behavior. But the style-variation issue has got to be the culprit.
 
Last edited:
Looks like they stopped obeying robots.txt on my site. The robots.txt additions you recommended worked up till today. But now I am getting hit by hundreds a day again starting this afternoon from many countries and IPs.


Edit to add:
Strange thing happened and reflected in the 7 day and 30 day charts. Like I said above. Then I hit the UTC rollover, the charts went to the next day. But the charts 2 recent day totals are less than the current online count. And the charts no longer showed the 1000+ style-variation bot hits now. Although logged as human. Not in the new day or the yesterday. They now just reflect my normal average traffic counts. Just seems odd behavior. But the style-variation issue has got to be the culprit.
Hi!

What you are experiencing is unfortunately becoming the "new normal" for many webmasters. Here is a breakdown of what is happening:

  1. Robots.txt is not a firewall: The robots.txt file is just a set of "polite suggestions." While Google and Bing follow them, many modern AI scrapers and aggressive bots are programmed to ignore them completely. If they stopped obeying it today, it means they are now using rotated IPs and fake "Human" User-Agents to bypass your basic blocks.
  2. Human vs Bot detection: The reason you see them logged as humans is that they are successfully spoofing real browser signatures. Our "Radar" is doing its job by showing you this massive waste of resources that would otherwise remain invisible in standard XenForo logs.
  3. Chart behavior and UTC rollover: When the UTC rollover happens, XenForo's cron job aggregates the data. If the numbers seem to "correct" themselves or look lower than the real-time count, it's often because the aggregation logic filters out certain types of rapid-fire hits or because the specific "Style-Variation" attack creates thousands of temporary sessions that don't always translate into a single "unique visitor" in the daily report.
  4. The "Style-Variation" culprit: You are spot on. This specific bot behavior (hitting different style variations) is a known technique to stress-test the server cache and database.
What to do next:Since they are ignoring the robots.txt, the only way to stop them is at the Server/Firewall level (like Cloudflare or ModSecurity)

Thank you for these insights—they are invaluable for our ongoing development of the bot-detection engine!
 
  • Like
Reactions: CTS
I tried this approach, but it seems to be beyond my skill level.

Wouldn't it be better to just upgrade my system software to the level needed? We have our own server on KnownHost and my system consultant should be able to install a later database. Our PHP needs an upgrade in any case.
Hi!

That is actually a fantastic idea. If you have a system consultant and your own server on KnownHost, upgrading your stack is the most professional and definitive way to solve this, rather than just patching the symptoms.

Upgrading PHP is highly recommended anyway (XenForo 2.3+ performs best on PHP 8.1, 8.2 or even 8.3).

Regarding the database, please tell your consultant specifically about the MySQL 3988 error and the collation mismatch. Here is what they should ideally do during the upgrade to ensure your forum runs perfectly:

  1. Standardize Collations: Ask them to convert all database tables to a consistent collation, preferably utf8mb4_unicode_ci (which is the XenForo 2.3 standard). This will permanently resolve the 3988 error.
  2. GTID Mode Check: If they use a cluster or replication, they should check the "GTID mode" settings, as that often triggers the transaction lock you experienced.
  3. PHP Upgrade: Moving to PHP 8.2 or 8.3 will provide a noticeable speed boost to your entire forum.
Once your consultant has standardized the database environment, you will be able to install and upgrade any add-on directly from the web interface without ever needing to touch the CLI (Command Line) again.

Please let me know once the upgrade is complete, and I'll be happy to help you finalize the add-on installation!
 
Back
Top Bottom