-
Posts
1,306 -
Joined
-
Last visited
-
Days Won
13
Everything posted by Juergen
-
FrontendForms update 2.1.55 Bug fixed on min time configuration input field (name attribute was missing) Static function secondsToReadable() will be reverted to non-static. The static function leads to some problems under certain conditions, so the best way was to revert it back to non-static (read the discussion above). IMPORTANT: This has an impact on the FrontendLoginRegister module if you are using 2-factor-authentification, because this module uses the static function. If you are using the FrontendLoginRegister module, please update this module first (or at the same time with FrontendForms) to prevent problems. Thank you!
-
Thank you for your feedback!! That was a real struggle, but we get it ?! The only side effect is that I have to update one of my other modules (FrontendLoginRegister) too, because it uses the static method. Otherwise it will not work if 2-factor-authentification is enabled. So I have to add the same method to this module too to get it working flawlessly. To do now write the same method twice was the reason, why I have switched the method to static in the past. I will update the other module first and after that I will bump up the version of FrontendForms too. Cu
-
I have tried to find a possible cause for the problem by using a static method, but I did not find one. Maybe it will be caused by the _n() function of ProcessWire, which will be used inside this method (but this is only thought). Anyway, I have changed the method back to non-static. Could you please copy the code of the file below to your FormValidation.php FormValidation-new.php If it works for you, I will add it to GitHub and bump up the module version, so you can update the module as usual.
-
Glad that you figured it out!!! ? Usually, static methods are not others than non-static methods. The only difference is, that you do not have to instantiate a new object to be able to use it. Thats why I am a little bit confused that this may cause this error. ? I will try to find out what the problem is. I will inform you, after I have made some changes to the FormValidation.php, so that you can test it if it works.
-
What you could also try is to embed the form code directly inside the template instead of using an include. It should not have an impact, but who knows. This is what makes me thinking of that the problem should be caused by your local machine and not by the module itself. Something there (fe a specific configuration) causes this unwanted behavior.
-
I was so sure that the issue can be found in that file. ? These are the relevant files, that have been changed: Form.php FormValidation.php FrontendForms.module frontendforms.js Could you try to change the Form.php and the FrontendForms.module files to the version of 2.1.46 and leave all other files untouched. If the error persists please do the same with FormValidation.php and if necessary with the frontendforms.js, so that all 4 files are from version 2.1.46 at the end. Do not enable Captcha or Ajax. Does TracyDebugger not throw an error messages at all? What you can also do is to take a look at the browser console (Short cut F12) to take a lookt fe at the response header code (status code).
-
This is very strange! I guess the only place for a problem could the form.php file in this case, because it contains all the code for the frontend. I have studied the differences between the code from version 2.1.46 and 2.1.47 from the Form.php file, but I have not found a line, where I think it could be the cause for this issue. Here you will see the differences between the 2 versions: https://github.com/juergenweb/FrontendForms/commit/c42a410c247dd04bb296a04d8e112dc8fbb7dc4b If you have time, please change only the code of the Form.php file from the current version (or the 2.1.47) version with the one of the 2.1.46 version. Leave all other files untouched. If it works, we could be for sure that the problem is really inside the Form.php and nothing else. I have tried to change the codes and I did not run into problems (current version of FrontendForms, but Form.php was from the 2.1.46 version). form-2.1.46.php You can use your own 2.1.46 file or you copy the code from this file. Please let me know if the problem still persists.
-
I have taken a look into the changelog.md file of FrontendForms on Github and only 2 huge changes have been taken between 2.1.46 and the latest 2.1.54 version. 2.1.47: Ajax support has been added 2.1.50: New class for creating privacy text has been added All other changes are minor (but maybe could lead to problems too). I dont know, but as you have written, it only happens with the new version of FrontendForms. So the problem must be there (somewhere). First of all disable the embedding of the Javascript file. You can do this in the backend configuration inside the first tab, and see if it has an impact. I do not guess that it will solve the problem, but the Javascript file has been changed during the time too. If nothing happens, please enable the embedding of the JS file again. Next step: You are using a local machine, so could you install only for testing purposes the FrontendContact module, which is a simple contact form based on FrontendForms? It would be interesting what happens if you try to send a message with this module. You have to enter the email address where the mails should be sent to inside the module configuration and then you add the follwing code to one of your templates, where you want to output the contact form: echo $modules->get('FrontendContact')->render(); Send a message and see what happens.
-
Hello @donatas First of all, thank you for reporting this issue. Interesting! I do not have heard of this kind of error before, but Google says that this is a browser related problem and not a server problem. They say that this could be caused by browser extensions or the browser cache, but there are more issues that can be responsible for such a scenario. Could you please try to use another browser than the one that you are still using. It would be interesting if the problem persists. If the problem will be still there I can recommend you to deinstall and reinstall FrontendForms. I cannot reproduce the error and I cannot find out the cause only by the error message itself. Sometimes a fresh install helps to solve a problem. Corrected: Ok, I see you have tried this before. I guess this is not a general problem, because this is the first report of such a problem. Otherwise other users would have reported such an issue before. Best regards
-
Sorry @Flashmaster82 I guess I will not implement this on the FrontendForms module, but on the FrontendContact module. That was a misunderstanding. The FrontendForms module is only the base class for all others. If you need such a feature you can do it inside the isValid() method (creating a new page, sending mails and so on). That should not be a problem. if($form->isValid()){ // create the new page } Best regards
-
I have found the solution inside the FieldtypeComments.module from Ryan: * Unlike $pages->find(), pagination of comments is not automatically tied to * $input->pageNum(). As a result, if you paginate, you should specify both * “start=n” and “limit=n” in your selector: * * ~~~~~~ * $limit = 20; * $start = ($input->pageNum() - 1) * $limit; So adding setStart() and setLimit() method will solve the problem. I have only added setLimit() before. $commentPerPage = 20; // how much comments should be displayed $pageNum = wire('input')->pageNum(); $start = ($pageNum - 1) * $commentPerPage; $allComments->setStart($start); Page 1: Page 2:
-
Hello @all I am struggeling for a while to get it working, but I do not succeed. Description: I have a PaginatedArray containing a lot of comments and therefore I have created a new custom page inside the admin which contains all the comments inside a AdminTable. Now I want to add a pagination below the table, to show only a certain amount of comments per page. To render the pagination I have included the following code: echo $allComments->renderPager(); // $allComments is the PaginatedArray This outputs the pager and the redirection to page1, page2 and so on works, but the active state of the pager button will always stay on the first button (the pager button number 1 has always the red background color, even if another page different from 1 is loaded). I am on the first page - everything ok I am on the second page, but number 1 is still active I have also tried to change the current page manually: $pager->setPageNum(2); Source: https://processwire.com/api/ref/markup-pager-nav/set-page-num/ But this does not work too! Can someone show me a working example with pagination and a PaginatedArray? Thanks in advance!
-
Thank you @Bernhard But unfortunately this doesn't work in my case if you have a FieldtypeMulti (or probably a Fieldtype as well) and the corresponding input field, even if autoload is set to true. When I add the ready() method, it doesn't take it into account - only the init() method. Maybe there is a difference between an ordinary module and a module of type Fieldtype. Maybe that could be the reason why Ryan didn't add the files via hook in his comment module either.