Recently Updated Topics
Showing topics posted in for the last 7 days.
- Past hour
-
Move from Wordpress to Processwire (in Germany)
Leftfield replied to ThomasLichtenstern's topic in Jobs
Hi @ThomasLichtenstern I've just moved WordPress (500+ pages) website to Processwire. I got all neccessary scripts to move content, links redirect pages/posts/categories. I did whole SEO, because they had problem with WP, even with SEO plugins I am 100% sure there are way better developers here than me, but if... I am here :) -
Hi Ryan, I'll do my best to explain this, but keep in mind my experience with queues / background jobs is only 2 years old. But in short, inspiration would be best taken from the classic, "batteries included" big web application frameworks like Laravel (as Teppo pointed out) and Rails. I like the Laravel page I linked because it gets very in-depth (I've read that page at least 10 times). Let's use a classic example like this: Let's say someone wants to upload a video to a field and we want it to be converted to a different file format (let's say that's being handled by ffmpeg). That's a time intensive task that wouldn't be able to be done within a standard max limit 30 second web request, or even with the memory available to php via php-fpm. It might take minutes or even hours, and even then, things can go wrong and it might fail. So, instead we'd want this to happen independent of the web request, therefore a background job dedicated to that task would have to be made and scheduled to be processed. It could happen immediately, or maybe it can be scheduled for 30 minutes later. This is not related to cron jobs which are a different concept. (Another example is for example in an ecommerce checkout; it's generally better practice to send the order notification email as a background job instead of inline with the code that processes the order after it's submitted). With that, queue systems are typically powered by a different dedicated database or system, with Redis being a popular choice. The reason for this is to limit load on the primary database; many large systems may have millions of jobs per day so offloading that to a separate database saves resources. However the big web application frameworks I mentioned also allow the option for the main database itself to store the jobs (Rails enabled this in Nov 2024), which is typically fast enough and probably good enough for a ProcessWire-based solution. You then have workers which act on the jobs. You can define there to be one or multiple workers. Let's say you have a powerful server and want to transcode multiple videos at a time, then having multiple workers would allow more jobs to be done in parallel and take advantage of your system resources. Obviously you don't want a worker to act on a job more than once, or two different workers to act on the same job. So this gets into jobs have statuses, being locked, and avoiding race conditions. The Laravel documentation gets into all of that, but I think reading up on queues/background jobs/workers and experimenting with it would be tremendously helpful. In regards to my print-on-demand system, I'm not using a queue system as I described above and I did experiment with WireQueue and IftRunner a while ago, but it didn't really... fit? It was a while ago and I was still wrapping my head around queues; also I came to realize that what I needed was even deeper than that (ie, durable workflows, but that's unrelated to what we're talking about here). I eventually put something together that relies on "fake" jobs using cron jobs and progressing through a durable workflow; it's not the most efficient way to do it, but I got it working. I've been meaning to rewrite that part of the system one day and having a native / first-party queue system (which dovetails with the CLI commands), would be the best approach.
- Today
-
Hi, We use the mod_cspnonce + Apache SSI approach. .htaccess: Options +Includes AddType text/html .html .php AddOutputFilter INCLUDES .html .php <IfModule mod_headers.c> # If not the PW admin <If "! %{QUERY_STRING} =~ /{your-admin-url}/"> ... Header set Content-Security-Policy "\ default-src 'self';\ script-src 'nonce-%{CSP_NONCE}e' 'strict-dynamic';\ ... " </If> </IfModule> In your template: <!--NoMinify--> <script src="./your-script.js" nonce="<!--#echo var="CSP_NONCE"-->"> <!--/NoMinify--> Note that the NoMinify tags need to be added to stop ProCache stripping out the SSI var as it treats it as an HTML comment. We've been using this in production for 2-3 years on sites with the Apache module available and it works well. Cheers, Chris
-
PW: 3.0.255 PHP: 8.3.3 Sadly I now have the same issue and I can't find a way around it. Duplicate sites, create a new page on one then try to export the page to the duplicate site and get this error: Error: Call to a member function getLanguageValue() on null in wire/modules/LanguageSupport/FieldtypeTextareaLanguage.module:126 #0 [internal function]: FieldtypeTextareaLanguage->___importValue() #1 wire/core/Wire.php (425): call_user_func_array() #2 wire/core/WireHooks.php (1018): Wire->_callMethod() #3 wire/core/Wire.php (484): WireHooks->runHooks() #4 wire/core/PagesExportImport.php (998): Wire->__call() #5 wire/core/PagesExportImport.php (685): PagesExportImport->importFieldValue() #6 wire/core/PagesExportImport.php (535): PagesExportImport->arrayToPage() #7 wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeaterPorter.php (255): PagesExportImport->arrayToPages() #8 wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module (1006): FieldtypeRepeaterPorter->importValue() #9 [internal function]: FieldtypeRepeater->___importValue() #10 wire/core/Wire.php (425): call_user_func_array() #11 wire/core/WireHooks.php (1018): Wire->_callMethod() #12 wire/core/Wire.php (484): WireHooks->runHooks() #13 wire/core/PagesExportImport.php (998): Wire->__call() #14 wire/core/PagesExportImport.php (685): PagesExportImport->importFieldValue() #15 wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module (619): PagesExportImport->arrayToPage() #16 wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module (320): ProcessPagesExportImport->processImportItemToPage() #17 wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module (242): ProcessPagesExportImport->processImportSubmit() #18 wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module (76): ProcessPagesExportImport->processImport() #19 wire/core/Wire.php (413): ProcessPagesExportImport->___execute() #20 wire/core/WireHooks.php (1018): Wire->_callMethod() #21 wire/core/Wire.php (484): WireHooks->runHooks() #22 wire/core/ProcessController.php (362): Wire->__call() #23 wire/core/Wire.php (413): ProcessController->___execute() #24 wire/core/WireHooks.php (1018): Wire->_callMethod() #25 wire/core/Wire.php (484): WireHooks->runHooks() #26 wire/core/admin.php (174): Wire->__call() #27 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/home/u99035861...') #28 site/templates/admin.php (15): require('/home/u99035861...') #29 wire/core/TemplateFile.php (328): require('/home/u99035861...') #30 wire/core/Wire.php (413): TemplateFile->___render() #31 wire/core/WireHooks.php (1018): Wire->_callMethod() #32 wire/core/Wire.php (484): WireHooks->runHooks() #33 wire/modules/PageRender.module (547): Wire->__call() #34 wire/core/Page.php (3152): PageRender->render() #35 wire/core/Wire.php (416): Page->___renderPage() #36 wire/core/WireHooks.php (1018): Wire->_callMethod() #37 wire/core/Wire.php (484): WireHooks->runHooks() #38 wire/core/Page.php (3097): Wire->__call() #39 wire/core/Wire.php (413): Page->___render() #40 wire/core/WireHooks.php (1018): Wire->_callMethod() #41 wire/core/Wire.php (484): WireHooks->runHooks() #42 wire/modules/Process/ProcessPageView.module (193): Wire->__call() #43 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage() #44 wire/core/Wire.php (416): ProcessPageView->___execute() #45 wire/core/WireHooks.php (1018): Wire->_callMethod() #46 wire/core/Wire.php (484): WireHooks->runHooks() #47 index.php (56): Wire->__call() #48 {main}
-
Hi, honestly, the answer is in your first post, files and DB backup are all you need (same as when you go online for a local dev website) the only things you'll have to change are the db connection settings in the config.php file of course, depending on the pw version the websites are using you may have to check the php version your new hosting server is on and if needed set a lower one (most recent hosting service will use a 8+ version and if your website uses a 3.0.165 pw there may be some warnings 🙂 in that case go for a php 7.4.x version and, afterwards, simply upgrade both your pw and php) have a nice day
-
@Roych thanks! This is a really nice and clean module that integrates straight into the backend. I just installed it on a client site and its already filling with interesting data. @ai_slop I was able to make this module work together with PrivacyWire since I am inside the EU. If consent is chosen the cookie is set and the module activates.
- Yesterday
-
@szabesz thanks for letting me know. Yes, the link was a mistake. I wanted to pin the 1st comment to the the top for the latest info but didn't know how. In future will add new info above old for continuity. 🙂
-
That’s a good set. Thanks for the feedback. Re. The top 10 limit. I’m thinking of dashboard space where the dashboard contains rolled up data of many metrics. But you’ll be able to click into a detailed page listing top X. In the meantime if you view table mode of the library and sort by size, you’ll get the same data.
-
This workflow would be really powerful, indeed. Using the MCP server as a tool, the agent could use it on its own, but also the developer could ask the LLM/agent in the console, as Adrian mentions:
-
I'm not getting it done as quickly as I'd like. Most of the modules were written in February and March, when I had free time. Regarding the topic, yes and no. I want to standardize everything so that it looks native. Everywhere and always. And also the UI and UX should be convenient. So that when you open the Tracy dashboard at 3 AM, it doesn't look like a bright light, nothing more. @Ivan Gretsky
- Last week
-
Thanks @maximus. I think I managed to achieve what I wanted by replacing the /wire folder from the installation package with a symlink to one shared /wire folder, created with the following command line: ln -s /var/www/wire /var/www/html/oneofmywebsites/wire Then install as normal with its own database. That seems to work fine, right? Any drawbacks to watch out for? Why would 'symlinks to /wire' be something to avoid - 'can cause issues with __DIR__ resolution in some PW internals'?
-
Hey everyone! Pushed a big update to WireWall today. The main addition is a dashboard module — install ProcessWireWall alongside the main module and you get a live stats page at Admin → Setup → WireWall. It shows blocked/allowed counts, a 24-hour chart, top block reasons, top countries, top IPs, active bans with countdown timers, and a recent events table. Works in both light and dark admin themes since it reads PW CSS variables. Also rewrote the settings page from scratch — went from 15+ scattered fieldsets down to 10 logical sections. City and subdivision blocking options now only show up if you actually have GeoLite2-City.mmdb installed, which cleans things up a lot. A few security fixes in this release too: proxy headers like CF-Connecting-IP are now validated against Cloudflare's published IP ranges before being trusted (previously any client could spoof them), unserialize() in the cache layer got hardened, and some overly broad AJAX bypass patterns were tightened up. Silent 404 mode now throws ProcessWire's native 404 page instead of plain text. GitHub: https://github.com/mxmsmnv/WireWall
-
Ha! I love discovering new stuff like that and then feeling, how did I live without it? I think the tree drawer is only available since one of the later UI themes.
-
I added the ProcessWire namespace as shown below. This seems to have fixed the wireRenderFile not found and the page now displays. I do not know why it works without that on my localhost. Perhaps it could be something to do with this forum post I found that gave me the idea to try adding the namespace? https://processwire.com/talk/topic/11815-undefined-variable-pw-3-wirerenderfile-use-compiled-file/#comment-109884 <?php namespace ProcessWire; ?> <div id="ajax-content" pw-replace> <?=wireRenderFile('_ajax-home.php', array('id' => $page->id))?> </div>
-
I know a reasonable amount about the output formatting basics. But I keep finding it behaving unreliably so I'm looking to enhance my understanding, or find fixes. Example: A template ('basic page') contains a Page Table Next (ptn) field. One of the templates in use in the ptn field has a repeater field. I'm rendering with Latte and I wish vars holding Page[Array] objects exposed to my templates to have of(TRUE) Let's say $thePage holds the basic page in question. There's 2 overarching contexts, front and back end. On admin screens pages default to of(FALSE) on front end, of(TRUE) This is already a bit of a problem that need workaround, since Page Table Next renders the front end output in the back end. But the question is, after $thePage->of($bool) what is the output formatting state of: $thePage->ptn->first ? $thePage->ptn->first->repeaterField->... ? It's not reliably $bool. I've sometimes tried to bolster the reliability by also calling $wire->pages->of($bool). But I still find it's not always as expected. In the case of linked pages, as above, how does an instantiated page object know whether its output formatting should be on or off? Where is it inherited from? None of the following appear reliably correct (I could be wrong, there's a lot of combos) It could be from $thePage Page object. It could be from $pages. It could be from the back/front end context. (worst case, since then you have to explicitly call of() on every page you reference which makes a real mess of templating, requiring a temporary variable to store the page so you can make the call before using a property) It could be to do with one of the first two options at the time the referenced page is loaded, which would account for the unreliability in the case that rendering involves a process where of() is called in turn with FALSE and TRUE... Can anyone help? I guess ideally what I'm after is $thePage->setOutputFormattingOnSelfAndAllReferencedPages($bool). (Aside: yes, I'm aware of using $thePage->getFormatted() and getUnformatted() but if you have to rely on these you can't use more convenient formats like ->each() or ->get() etc.)
-
Ok, we are back in business. Stemplates (Free) is now working more cleanly with the 3rd party module. This won't be an issue again for any other module that relies on template names to function. I had to make a few other changes, but Stemplates is better for it. Here's the updated list: ✅ completely non-destructive ✅ doesn't modify your templates or fields ✅ doesn't touch system templates (admin, repeaters, etc.) ✅ doesn't alter your workflow (if anything, it simplifies it) ✅ free from manual aliases, no mapping files, no rewrite rules to maintain ✅ template files follow your renames automatically (no manual moves, no copy-paste, no backup file shuffle) ✅ third-party modules that reference template names keep working after a rename ✅ API calls using the old template name continue to work transparently ✅ every rename and every config update is logged to Setup → Logs → stemplates so you always have a full audit trail ℹ️ adds a Setup → Stemplates admin page for browsing your folders (purely additive, you can ignore it) ℹ️ writes to the database only when you rename a template, and only to keep other modules' template pickers in sync
-
Support for sub-agents has been added in version 7, now posted to GitHub. Your primary agent can now delegate to other agents when it deems it worthwhile. They can be more instances of the same agent, or instance of other agent models you've defined in the module configuration. More details further down. This version also adds a public API method for sharing agent configuration with other modules, which was requested by @psy. To get agent configuration use $at->getAgents(); (to get all) or $at->getPrimaryAgent() to get the primary agent. See the README file (near the bottom) for instructions on how to use it. Each of the returned $agent objects also includes an ask() method, for when you want AgentTools to handle the request/response process for you as well: $agent = $at->getPrimaryAgent(); $answer = $agent->ask('What is the capital of France?'); echo $answer; Claude Code both requested and developed the sub-agents feature and I asked it to describe some examples of when/where it might be used:
-
Start - Personal quick-access dashboard with visual link editor
elabx replied to maximus's topic in Modules/Plugins
Do you happen to know https://daun.github.io/processwire-dashboard/#/ ?? I mean your module looks fantastic! But I feel it's something what could have been added to ProcessWire Dashboard? -
I have googled and ai-ed about it... We can call that a breaking change or not to our liking. Or holywar about it) My point was if someone downloads the new code to a site with PHP 7 the site will actually break 😎 But 2.0 is better anyway for marketing purpose and community spirit IMHO as it symbolizes the new era for the module)
-
This looks great @psy. Going to try it out later this week.
-
https://www.rand.org/pubs/research_briefs/RB10014.html "...examines nonviolent...", like: Reposturing bombers within easy striking range of key Russian strategic targets... Reposturing fighters so that they are closer to their targets.. Deploying additional tactical nuclear weapons to locations in Europe and Asia Repositioning U.S. and allied ballistic missile defense systems... The United States might goad Russia into a costly arms race... Lot's of nonviolent means, for sure. And it was all published on Apr 24, 2019. It is not even a secret.
-
Welcome back Soma, nice to have you here again, after such a long time.
-
PromptWire 1.7.0 is out with 4 new MCP tools, bringing the total to 40. Latest tools are listed below. I haven't 100% fully tested a site sync yet, so always back up your existing site, database and files. pw_site_compare compares your local and remote sites across pages, schema, and template/module files. Pages are matched by URL path rather than database ID, so it works reliably across environments with different auto-increment sequences. You can exclude templates (e.g. user, role, licence pages) to focus the diff on what you actually intend to deploy. pw_site_sync (my favourite) orchestrates a full deployment in one operation: compare, back up the target, enable maintenance mode, push schema, push pages with their file/image assets, push template and module files, disable maintenance. It runs in dry-run mode by default so you see the full plan before anything is touched. Scope can be narrowed to just pages, schema, or files. pw_maintenance toggles maintenance mode on local, remote, or both sites. A styled 503 page is served to visitors with appropriate Retry-After and noindex headers. Superusers and the PromptWire API bypass it, so you can verify changes and keep the agent working during a deployment. pw_backup creates database dumps (using ProcessWire's WireDatabaseBackup) and zip archives of site/templates and site/modules. You can list, restore, or delete backups from either environment. The backup directory is auto-protected with .htaccess so SQL dumps are never web-accessible. HTTPS enforcement. The API endpoint rejects plain HTTP with a 403 before the API key is checked. PROMPTWIRE_ALLOW_HTTP in config-promptwire.php bypasses this for local dev only. Autoload change. The module is now autoloaded to intercept front-end requests during maintenance mode. The cost is a single file_exists() check per page load. Documentation updated across all pages at peterknight.digital/docs/promptwire/v1/
-
PageMarkdown — Export any page to Markdown
designconcepts replied to maximus's topic in Modules/Plugins
Thank you for this module. 🙂 TinyMCE support would be great. -
Sorry, haven't tried them yet.