All Activity
- Past hour
-
Ivan Gretsky started following I'm back
-
It is really a pleasure and an excitement to see you back, @Soma! I am sure something great is going to happen soon!
- Today
- Yesterday
-
Context Module - AI-Optimized Site Documentation with TOON Format
psy replied to maximus's topic in Modules/Plugins
Hi @maximus Hit a red warning when trying to export field definitions for FieldtypeQRCode. This fieldtype uses FieldtypeQRCode.info.php instead of getModuleInfo() inside the module. Fix in exportFieldDefinitions line 1928: // 'label' => $field->type->getModuleInfo()['title'] ?? $className, 'label' => method_exists($field->type, 'getModuleInfo') ? $field->type->getModuleInfo()['title'] : $className, HTH -
Peter Knight started following I'm back
-
Hey soma. It’s wonderful to hear you’re back. I must be following you on instagram because I have seen your work regularly over the years. they’re the biggest wins and often take longest to happen Looking forward to seeing you more around here 😀
-
Sooo, I'm still alive and in August, I will start on a new job and project that probably brings me back to work with the cool and great Processwire. :D 7 years ago I was forced to change job and ended in a cool new place doing front-end dev not using PW anymore. So unfortunately I didn't really use or follow PW in that time except once a year doing something tiny bits on the handful of websites I am responsible for. I'm sorry if I just disappeared "over night" and maybe left some things behind I was doing for PW, and didn't spend time looking out for them. The reason is, I also was very frustrated with a lot of things with the job and life at that time and 2019 was also when I started painting again digitally, as maybe some of you know. I went full hyper focus mode, everyday almost for 2-3 years in my spare time and since then slowed down. I was able to make a small career with it, and made a lot of new connections and experiences which was awesome. I will continue to work on making art and illustrations as I have a lot of new freedom with the new job too combine a lot of my skills. Finally I can work from home full time. A little dream come true. Thanks for still being here and keeping this small but awesome community alive! I have to catch up now! :D Cheers Soma
- 6 replies
-
- 11
-
-
@szabesz So sorry for the late reply! I must have missed a notification. This is what mine looks like: Hope you manage to get it sorted.
-
Recommended way to move installation from local to production server
da² replied to _Roy_'s topic in Getting Started
My way to upload local site to production is using basic Linux tools. I'm on Windows but with a WSL console running Debian, you have access to all tools. First I use Ant to synchronize files from my code to a separate local directory (Ant is a set of tools that you use by creating a simple XML describing tasks), I exclude some files or directories (like PW cache and logs...), automatically increment a version number, replace some variables in some files (like site version/build number, debug variables...)... Then an rsync command send the code to the server. Deploying a site update is then only executing this script and waiting a few seconds. 🙂 I exclude site config.php because some values change from production server (database credentials, debug=false|true, Stripe identifiers...). Example of a deploy script (very simple but powerful stuff ^^): #!/bin/bash # Directory where Ant project synchronize files. build_dir=./target/processwire/ echo "=> Executing ANT project..." cmd.exe /c build-processwire.bat buildOk=$? if [ $buildOk -ne 0 ]; then echo "ANT build failed, stopping script." exit fi read -p "Press enter to update PRODUCTION server, ctrl+c to cancel." echo "=> Copying files to web server..." rsync -avh --delete-delay --include-from=deploy-includes.txt --exclude-from=deploy-excludes.txt --chown=linux_user_name:linux_user_group -e ssh $build_dir linux_login@server_ip:/var/www/path_to_productionsite/ If this is the first time I deploy this project, or if this is a staging server (not production) and I want to reset database at every deploy, I add this line, it copies my local PW database to the server: echo "=> Copying database to production" /mnt/e/xampp_php8.2/mysql/bin/mysqldump.exe --add-drop-database -uDB_local_user --databases database_name | ssh linux_login@server_ip "mysql -uDB_user -pDB_password" Since Ant project uses files synchronization (and not copy) and rsync does the same, it deploys to server only files that have changed since last deploy, so it's fast and console logs are clear. If you're interested with Ant XML file, I can show you an example. Same with directories/files I exclude from build, both in Ant and rsync. EDIT: For the first installation on server, I start with a regular PW install directly on server. EDIT 2: Script also set the site in maintenance while deploying, displaying a "Maintenance, please come back later" message, with a bit of Apache configuration. It uploads a file at the site root on server, and when this files exists Apache redirects users to a basic HTML page (except for my IP). -
Hello, After form validation, is it possible to force the form to display an error on a given field? This is possible with the processwire core InputfieldForm and I often use it. Generally I use this to do additional and more complex checks after the basic form validation. For example the form contains a file upload field, it's a zip and I have to validate zip content, if it's not valid the form should display values entered by user with an error message on this field. I know I can create a custom validation rule, but within this validation I have to access variables that are outside the form. For example the form is to edit an ItemData instance, and within the validation I need to access this object. Can I pass variables to the validator custom rule? I looked at the documentation, what is the $params parameter, can I use it to pass variables to validator? Valitron\Validator::addRule('alwaysFail', function($field, $value, array $params, array $fields) With the core InputfieldForm I created a wrapper class and I use it this way: $onValidate = function (AccountEditionForm $form): void { // $onValidate is called only if form basic validation succeeded. if (someCondition) { // Triggering an error, $onSuccess won't be called, // form field will be red with error message, // form still filled with user values so user has only to fix the field with error. $form->setError('fieldName', 'errorMessage'); } } $onSuccess = function (AccountEditionForm $form)): void { // Form is valid (basic validation + $onValidate), use its data. }; $form->execute($onSuccess, $onValidate); Is there a way to do this kind of process, or can you recommend me another way? Thank you.
-
Cre8aplace -- ProcessWire Showcase Overview Cre8aplace is a full-featured social networking platform built entirely on ProcessWire 3.0.255, PHP 8.4, and plain JavaScript/HTML/CSS. No frontend frameworks, no build tools, no bundlers. It delivers the core experience people expect from a social platform -- profiles, messaging, groups, newsfeeds, marketplace, blogs -- while prioritizing user privacy and data control. The site is currently in soft launch at [cre8aplace.com](https://cre8aplace.com). I started this project over five years ago and was recently revived with the availability of time (I'm retired). The goal was to build a platform where users own their experience -- where no data is sold, no algorithms manipulate what you see, and the platform exists to serve its members rather than advertisers. I've used ProcessWire for many years on various projects so it was the natural foundation. Ryan's philosophy of minimal opinions and maximum flexibility aligned perfectly with my project that needed to bend a CMS into something it wasn't explicitly designed for -- a real-time social networking platform. Where other CMSs would have fought at every turn with rigid content models and opinionated routing, ProcessWire simply got out of the way. A major thank you to Ryan! What ProcessWire Solved User Management Without a Separate Database ProcessWire's user system eliminated the need for a standalone user table entirely. Each member account carries approximately 50 custom fields -- everything from profile settings and privacy controls to notification preferences and subscription status. PW's field system handles all of this natively, with no separate profile table, no ORM, and no migration headaches when fields change. The Entity Page Tree Every entity type on the platform -- Groups, Pages (business presence), Events, Markets, Blogs, Movies, Games -- lives as a ProcessWire page with its own template. The page tree gives a natural hierarchy: /groups/ /groups/hiking-enthusiasts/ /groups/local-music/ /pages/ /pages/joes-coffee/ /markets/ /markets/handmade-goods/ Each entity type gets its own template file, its own toolbar configuration, and its own permission rules, but they all share the same rendering components (page header, toolbar, left aside, right aside). ProcessWire's template system made this architecture effortless. Flexible Templating as a Router I used ProcessWire's template system not as a traditional page renderer, but as a thin router/dispatcher. A single 'profile.php' template handles 12 different operations (timeline, account settings, privacy, messages, friends, membership, etc.) by dispatching to focused include files. Each include contains paired display and process functions. PW's template prepend (_init.php) bootstraps every request with shared utilities, configuration, and security setup. Admin Backend for Free ProcessWire's admin interface provided a complete backend without building one. SVG icons are stored as PW pages (37 icons, each with SVG markup in a textarea field). Site-wide configuration lives in a JSON field on a settings page, accessible from both PHP and JavaScript. Reaction types, emoji sets, and content categories are all managed through PW's admin. Authentication Built on Solid Ground Rather than building authentication from scratch, I extended ProcessWire's session and user system with custom email verification, token-based password reset, persistent remember-me login, and bot prevention. PW handles the password hashing, session management, and role assignment while I built the user-facing flows on top. Role Hierarchy The platform's permission system maps directly to ProcessWire roles: member < moderator < owner < administrator < superuser PW's role checking ($user->hasRole(), $user->isSuperuser()) powers everything from toolbar visibility to AJAX endpoint authorization. Group moderators and page employees add entity-scoped permissions on top of the global role hierarchy. Custom ProcessWire Modules I built four custom modules over the years while working on various other projects that extend ProcessWire's capabilities: - ViridiaCaptcha -- Bot prevention for registration and authentication forms. Integrates directly with PW's form processing. - ViridiaCalendar -- A full event calendar with RSVP tracking, recurring events, ICS, and profile-level event management. Renders calendar views and manages event CRUD through ProcessWire's module API. - ViridiaTicketing -- Support ticket system for user-to-admin communication. Built as a PW module with its own database tables and admin interface. - ViridiaGovFeed -- An automated government legislative feed that fetches federal bills from Congress.gov, executive orders and rules from the Federal Register, and state-level legislation via the LegiScan API. It publishes curated topics to a system-owned Page entity. Users follow the page to see legislative headlines in their newsfeed. Runs on a 6-hour cron cycle with deduplication and fetch logging. Architecture Highlights Hybrid Data Model I use ProcessWire pages for entities and users, but custom MariaDB tables for high-volume relational data. I created over 20 custom tables to handle topics, comments, replies, messages, relationships, reactions, notifications, marketplace orders, product variants, reviews, and more. This hybrid approach gives me the best of both worlds -- PW's flexible page management for entities, and direct SQL performance for data that sees thousands of writes per day. Encrypted Control Parameters What I am most proud of is no database ID ever appears in a URL, query string, or HTML attribute on this platform. Every sensitive identifier is encrypted with AES-256-CBC using ProcessWire's private key, passed as an opaque 'data-param' attribute, and decrypted server-side before processing. JavaScript never sees a real ID -- it just passes encrypted blobs back to the server. This is the backbone of the platform's privacy guarantees. AJAX-Driven Interface The platform runs over 50 AJAX actions across 8 endpoint routers. Every interactive operation -- posting a topic, sending a message, toggling a reaction, managing a marketplace order -- happens through AJAX calls that return JSON with server-rendered HTML. No client-side templating, no virtual DOM, no state management library. The server renders the HTML, the client inserts it. Single CSS File, No Framework The entire platform's styling lives in a single 132KB CSS file. Layout uses CSS Grid (3-column desktop, single-column mobile). Theming uses OKLch color space with CSS custom properties -- users pick an accent color via a color picker, and the entire UI adapts through computed color relationships. No Bootstrap, no Tailwind, no preprocessor. No Build Pipeline I wrote 23 JavaScript files as plain ES6+ and served directly. For production, a PHP-based minifier (matthiasmullie/minify) compresses them, and a GUID generator creates randomized filenames for cache busting. The entire "build" process is three shell commands. No webpack, no Vite, no npm. External Dependencies The platform uses only three external dependencies: 1. SunEditor (MIT license) -- WYSIWYG editor for blog posts. The only client-side library on the platform. Everything else is hand-written JavaScript. 2. Stripe PHP SDK -- Powers three subscription tiers (Free at $0, Standard at $8.95/month, Extended at $16.95/month) and marketplace seller payouts via Stripe Connect Express. The SDK is vendored directly in the project -- no Composer. 3. Wasabi S3 -- Cloud object storage for album images and marketplace product photos. Accessed via direct S3 API calls from PHP. Everything else -- UI components, animations, form handlers, real-time polling system -- is custom PHP, JavaScript, HTML, and CSS. Platform Features Social Core - User profiles with visitor viewing via opaque GUID URLs, granular privacy controls, and friend relationships with request/accept/block workflows - Newsfeed aggregating activity from friends, followed groups, pages, and markets - Topic creation with multi-image upload (adaptive grid layout, each with caption and tags), comments, replies, reactions, emoji picker, @mentions, link previews, and topic sharing - Real-time messaging supporting direct messages, multi-user conferences, group chat, page staff chat, system announcements, and moderation incident channels - Notification system with smart aggregation (groups repeat members until read), role-based filtering, and infinite scroll - Carousel view of multiple images with editing Community Entities - Groups with public/private/secret visibility, moderator roles, member approval, post approval queue, rules display, and ownership transfer - Pages (business presence) with follower system, employee roles, and staff-only chat channels Premium Features (Subscription-Gated) - Marketplace with Stripe Connect seller onboarding, product variants, shopping cart, checkout, digital downloads via pre-signed S3 URLs, order management, revenue reports, verified-purchase reviews, wishlists, and market following with new-product notifications - Blogs with SunEditor WYSIWYG, full CRUD, and newsfeed integration - Movies and Games as browseable entertainment entity types - Events powered by the ViridiaCalendar module with RSVP tracking - Schedule future topic postings - State-level government legislation tracking (3-state limit on Standard, unlimited on Extended) Administration - Admin panel with a reusable data table module -- a config-driven system where new admin tables require only a configuration array. Six tables migrated: Users, Groups, Pages, Categories, Reactions, Reports - Content moderation with report handling, per-report discussion channels, and moderator action tracking - Government legislative feed management with force-fetch and status monitoring By the Numbers | Metric | Value | | ------------------------- | ---------------------- | | Custom database tables | 20+ | | SQL migration files | 46 | | Custom user fields | ~50 | | JavaScript files | 23 (~500KB source) | | CSS | 1 file (132KB) | | PHP include files | 50+ | | Custom PW modules | 4 | | Utility functions library | 113KB (_functions.php) | | AJAX actions | 50+ | | npm dependencies | 0 | | Composer dependencies | 0 | | Build steps | 0 | Technology Stack - CMS: ProcessWire 3.0.255 - Language: PHP 8.4 - Database: MariaDB 15.0+ on Debian 12 - Server: Apache 2.4 - Frontend: Plain JavaScript (ES6+), HTML5, CSS3 - Payments: Stripe (subscriptions + Connect marketplace payouts) - Storage: Wasabi S3 (images) - Editor: SunEditor (blog WYSIWYG) - Frameworks: None - Build tools: None
-
- 6
-
-
I’ve faced a lot of headache with video logistics too, especially when you have all sorts of different formats and sizes from clients who just want it to “work.” Self-hosting was never smooth for me, and every time bitrate or compatibility issues popped up, it just ate up hours. I know some folks set up ffmpeg pipelines, but honestly, I like to keep things simple and user-friendly. Anything that automates the heavy-lifting or even provides presets for common exports makes my life easier, especially if less techy people are involved. What’s helped in my personal workflow is relying on tools that streamline editing and automatic conversion, so I can focus on the content rather than the nitty-gritty of formats and uploads. I’ve been experimenting with movavi for this reason, it handles a lot of these basic headaches in a lightweight way and makes prepping files less technical for the rest of the team.
-
Was looking at this recently. We wanted to move to an EU / UK service (from Mailgun who have been absolutely fine but we're on an old PAYG tier with unlimited domains that we suspect might be removed soon). Brevo and Lettermint were on our list but we're currently giving AhaSend a go. It's only been a week so far and we've not stressed it much but the onboarding was good and it's working fine with WireMailSmtp. Decent amount of emails on the free tier as well.
-
Well that was quick! 😅 Wrapping with json_encode() worked for me. Gsap text animation now works: const paragraphs = [ <?=json_encode(__("Here is some text"))?>, <?=json_encode(__("Here is some more text"))?> ];
- 1 reply
-
- translation
- multi-language urls
-
(and 1 more)
Tagged with:
- Last week
-
ai_slop started following How can we do string translation within JS scripts/animated text?
-
I have a javascript animation similar to this codepen here: https://codepen.io/Anthony-Osceola/pen/YPPXwJw My version requires that the string is contained in a const variable. This is what I've tried: ..... .......... const paragraphs = [ <?=__("Here is some text.")?>, <?=__("Here is some more text")?> ]; function buildParagraph(text) {.......... While I've managed to translate the rest of the page, I'm having trouble getting text within javascript tags to work. They show in the admin but the translated text won't display for the JS animation. Would I be better off just creating another template for this translated page? I thought that doing so could be bad for SEO if it's counted as duplicate content. Any advice appreciated.
- 1 reply
-
- translation
- multi-language urls
-
(and 1 more)
Tagged with:
-
Hi @adrian When uploading and inserting an image into a field (e.g., a TinyMCE "body" field) with this module active, any UTF-8 characters (like Greek letters) in other Textarea fields on the same page (e.g., a plain text "seo_description" field) are unexpectedly converted into HTML entities (e.g., "α" becomes "α" ) and saved to the database. I asked Gemini to provide a solution. Steps to Reproduce: Create a page with a TinyMCE field (body) and a standard Textarea field (seo_description). Enter UTF-8 characters (e.g., Greek text) into the "seo_description" field and save. Upload and insert an image into the "body" field. Save the page. Check the "seo_description" field or the database; the UTF-8 text has been converted to HTML entities. Root Cause Analysis: The issue stems from the "replaceRteLinks" method, which is triggered to update image URLs after a rename. Scope Logic: The method fetches all fields of type FieldtypeTextarea and FieldtypeTextareaLanguage and processes them using DOMDocument, regardless of whether the field actually contains the image URL. Encoding Handling: DOMDocument::saveHTML() natively converts extended characters into HTML entities. Because it processes unrelated fields, it permanently alters their raw text in the database. Proposed Solution: Updating the "replaceRteLinks" method to strictly check if the field contains the target URL before processing it, and utilizing ProcessWire's native sanitizer to restore entities converted by DOMDocument. Here is the patched method: private function replaceRteLinks($newFilename, $oldFilename) { $textareaFields = $this->wire('fields')->find("type=FieldtypeTextarea|FieldtypeTextareaLanguage"); $fieldsStr = $textareaFields->implode('|', 'name'); $oldRelativeUrl = str_replace($this->wire('config')->paths->root, '', $oldFilename); $oldRelativeUrlSansExt = str_replace(pathinfo($oldFilename, PATHINFO_EXTENSION), '', $oldRelativeUrl); foreach($this->wire('pages')->find("$fieldsStr%=$oldRelativeUrlSansExt, include=all") as $p) { foreach($textareaFields as $taf) { // FIX 1: Only parse the field if it actually contains the image URL. if($p->$taf != '' && strpos((string)$p->$taf, $oldRelativeUrlSansExt) !== false) { // FIX 2: Explicitly declare UTF-8 for the DOMDocument $pagedom = new DOMDocument('1.0', 'UTF-8'); libxml_use_internal_errors(true); // add <cun> as fake root element $pagedom->loadHTML('<?xml encoding="utf-8" ?><cun>' . $p->$taf . '</cun>', LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED | LIBXML_SCHEMA_CREATE); $pagedom = $this->replaceRteLink($pagedom, $newFilename, $oldFilename, 'a', 'href'); $pagedom = $this->replaceRteLink($pagedom, $newFilename, $oldFilename, 'img', 'src'); // remove fake root element $html = str_replace(['<cun>', '</cun>', '<?xml encoding="utf-8" ?>'], '', $pagedom->saveHtml()); // FIX 3: Restore UTF-8 characters converted to entities by DOMDocument $html = $this->wire('sanitizer')->unentities($html); $p->of(false); $p->$taf = $html; libxml_clear_errors(); $p->save($taf); } } } }
-
rloeber joined the community
-
Hello, Recently I did an extensive research and found https://maileroo.com/pricing to be the best value compared to similar services I found. I registered with them, but the project I will use it for has not yet reached the point where it is actually needed. The ProcessWire instance in question can also handle the initial email sending volumes using the VPN’s own SMTP service.
-
The client hosting company has a cap on emails per hour that is fine for now but we might exceed it eventually. Can anyone recommend a paid SMTP service that scales in tems of volume and works well with the stock ProcessWire SMTP module? I just want something that will plug and play but inputting the SMTP credentials rather than having to authorise an app, etc. I have used Mailgun before so that is an option and found the module in the PW directory works. I just find some SMTP services don't always work right away so I wondered if there are any you can recommend. The server is based in the UK so something that has a server nearby would be a bonus for lower latency. Thanks. 🙂
-
The content owner of this video that I randomly chose from the YouTube homepage had marked this particular video content as not-embeddable, so the JSON response from the oembed provider of YouTube responded with "Unauthorized" which the Essence library doesn't really handle (it just returns nothingness, which in this case is kind of appropriate). Once I tracked that down, I tried another YouTube video URL and it worked as expected. 🤦
- 19 replies
-
- fieldtype
- inputfield
-
(and 1 more)
Tagged with: