Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. After taking a look at the code, I guess the best approach would be to go with a custom validation rule, because there is so much going on inside the isValid() function that must be checked in the setErrorMessageToField() method too. Can you explain which kind of validation you need in this case. Maybe I can help you to create the custom rule. You can also send me a PM with the code you have so far.
  3. OK, the things will get more complicated as I thought first, because I have to care about maxAttempts too if used. I will experiment with sessions instead and try to find a solution.
  4. Today
  5. This is not related with this field, I removed it, and still the method setErrorMessageToField() doesn't work the second time the form is submitted. Looks like it's related with css classes you add to the alert div. It seems you're adding both alert_successClass and alert_dangerClass to this div, that's why it melts red and green (I'm using UiKit).
  6. This is caused by the TracyDebugger - I have forgotten to remove this call after Debugging. Please go to the Form.php and find the following line and remove it: bd($this->formErrors); Then this error will be gone. I have removed the TracyCall on Github too. This is strange, because it has nothing to do with the PHP code. Please take a look at your CSS classes. On my site the color is white. Yes, this is a browser security behavior and independent which browser you will use - file upload fields will always be empty after submission (whether successfully or not). I will test it with file upload fields and see if I can reproduce the issues. For now, please remove the bd() call first.
  7. Hi @Juergen Thank you very much, I updated the module but there are some issues. If I try to valid a form with a required field (InputFile) without filling it (and without calling setErrorMessageToField()): It's not happening with the previous version I was using (2.2.55). I'm trying the method to set an error on a given field, it's working but message text color is still green at top of form: Strange error management when submitting the form several times using setErrorMessageToField() (video to make it clear) : I fill the InputFile required field and an optional one. I submit. setErrorMessageToField() triggers the error. The InputFile required field has been emptied (was already the case in previous version, is it expected?). I submit again. Issues: the form is fully emptied. setErrorMessageToField() has no effect the second time. InputFile required field is empty but no error. (if I had filled it again, the 2 points above are still there) I also have a request, could you make the setErrorMessageToField() first parameter a string, so I can pass a field name? Or supporting both name and field reference if you prefer. Usually the form fields are created in a form class and are not stored as class members, it's why it's more convenient to use field names, like with getValue() method. Thank you. 🙂
  8. I never use AI to generate code, my case was more about understanding an issue and how the framework works. The kind of issue that is hard to find a solution with a Google search. The fun fact is that this issue never existed, that was a misinterpretation by myself, but all chatbot (ChatGPT, Claude and the framework dedicated chatbot) said this was a "very common issue", and gave me very bad solutions, all bullshit. 😂
  9. Thank you. It is a great module and works perfectly. Sometimes it would be cool to password protect individual pages instead of locking the complete sites. It just the opposite use case.
  10. Yes, that is the purpose of this variable: To add additional values to the validator. You can add several values as an array to the validator. To get a specific value from this array, you only have call it by its key (fe $params[2] will return the array value on the position with the key 2). You will find a lot of examples on how to write custom rules inside the CustomRules.php file. There you can study how to use the $params variable to test conditions with it.
  11. Hello @da² I have added a new method to trigger an error message to a field manually: setErrorMessageToField() Here is a small example on how to use it: $form = new \FrontendForms\Form('testform'); $form->setMaxAttempts(0); $form->setMaxTime(0); $form->setMinTime(0); $firstname = new \FrontendForms\InputText('firstname'); $firstname->setLabel('Firstname'); $firstname->setRule('required')->setCustomFieldName('The first name'); $form->add($firstname); $button = new \FrontendForms\Button('submit'); $button->setAttribute('value', 'Send'); $form->add($button); if ($form->isValid()) { $form->setErrorMessageToField($firstname, 'This is my custom message'); } echo $form->render(); If the "default validation" was successful, then the error message will be displayed under the "firstname" field in this case. You can use it to make another validations inside the isValid() function to check the submitted form values against other conditions. If the conditions fail then you can output this manually triggered error message like written above. To use the new method, you have to replace the file site\modules\FrontendForms\Formelements\Form.php with the one from Github or you simply add the new function to your Form.php. Please let me know if this helps.
  12. Hey everyone, on a recent client project we had to deal with a large number of Markdown files that needed to end up as regular HTML content on ProcessWire pages. Converting them manually or piping them through external tools wasn't an option – too many files, too tedious, and the content had to be stored as actual HTML in rich textfields, not just formatted at runtime. So we built a small module that handles this directly inside ProcessWire. How it works The module creates a file upload field (md_import_files) and a Repeater field (md_import_items) with a standard title field and a richtext body field (md_import_body) inside. The body field automatically uses TinyMCE if installed, otherwise CKEditor. You add both fields (md_import_files,md_import_items) to any template, upload your .md files, hit save – each file gets converted to HTML via PW's core TextformatterMarkdownExtra and stored as a separate Repeater item. The source filename goes into the items title, processed files are removed from the upload automatically. Template output The Repeater items are regular PW pages, so output is straightforward: foreach ($page->md_import_items as $item) { echo "<section>"; echo "<h2>{$item->title}</h2>"; echo "<div>{$item->md_import_body}</div>"; echo "</section>"; } Tag mappings One thing we needed right away: control over how certain Markdown elements end up in HTML. For example, #headings in Markdown become <h1> – but on most websites <h1> is reserved for the page title. The module has a simple config (Modules → Configure → Markdown Importer) where you define tag mappings, one per line: h1:h2 h2:h3 strong:b blockquote:aside hr:br This performs a simple 1:1 tag replacement after conversion, preserving all attributes. Works well for standalone or equivalent elements like headings, inline formatting, blockquotes, or void elements like hr:br. Note that it doesn't handle nested structures – mapping table:ul for example would only replace the outer <table> tag while leaving thead, tr, td etc. untouched. Requirements ProcessWire 3.0.0+ FieldtypeRepeater (core) TextformatterMarkdownExtra (core) GitHub: github.com/frameless-at/MarkdownImporter Modules Directory: https://processwire.com/modules/markdown-importer/ Happy to hear if anyone finds this useful or has suggestions for improvements. Cheers, Mike
      • 3
      • Like
  13. Yesterday
  14. It is obvious that AI/LLMs/agents, etc..., should be used for development with frameworks the developer already has at least a basic understanding of, and the agent should not be allowed to generate code the developer cannot understand, otherwise the whole project will fail in the end. These are new tools, they are constantly changing, and we need to learn how to utilize them best. I am trying to find the optimal balance between tinkering, learning, and doing actual work. This has always been the case whenever I started using a new piece of software or system for the first time. There is no change in that regard.
  15. When a developer says he is more productive with AI, I think about this study from early 2025. 🙂 Maybe this is improving with new chatbot models, but in my experience I already lost a lot of time this year because of AI driving me in the wrong direction when using a framework I had zero knowledge with. I'm very cautious with AI, and use it only in some cases I know it's good enough. https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
  16. I try not to worry about things I cannot control, and AI falls squarely in that category for me. It's here, it's not going anywhere, and every senior person I know in tech is embracing it rather than fighting it. I use it daily now and it makes me more productive. That's the reality. The people protesting or boycotting it aren't going to slow it down, they're just going to fall behind. That said, I don't think caring about the environmental and societal side means you have to opt out. If anything, the opposite. People who use AI and care about how it's built and powered are the ones with any real influence over where it goes. I'd genuinely have no hesitation donating to make AI development better and more responsible, that feels like a more direct lever than abstaining. Ryan put it well: sitting out doesn't improve anything. Use it, push for better, and concentrate on what's within your own family four walls.
  17. Human in the loop, aka HITL. The latest acronym and IMHO vital for devs.
  18. Untested... and just a starter idea for your use case, but maybe via a hook in site/ready? if ($input->urlSegments->count > 0 && $input->urlSegment(1) === 'sitemap.xml) { rtrim($input->urlSegmentStr() '/'); };
  19. psy

    SeoMaestro

    Further to above, there was an issue with the sitemap handling urlsegments with the canonical link. Another hook solved it for me:
  20. Last week
  21. Good day! One of my templates has a list of allowed (whitelisted) url segments set (via "Which URL Segments do you want to allow?") . And all of them but one should end with a trailing slash for SEO reasons. The new url segment (called `sitemap.xml`) should work without trailing slash. Could you please suggest how this could be done?
  22. Hi friends! And thanks for this useful module 😉 I'm not (actually) pretending to become this module supporter but I've found a bug which broke a couple of pages in my PW admin, so I had to make a fix. The problem is that Activity Log module cannot handle the situations when a data field has been deleted. I did a quick fix, feel free to use it 😉 MarkupActivityLog.module
  23. It's always great to hear feedback, it makes modules a must-have for every developer!
  24. @szabesz I get that except for project-summary.md. That file must stay as is when re-exporting or the change history will be lost
  25. Humans In the Loop ARC AGI 3: When there is no pattern to follow, artificial "intelligence" fails: As long as we pretend to save the environment with "green energy," "renewable energy", luxury electric cars, and the like, while hiding the dark side of the trade, there is little we can do simply by refusing to use online LLM services: https://rumble.com/v39h4nu-the-truth-about-green-energy-its-all-a-hoax-to-make-money.html First and foremost, we should make products that last for decades, or at least are upgradable/updatable, so that certain parts can last as long as possible and the rest can be replaced. Also, the right tool for the right job is preferable to "the newer, the better" just because it's new. As long as profit dictates, there will be no effective solutions to problems like this, IMHO.
  26. Is Duplicator aware that some environments can contain symlinked Modules of remote repos? I can set the excluded files and folders to: .git .github .cursor .DS_Store .gitattributes .gitignore otherwise I recently had PHP warnings on some hosts about open_basedir restrictions. Cheers P
  27. Especially because the module does not delete already generated files. FI you turn off an option after it has been turned on and files have been generated, you will need to manually delete the files that are no longer needed.
  28. Thanks again @maximus! 1. I found an issue: In context/prompts/ md files /site/assets/ seems to be hardcoded, eg.: ## Files to Reference - `/site/assets/context/api/endpoints.json` - existing API endpoints - `/site/assets/context/api/schemas/` - data schemas - `/site/assets/context/snippets/api-examples.php` - code patterns 2. Agent might pick up /prompts/ In SKILL.md and README.me the "AI prompts and instructions" and similar text bits might be misleading for an agent. When someone feeds the LLM manually with necessary files only, this is not an issue, but when feeding an agent via SKILL.md, it would be preferable to clearly state that these files are only templates for LLM/Agent prompting, so an automated agent should leave them alone. Sure, I can simply turn it off in the setting, but just a safeguard, a better wording for them would be welcome. 2. Tiny UX request: Sometimes I close the Settings tab, and even the browser's "open recent tab" is just not an option "anymore", so a button like "Go to Module's Settings" would be handy: Thank you in advance for considering.
  29. Context Module v1.1.9 Released! 🎉 Quick update with two improvements based on your feedback: Fixed Cline Skill Name Compatibility (reported by @szabesz) Changed SKILL.md name: from ProcessWire Context - example.com to context Cline requires exact folder name match to activate skills Now works out-of-the-box when exported to .agents/skills/context/ Improved Better Project Summary Template (improved by @psy) Rules now embedded directly in the file (AI sees them every update) "Update in place" mode instead of overwrite (preserves history) Boundary protection: #### DO NOT UPDATE ABOVE THIS LINE #### Auto-removes duplication More concise and actionable format What this means: More reliable session continuity with AI agents AI won't accidentally modify template structure Cleaner, focused checkpoint summaries Download: GitHub Thanks @szabesz for the testing and @psy for the improved template!
  1. Load more activity
×
×
  • Create New...