Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Interesting that those prices aren't listed! Here are a few data points for you; perhaps others can flesh this out with more, or maybe @ryan will post them officially! 😉 $39 -- ProFields $39 -- ListerPro (dev) $39 -- ProDevTools $35 -- FormBuilder (single) $14 -- "Likes" (single)
  3. OK, this CSRF method only works on POST request (take a look here). I will try to find a solution and provide a fix in the next update to get it working with GET requests too.
  4. OK, but the random bug is still there. Don't be in the urge to investigate this, I'll go for a classic HTML form because I have to finish this ASAP.
  5. 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, ] );
  6. Please can you let me know the renewal cost for the Pro modules. Is it a percentage? I could only see the up-front price in cart and checkout.
  7. Ok, I found the cause for the white page: The CSRF validation is responsible for it. Fast fix: Please replace the this line inside the Form.php inside the isValid() method with this line if((strtolower($this->getAttribute('method')) === 'get') || $validation->checkCSRFAttack($this->getCSRFProtection())){ This disables the CSRF validation if GET is chosen as the method. This is only a fast fix to get it working, but I must dive a little deeper to find out why the CSRF session always returns false in this case.
  8. 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.
  9. I can confirm this behavior but I must take a closer look to find out what is happening. 🤔I am always using POST and not GET in my forms, so I have not discovered this issue until now.
  10. Strange in my case it shows exactly the value that I have chosen before the form submission. Is this a simple select element or a select multiple in your case? Before submission: After submission As you can see the value "custom" is before and after the submission present.
  11. Thx for the heads up. That's perfectly fine, but it would help if you let us know if something is considered to be implemented in a day, a week or a year or not at all. It would be very frustrating if I went through all my modules and then on the next weekly post get informed that the the requested update is ready and all efforts were useless. I'm confused. My modules are in private git repos. How would I do that? I also tried to add content to the README.md textarea input in the modules directory but it didn't work because I didn't provide a Github url. But providing a Github url to a private repo makes no sense to me. I understand it is like this, we can see that. My question was does it have to be like this. I don't think it adds value to anybody, especially not to guest users, as I tried to point out. RockCalendar has had this category selected but still doesn't show up. At first I thought the issue might be that I used "premium modules" as second category, but still it does not show up even though I flipped both selected categories. I guess it's because I don't fill the Github url field.
  12. 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. 🧐
  13. 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"
  14. Of course, there are several options. Which one you should use depends on your preferred output. 1) Wrap multiple inputfields inside a fieldset Take a look here for more information or here for a working example. Sometimes a fieldset is the best option to wrap some inputfields syntactically correct. 2) Wrap multiple inputfields within a div container by using the append() and prepend() methods Take a look here for more information and here is an example using this methods. If you want to wrap for example 4 inputfields inside an extra div container, the idea is to add the opening div tag via the prepend method to the fist field and the closing div tag via the append() method to the last input field. 3) Use the setMarkUp() method to add the opening and closing div I think this is the most practicable method for you if you do not want to use a fieldset. You will find more information here. Example for wrapping multiple fields between 2 div tags: $markup = new Markup(); $markup->setMarkup('<div>'); // opening div $form->add($markup); // here enter your inputfields .... .... $markup = new Markup(); $markup->setMarkup('</div>'); // closing div $form->add($markup); Best regards
  15. 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).
  16. I too like Krystal. One of the few good cPanel hosts out there and ideal for UK based clients. As they use Litespeed you get the performance of NGINX with full support for Apache .htaccess.
  17. Ryan, thank you for clarifying. This totally makes sense now :-)
  18. @gebeer Throttling is what enables us to allow the AI bots, rather than having to block them for taking over the sites resources. So long as the bots adhere to the rules established in the robots.txt they'll never get throttled. But if they ignore the crawl delay, then those requests get throttled with a 429 error. We even include a retry-after header telling them when they can try again. I used to have to block these bots outright in order to preserve the resources for you and me. Now they can crawl as much as they like, so long as they follow the speed limit. The throttle feature provides a way to enforce the speed limit.
  19. Hi @gebeer While I understand your concern about blocking AI bots but what I get from Ryan's post is that he doesn't completely cut off AI bots. It is because they come too often. He just want to limit their visit rate. I think it is ok because I don't think the document part changes every few seconds. Gideon
  20. Hi @ryan, maybe I'm misreading this. But actually you would want bots to collect training data for PW, especially for the API reference part. This website does not publish content that is protected IP. It offers information that aims to attract developers and decision makers to use PW for their business. IMHO, blocking these bots is contra-productive. You are cutting yourself off from a growing number of developers that build projects with AI tools to boost their productivity. In the near future we probably will not be able to compete if we do not use these tools. The more accurate training data and context these AI assistants have for PW, the better they can perform and produce actually usable, production ready code. I would give the current approach of blocking these bots a second thought.
  21. Yesterday
  22. Hi @ryan, This new version of WireRequestBlocker has a breaking change relative to the previous version in that it now requires PHP >= v8, due to the use of str_starts_with(). Because pro modules are not upgradable via the PW admin users don't see notices about requirements before upgrading (and the PHP 8 requirement isn't stated in getModuleInfo() in any case). Could you please highlight the PHP 8 requirement somehow, or change the code so it has the same requirements as previous versions of the module? Thanks.
  1. Load more activity
×
×
  • Create New...