-
Posts
396 -
Joined
-
Last visited
-
Days Won
5
da² last won the day on December 17 2024
da² had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
da²'s Achievements
Sr. Member (5/6)
268
Reputation
-
On my Ubuntu (Gnome) laptop, I often get a popup saying an issue happened when waking up computer. I also sometimes had pain accessing an external drive, plug in, plug out, in, out... and finally it worked. Usually it works immediately, but not this time. Recently I was looking to free space, I have old accounts in my /home (from previous installations of Manjaro KDE, Manjaro Gnome...) and found I had 150 GB in the Download folder of one of this accounts. I opened a video just to check its content, and explorer crashed. I restarted explorer, selected everything in folder, deleted and... explorer crashed again. I tried again and this time it crashed when selecting files... I finally succeeded, but what a pain. I rarely turn off computer, just put it in sleep, I suppose this is why sometimes Firefox freezes for a few seconds after days without restarting, so I restart and everything is OK.
-
I watched a video and Omarchy looks really great, but it's based on Arch Linux, I don't trust enough the stability of this distribution to use it for my daily job. I had a big issue in the past using Arch, only one time but when it happened the system was totally broken, after a simple "pacman -Syyu"... no more internet, no more access to external drives... The end. 😄 I also tried Manjaro, and after the dinner break, instead of a sleeping computer, I saw a black screen with graphic card fans at 100 % and everything else frozen. Ubuntu should be stable, but almost every day I have small issues on my Ubuntu laptop. That's why I didn't use Linux for my job since years, every time I try a distribution I see stability issues that scares me. Hope you'll have a great experience with Omarchy, keep us updated! 🙂
-
Aurelien Barrau is a french physicist and philosopher, I translate: 😅
-
It works only if I set multiple to true, but this is a single file upload: $zipUpload = new InputFile("zipFile"); $zipUpload->setMultiple(false); // Rule 'allowedFileSize' not working with "false" $zipUpload->showClearLink(true); // No link displayed too $zipUpload->setLabel("label"); $zipUpload->setRule('allowedFileSize', '524288000'); // Not taken into account except with multiple files $zipUpload->setRule('allowedFileExt', ['zip']); $zipUpload->setRule('required'); Oh, this works if I fill the english title of french language! Is it expected? Usually in ProcessWire the field first language value is used as default if second one is empty, like here: In my language selector for example, it works like this, all languages are found and usable. But at least I know how to fix this on my side. 😉
-
Thank you @Juergen for the fixes. Sorry not to reply before but I have few free time. ^^ I found more issues: File upload is limited to 500 MB: $zipUpload->setRule('allowedFileSize', '524288000'); But I can add a file larger, the form is valid and the upload starts, but then the server is not happy: With module FrontendLoginRegister, in Account Settings I add Language field. I have 2 languages, french and english, french is default. The form displays the 2 languages only if user is actually using french, when using english, only english is listed in the Select field. If user selects english and save, it works. If user selects french it is not saved. I try to investigate the code quickly, only to find that in Select::___renderSelect(), when user is using english, $option->render() returns an empty string for french.
-
And another issue. First time I submit the form, after isValid() I call showForm(true), so the form shows with the last value entered. I see the notice "Thank you for your message", and the URL segment is still there. I hit submit a second time and get a 404 page (from my code) because the URL segment is removed.
-
Hello, On a page with an url segment, the form is never valid. It's a simple form with an InputNumber. If I remove the segment it works, if I add it isValid() is always false. Another minor issue, even if an InputFile has setMultiple(false), I can drag and drop several files on it, I don't know if you can do something for this.
-
enum TournamentType:string { case MYSTERY = "Mystery"; case PKO = "PKO"; case VANILLA = "Vanilla"; } class FilterSolvesForm extends AbstractFrontendForm { protected function buildForm(): void { $tournamentTypeSelect = new Select("tournamentType"); $tournamentTypeSelect->setLabel(__("Type de tournoi")); foreach (TournamentType::cases() as $tournamentType) { $tournamentTypeSelect->addOption($tournamentType->value, $tournamentType->value); } $this->add($tournamentTypeSelect); } } abstract class AbstractFrontendForm extends Form { public function __construct(string $id) { parent::__construct($id); $this->buildForm(); $this->addSubmit(); } private function addSubmit():void { $button = new Button('submit'); $button->setAttribute('value', __("Valider")); $this->add($button); } abstract protected function buildForm(): void; } // TEMPLATE PHP FILE $command = new SelectSolvesDatabaseCommand(1, 10); $filtersForm = new FilterSolvesForm("solvesFilterForm"); if ($filtersForm->isValid()) { // DevUtils::prettyPrintObject($filtersForm->getValue('tournamentType')); // $command->addFilter('tournamentType', $filtersForm->getValue('tournamentType')); } $filtersForm->showForm(true); $command->execute(); $solves = $command->getPaginatedSolves(); Twig::render('browse-solves', [ 'paginatedSolves' => $solves, 'filtersForm' => $filtersForm, ] );
-
It's a simple Select: I tried again and find this is a random bug, sometimes it works, sometimes not. I made a video, we don't see the dropdown because I recorded only Firefox window, but I can confirm the list is always rendered in the same order as the top line "Mystery,PKO,Vanilla,", that is the order used to fill the Select element, so this is not a problem caused by a random order when initializing the form.
-
I found in your code that it is $form->setAttribute('method', 'get'); (documentation needs an update 🙂 ). But now the page is empty after submission, empty head and body. I don't understand what's happening. EDIT: Looks like there is an exit() somewhere, because no code in my template is executed after $form->isValid() when I use GET method. 🧐
-
Thank you @Juergen I edited my message with more questions while you were answering: Another thing, after form submission I'd like the form to be still displayed for another use, it is used to filter data in a table so it should always be visible. Actually after submission the form is hidden and replaced with the message "Thank you for your message.". I tried to use $form->showForm(true); but there is a bug, the value shown in the form is not always the value I selected before to submit (in a Select element). And another question, following the documentation I added $form->setMethod('get'); but get an error: "::setMethod does not exist or is not callable in this context"
-
Hello, Is there a way to put some fields into a div, so I can manage form layout more precisely? Is it with the FieldsetOpen/FieldsetClose elements? EDIT: Another thing, after form submission I'd like the form to be still displayed for another use, it is used to filter data in a table so it should always be visible. Actually after submission the form is hidden and replaced with the message "Thank you for your message.". I tried to use $form->showForm(true); but there is a bug, the value shown in the form is not always the value I selected before to submit (in a Select element).