Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/26/2026 in Posts

  1. NativeAnalytics v1.0.23 released Finaly! This release brings full theme-adaptive UI support - the dashboard now natively follows the active ProcessWire admin theme, including automatic light/dark mode switching via Konkat's CSS custom properties. What's new: Automatic light/dark mode - panels, tables, charts, filters, tooltips and sub-tabs all adapt to the active color scheme and more ... Grab it from the repo and let me know how it looks on your setups! Thanks to @matjazp for the nudge to make this dark-mode friendly - more and more people are using dark themes these days, so it really had to be done. Took longer than I thought it would ... Cheers R
    4 points
  2. Now available in the Modules directory at https://processwire.com/modules/chat-ai/ and on gitHub at https://github.com/clipmagic/ChatAI What is it? ChatAI is a native ProcessWire AI chatbot module designed to answer questions about your site content, with a focus on: ProcessWire-first workflows Site-aware answers using RAG (Retrieval Augmented Generation) Respect for ProcessWire access control rule Admin visibility into usage and performance Keeping content ownership within ProcessWire Features include AI chat widget for frontend use RAG indexing of ProcessWire content Multi-role message support (system / assistant / user) Admin dashboard with metrics and observations Configurable prompts and behaviour Integration with AgentTools for model selection Role-aware retrieval (users only see content they can access) Frontend page restrictions Dictionary / weighting support for retrieval tuning Quick Start Ensure prereqs are installed, ie: PHP>=8.0, ProcessWire>=3.0.255, AgentTools>=0.1.1, TextformatterEntities, TextformatterNewlineBR Configure your chat LLM in AgentTools Configure your textembedder LLM in AgentTools Configure ChatAI module config with both the above Go to Setup->ChatAI and index your site pages (turn off Dry Run when you're ready). Add the CSS, Script and Widget to your template(s). After that, tweak to your heart's content, including adding languages, widget theming and prompts. Current status: Alpha Test thoroughly before using on live sites. Feedback welcome.
    2 points
  3. This week in the core, dev branch updates were largely focused on API documentation, with several minor core bug fixes (via WireTests) resolved during the at the same time. We also have new versions of the AgentTools and WireTests modules released this week as well. Core New: API.md documentation files (for agents and us): $classLoader / WireClassLoader — covers namespace registration, class maps, prefix/suffix path fallbacks, and findClassFile() for debugging (view) $datetime / WireDateTime — covers all public methods including date formatting, string-to-timestamp conversion, and relative/elapsed time output, with live-tested examples (view) $log / WireLog — covers save(), message(), warning(), error(), reading with getEntries()/getLines(), pruning, deleting, and built-in log names (view) $notices / Notices — covers adding notices, Notice flags (including string names), iterating, filtering with viewable(), hasErrors(), hasWarnings(), rendering, and Notice properties (view) $fields / Fields and Field — covers getting, creating, saving, cloning, tagging, flag constants, and field methods; (view) $fieldgroups / Fieldgroups and Fieldgroup — covers field membership, template relationships, and field context (view) $templates / Templates, Template, and TemplateFile — three separate API.md files covering the templates manager, the Template object in full, and the TemplateFile rendering class (View: Templates, Template, and TemplateFile). AgentTools module In AgentTools admin, you'll find a new "Tasks" feature. This lets you create your own custom tasks, which are essentially saved prompts that you can reuse and configure. The system also comes with several built-in tasks, including: WCAG accessibility review: Review templates and representative content for common accessibility issues. Recent log review: Scan ProcessWire logs for recent errors, suspicious activity, and operational issues. Migration review: Review pending AgentTools migrations before they are applied. SEO and content hygiene review: Review site structure and representative content for SEO/content quality issues. Template file security scan: Scan template files for common security risks in output, selectors, and request handling. A shared animated processing overlay UI was also added, used by both AgentTools and Page Engineer. (Try it!). Probably only of interest to agents, but more tools were made available via the CLI, which helps out with Engineer requests, as well as AI agents that you may have available on your localhost dev environment. WireTests module New comprehensive tests added to WireTests for the following API variables: WireClassLoader ($classLoader) User and Users ($user and $users) Role and Roles ($roles) Permission and Permissions ($permissions) WireDateTime ($datetime) See the full list of included tests (so far) Thanks for reading and have a great weekend!
    2 points
  4. Sorry about that @Robin S - I had checked file downloads with the new version, but not using PW's $files->send. I tested with your example above and it's working again in the latest version. Please let me know if you notice any issues. I think it's really nice having actions run in the background now so that aren't subject to any time limits, but it has complicated things.
    2 points
  5. @Roych dark mode looks amazing. This is turning out to be a stellar addition to PW. Thanks for your grind.
    2 points
  6. Hi everyone, Every web page has a carbon footprint. Most developers have no idea what it is. This module measures it. GitHub: https://github.com/mxmsmnv/PageCarbon What it does Tracks response size, PHP execution time, and peak memory per front-end request, then estimates CO₂ using the Sustainable Web Design Model v4 (Wholegrain Digital, 2024). Results appear in a dashboard under Setup → PageCarbon. Admin dashboard: Per-page ratings: 🟢 A (< 100 mg) / 🟡 B / 🟠 C / 🔴 D (≥ 700 mg) 24-hour hourly CO₂ bar chart Top 50 pages by average CO₂ with exec time, response size, and hit count Real-world analogies - all-time total translated into 12 everyday equivalents: car km driven, espressos brewed, Netflix hours, Google searches, short-haul flights, trees needed for a year, and more DOCX export - zero-dependency, pure PHP via ZipArchive Screenshot: Performance-first architecture: WireCache buffer - metrics accumulate in memory, batch INSERT once per hour (zero per-request DB writes) Bot sampling - only 1-in-N bot requests recorded, human requests always in full 90-day raw retention with permanent hourly aggregates - historical data never lost Frontend API: $pc = $modules->get('PageCarbon'); echo $pc->renderBadge($page); // full card echo $pc->renderBadge($page, 'compact'); // single-line pill $stats = $pc->getStats($page); // avg_co2_mg, rating, hits... The average web page produces ~500 mg CO₂ per view. Most ProcessWire sites do better - now you can prove it.
    1 point
  7. Thanks for the report @Robin S - I hadn't seen that because it was specific to running the Console panel from the module config settings page, but is fixed in the latest version now.
    1 point
  8. Yeah, I've mostly weaned my sites off of it, but I have a few busy ones where I don't want to force the logout of all the front-end users. After upgrading the "Running..." notice just keeps going, and when I checked the browser console there was an error message.
    1 point
  9. Hi @Roych - do you think it would be possible to exclude URLs from the 404 pages section if they end up resolving to another page - for example, the PW core PagePathHistory modules does a great job of automatically redirecting pages with changed names to their new path, but the original failed path is still being listed.
    1 point
  10. Hi @Robin S - really sorry about that I never use SessionHandlerDB but I need to remember to test with it - should be fixed in the latest version.
    1 point
  11. Hi @adrian, I have an action that was working in v0.9.8 <?php namespace ProcessWire; class DownloadModulesDirectory extends ProcessAdminActions { protected $title = 'Download modules directory'; protected $description = 'Download a ZIP file of /site/modules/'; protected $author = 'Robin'; protected $dbBackup = 'disabled'; protected function defineOptions() { return array(); } protected function executeAction($options) { $files = $this->wire('files'); $config = $this->wire('config'); $zip_pathname = $config->paths->site . 'modules.zip'; $files->zip($zip_pathname, $config->paths->siteModules, ['overwrite' => true]); $files->send($zip_pathname); return true; } } In v1.0.1 the zip is created but a download isn't prompted, and I see this when executing the action:
    1 point
  12. Hi @adrian, thanks for the kind words! Good news — NativeAnalytics v1.0.22 now supports CSP nonces using exactly the two approaches you describe: Central $config->cspNonce / $config->cspNonce() — if/when Ryan adds it (or you define it yourself in config.php or via a hook), the module picks it up automatically. TracyDebugger-style header parsing — as a fallback, the module reads the already-sent Content-Security-Policy / CSP-Report-Only header and extracts the nonce from script-src / script-src-elem using essentially the same regex you posted. The relevant helper is NativeAnalytics::getCspNonce() / getScriptNonceAttribute(). The module does not create or manage the CSP header itself — it only reuses an existing nonce — so it works with whatever CSP setup you already have (middleware, web server config, custom hook, etc.). If no nonce is found, scripts are emitted normally without the attribute, so nothing breaks for sites that don't use CSP. - See NativeAnalytics.module.php, lines 143–191 if you want to check the implementation. So no core hacks needed on your end — should just work. Let me know if you run into any edge case. Version Updated to: v1.0.22 Cheers 😉 R
    1 point
  13. While trying to find the cause of disk usage increasing by several GB per week, I discovered a file inside /var/lib/mysql that was indeed increasing by several GB per week, sometimes up to a GB a day. This file is used for fulltext indexing: fts_000000000000dbd8_0000000000013612_index_1.ibd By running optimisation on the database tables, I was able to 'reset' the file. I thought it was maybe a bug in the database, so tried setting up a fresh database copy, but the issue persisted. Time to call Claude... Here's the full conversation: https://claude.ai/share/94de4c96-4a04-4fae-b3c5-de95225316bd Long story short, I was using pages_meta to record statistics tied to pages/users, so write operations on the table were pretty frequent. It seems a bit absurd to me that this could cause a index file to balloon to such a ridiculous size (it was 100GB when first discovered) as it isn't a high traffic site and the amount of data in the table is minimal (2MB). However because of the frequent writes, the indexing file was being frequently appended to and for some reason it doesn't prune itself it just keeps expanding. I've re-written the stats so they are stored on the filesystem instead of the database, so far that seems to be working. Claude brought a couple of things up, which would probably be worth reviewing @ryan: Why is there a fulltext index on the data column? No primary key Ultimately, I think the issue here is how I've gone about using pages_meta - It isn't the right solution for frequently updated datasets - but I thought I'd pass this on for consideration, and also for anyone else who might find themselves in the puzzling situation of a ballooning index_1.ibd file. Cheers, Chris
    1 point
  14. Buy land. Plant trees. Don't talk about it. Repeat.
    1 point
×
×
  • Create New...