All Activity
- Today
-
Hello @da² Thank you for your detailed explanation! Now I know what your goal is. The first problem by doing additional validations inside the "isValid()" method after all form values are valid is that the form has "status valid" and therefore the form values will be emptied to prevent double form submission. That is the reason why the form is empty. This can be prevented by adding the useDoubleFormSubmissionCheck() method with value false to the form object. The second problem is that the validation of max attempts (if enabled) will be reseted if the form is valid, but it would take further attempts if you are doing additional validations inside the isValid() method. So the max attempts validation in this case does not work. But this can be disabled by using the setMaxAttempts() method and setting the value to 0. So adding additional validations inside the isValid() method is a very dirty solution and the module is not developed to support such a scenario. So the goal you want to achive is very difficult to achive. I am afraid that the module will not be able to solve your problem, but I will wrap my head around it and maybe I have an idea.🤔
-
I loved this theme - very similar to the new one, but somehow better. I actually prefer Bernhard's stock UIKit theme to the new one, not sure exactly why. I wish Canvas was the default theme.
- 48 replies
-
robert changed their profile photo
-
50 Templates + 14 Repeaters 🙂
-
I'll see if I have time to do a full case study. The map is easily explained though: Since Switzerland is a very small country, stretching it onto a 2D plane can be done without much distortion. That's where the LV03 and LV95 coordinate systems come into play. They are centered at the observatorium of the ExWi building of the University of Bern (where I studied CS :P). From there, you count the meters to the north and the east (and add some offsets so there are no negative coordinates). Using Switzerland's official map service, you can easily come up with LV95 coordinates for any address. These are then added to the locations in the PW admin. The map thus is just an SVG and placing the dots is just simple LV95 coordinate to pixels interpolation. No external services needed, no privacy concerns.
-
1) 75 (+15 Repeaters) 2) 62 (+4) 3) 50 (+7)
-
Shocking stuff. Perhaps a good title would be Another great reason not to use WordPress. 🙂 In PW world, how many of us run Module updates through any audit before installing?
- 1 reply
-
- 1
-
-
https://anchor.host/someone-bought-30-wordpress-plugins-and-planted-a-backdoor-in-all-of-them/ Without any ill intent, this comes across to me as sounding like promotion for ProcessWire.
- 1 reply
-
- 2
-
- Yesterday
-
You can try to compare the Textarea field settings. I have seen this behaviour when the editor setting uses a faulty js / css file path. Maybe a custom JSON file have been moved.
-
P.s. a Textarea field in the SEO section is on the other hand working properly.
-
howdytom started following Textarea disappearts after 1 sec
-
It could also caused by PHP version upgrade from your hosting provider or faulty TinyMCE / CKEditor JS settings. Do you have access to your server logfiles? Which PW version do you use? Which default editor has been set for the text field. TinyMCE or CKEditor? Did you try to re-save the textarea field settings?
-
Hi Sabesz, I already tried that; both a different browser and icognito, it doesnt matter. The strange thing is, I see the Textbox litterally disappearing for my eyes, so I think it is something in Processwire, maybe a security or setting issue? Michael
-
szabesz started following Textarea disappearts after 1 sec
-
Hi, it might be a browser extension causing this. Do you have any extensions installed? If so, you can try a different browser or an incognito/private window, provided extensions are not allowed to run in that mode.
-
MichaelNL started following Textarea disappearts after 1 sec
-
Hi, As my developer has stopped with servising my Processwire site, I am asking for help here. In the admin area, it seems that pages with a "textarea" field dont show their content after 1 second. Even if I refresh the whole page, I can see the original input in the textarea, but it disappears after 1 second. It is not possible to edit the textarea... It looks like a system setting has been changed? The last time I used the site (2 months ago) everything was still working fine.
-
Sergio started following PageMarkdown — Export any page to Markdown
-
Very useful, indeed! May I suggest an example in its docs for the developer to implement: - A URL segment `/md/` or, even better, adding `.md` to the URL to trigger the display of the markdown version of the page?
-
😂 https://www.tomshardware.com/tech-industry/artificial-intelligence/claude-code-deletes-developers-production-setup-including-its-database-and-snapshots-2-5-years-of-records-were-nuked-in-an-instant EDIT, the post-mortem by the developer: https://alexeyondata.substack.com/p/how-i-dropped-our-production-database
-
Hi, thanks for the explanation. I'll try to explain my actual case, it's more complex and would be easier to manage if I could just invalidate a form field manually. The form has a zip field, zip file contains several files. To make the explanation short, I extract the zip and validate its content, but the validation also requires to know values from the other fields in the form. I think this is the first problem: accessing the other fields (only if they are validated by the form) while validating the zip field. So I have a field "A", form should valid it (basic validation, like "required"), then while validating zip content (another field) and extracting its data I check again field "A" against the zip data. If there's an issue I must invalidate field "A" (but I'm processing zip field) and display an error on this "A" field. In one sentence: I know that field "A" is wrong only when processing zip field. Also this validator seems to make things more complex. I don't want to extract/validate the zip 2 times, once in validator, and once again when form is fully validated (isValid() function) to save values in database. So I should refactor code to store the validated data somewhere to reuse them in isValid() function, this is extra complicated work I want to avoid. Also this is not a light process for CPU, zip can be 500 MB and contain a lot of files to parse (some are also zip to extract again), this is a heavy process and I don't like the idea of doing this 2 times. Telling the form "this field is not valid and should display this error message" is way more simple and doesn't necessitate extra code, I just have to return an error code from the high level class that process data and invalidate one or another field. If you have an idea to avoid processing zip 2 times and without adding extra work, it would be welcomed, hope my explanations are clear (I'm not sure 😆). Actually I'm displaying error message on form result page, and in case of error the user has to fill again the whole form. My client is OK with this since this form is mainly used by himself, but I'm not happy because this is also a public form that a user could use, and having the whole form reset in case of error is a bad design. This is the actual code in template php: $form = new UploadSolveForm(); if ($form->isValid()) { $uploadFilePath = $form->getSolveFilePath(); $tagsText = trim($form->getValue('tagsFinalInput')); $tags = $tagsText ? explode(',', $tagsText) : []; $parseCommand = new ParseSolveUploadCommand( $uploadFilePath, trim($form->getValue('groupName')), $tags, RoomType::from($form->getValue('room')), boolval($form->getValue('isSpaceKo')), $form->getValue('subtreeVilainPosition') ? TablePosition::from($form->getValue('subtreeVilainPosition')) : null, $form->getValue('subtreeVilainAction') ? PlayerAction::from($form->getValue('subtreeVilainAction')) : null, $form->getValue('subtreeHeroPosition') ? TablePosition::from($form->getValue('subtreeHeroPosition')) : null ); if (!$parseCommand->execute()) { // I would like to do: // $errorCode = $parseCommand->getErrorCode(); // if ($errorCode == ParseSolveUploadCommand::SOME_ERROR){ // $form->setError('a field name', 'errorMessage'); // } else if($errorCode == ParseSolveUploadCommand::SOME_OTHER_ERROR){ // $form->setError('another field name', 'errorMessage'); // } if ($parseCommand->getUserErrorMessage()) NoticeManager::add($parseCommand->getUserErrorMessage(), NoticeType::ERROR); // Will display an alert box on form result page else NoticeManager::add(__("Une erreur s'est produite, merci de contacter un administrateur.", COMMON_TRANSLATION_DOMAIN), NoticeType::ERROR); } else { $parseCommand->getReport()->noticeUser(); } } Thank you for your interest. 🙂
-
Ivan Gretsky started following Largest number of templates?
-
Top one is 62 (+23 repeaters). Regular ones are 15 to 25.
-
I presume, then, if you know it's not animated and you want the webp version you can use ->webp. It's probably good as it is in hindsight.
-
horst started following Disable webp generation for GIFs
-
Exactly. That's the reason. 🙂
-
BitPoet started following Largest number of templates?
-
1) 147 2) 60 3) 46
-
maximus changed their profile photo
- Last week
-
@wbmnfktr thanks, 2 issues fixed. The last one was not a syntax the module supports (method syntax rather than property syntax) but added support for it in the latest commits with PW's call unknown() method catchall.
-
Small update on PW Native Analytics I made a few refinements to improve usability and setup: cleaned up and improved the module settings added short text descriptions to make technical options easier to understand improved the date format setting so it now offers cleaner and more useful format choices made important beginner-friendly options enabled by default on install, such as: Enable tracking Enable event tracking Respect Do Not Track Ignore query strings in stored paths This makes the module easier to understand and ready to use immediately after installation, especially for less technical users. thx to matjazp for feedback 😉 I updated the file in first post! Cheers
-
1) 37 2) 31 3) 21 (but regularly there are not more then 8 - 12 templates in my websites)