Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by sebr

  1. Hello @bernhard. Thanks for this tips. I tried it quickly, but the method $site->track404() runned even if there is a redirection after... I have to try in more detail !
  2. Hi I would like to create a 404 page tracking. Then I hooked ProcessPageView::pageNotFound. But If another plugin like Jumplinks for example redirect to another page, I don't want to track it any more like a 404 page... I don't see which hook can I use to be sure to have a real 404 page. Thanks for your help
  3. I don't why. The I updated `InputfieldStars.js` with a simple test on `el` children on foreach(el): document.addEventListener('DOMContentLoaded', function () { document.querySelectorAll('.InputfieldStars .rater').forEach((el) => { // NEW check if (el.children.length === 0) { let input = el.parentElement.previousElementSibling; let settings = JSON.parse(el.dataset.settings); let step = settings.allowHalf === 0 ? 0.5 : 1; // Initialise rater let myRater = raterJs({ element: el, rating: parseFloat(input.value), max: settings.starsNumber, starSize: settings.starSize, step: step, color: settings.starColor, rateCallback: function rateCallback(rating, done) { this.setRating(rating); input.value = rating; done(); }, }); // Clear button let clearButton = el.nextElementSibling; clearButton.addEventListener('click', function () { myRater.clear(); input.value = ''; }); } }); });
  4. @Robin S In fact it's very strange. The DOM contains 2 x div.star-value for each star field : <div class="rater star-rating" data-settings="{&quot;starsNumber&quot;:5,&quot;allowHalf&quot;:&quot;0&quot;,&quot;starSize&quot;:32,&quot;starColor&quot;:&quot;#ffbc00&quot;}" style="width: 160px; height: 32px; mask-size: 32px 32px;" title="3/5"> <div class="star-value" style="background-size: 32px; mask-size: 32px 32px; background-color: rgb(255, 188, 0); width: 0%;"></div> <div class="star-value" style="background-size: 32px; mask-size: 32px 32px; background-color: rgb(255, 188, 0);"></div> </div>
  5. Thanks for your help. I will look for in CSS. I will keep inform in the forum. Have a nice day
  6. Yes it's what I have in the head : <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/dev/JqueryCore.js'></script> <script type='text/javascript' src='/wire/modules/Inputfield/InputfieldPage/InputfieldPage.js?v=108-1652442848'></script> <script type='text/javascript' src='/site/modules/FieldtypeStars/rater-js/rater-js.js?v=0.1.0'></script> <script type='text/javascript' src='/site/modules/FieldtypeStars/InputfieldStars.js?v=0.1.0-1674572287'></script> <script type='text/javascript' src='/wire/templates-admin/scripts/inputfields.min.js'></script> <script type='text/javascript' src='/site/modules/FormBuilder/form-builder.js'></script> On Chrome, on mouse over the title is the right rating, but no color change on stars
  7. No error in the browser console... I just saw that in preview tab (module FormBuilder in admin) the field works fine. Maybe a javascript file not loaded ?
  8. Thanks a lat @Robin S. I try to use this inputField in a formBuilder form but not working. All stars are always highlighted and I cannot select anything. I embed the formwith "Option C : Preferred Embed" and I use the last formBuilder version. Any idea ?
  9. Hi @bernhard I was using version 1 of RockMigrations until now and I am evaluating how to use this new version. I encounter a bug with the use of fieldsets in a FieldtypeRepeater. The fieldsets does not contain any of the defined fields. the order must then be applied for it to be taken into account. For example : $rm->createField('rep_test', 'FieldtypeRepeater', [ 'repeaterFields' => ['gp_main', 'title', 'gp_main_END'] ]); Result : gp_main gp_main_END title And then if I do : $rep = $rm->getField('rep_test', true); $rm->setFieldOrder(['gp_main', 'title', 'gp_main_END'], $rep->type->getRepeaterTemplate($rep)); The new order is apply and it's OK: gp_main title gp_main_END Is it possible to apply the correct order with the use of the createField method?
  10. Hi @adrian I created a configurable module (see attached) with a textarea field to test if above 65535 characters the module configuration is reset. But no, the module throws an exception : The error I encountered with the PageProtector module therefore does not seem to come from Processwire. What other tests can I run to verify where this behavior is coming from? AwTest.zip
  11. Hi @adrian. Thanks for your help. My customer is using the module to privatize page by page instead of folder or tree. Then for the empty config, I will check with a fake module to view the result. I will keep you informed in this thread.
  12. Hi @adrian I use this module on a website that has a lot of content (several thousand pages), a large third of which has protected access based on a permissions profile. This morning, I realized following the definition of a new page in protected access that all pages of the website had lost their protection information. Even the module configuration had been reset. All pages of the website have therefore been publicly exposed. And indeed, in the database, in the `modules` table, I realized the `data` field only contained the elements of the default module (as if I had just installed it). After several tries, I realized that the `data` field is "text" type and is limited to 65535 characters. The problem is that if this limit is exceeded, the record is reset in the DB. the `data` field is therefore empty. I finally set the `data` field of the `modules` table to "mediumtext" and everything was back to normal. Is it due to the module or Processwire? Or is this the behavior of the database (MariaDB)? @ryan : Am I taking a risk for future Processwire updates by setting the `data` field to "mediumtext"? Have a nice week-end
  13. Hi I just tested version 3.0.190 and noticed some bugs on the repeaterMatrix color usage : The background color is not applied (example: Colonnes not applied but Test is applied on all matrix item) Single quote characters are not displayed (encoding problem) Color codes appear in the labels to add item
  14. Hi I get a fatal error when I click on "Debugger" in module settings page. Return value of SearchEngine\Debugger::getWords() must be of the type array, null returned File: .../modules/SearchEngine/lib/Debugger.php:599 Sorry I just update the module and I resolved it with the 0.30.3 version. have a nice day
  15. Hi @AndZyk and @Zeka Thanks for these solutions. The first solution (disable Languages Support - Tabs) will indeed impact the entire back office, regardless of the template. But as said Zeka, I can fork and adapt this module. Zeka, thanks a lot for your codes. I will see how to get inspired to achieve my goal. Have a nice day
  16. Hi 1. By default, every fields in page are lang tabs UI. If I click on folder icon on top right of a field, the lang versions of this fields are extending. I see all version of this lang for this field. My client would like to have this behavior by default on some templates. Is there a simple way to do that ? Hook or just a Javascript added in Admin ? 2. Is there a solution to allow the publication of a page only if the mandatory fields are filled in for all languages? Thanks in advance for your help
  17. Hi I found ! Two pages references with a selector all pages... It was a mistake. Simple and done ?
  18. Hi I'm using Processwire 3.0.180. When I edit a page in admin, Tracy Debugger count between 50 and 100 pages loaded, depending on the templates. All pages open in less than a second. But when I edited pages from a certain template, this pages opened in more than 40 seconds and Tracy Debugger count more than 14000 pages loaded. When I look in the pages loaded list, I find a very large amount of lines that look like this: 1247 /sc_admin/repeaters/for-field-182/for-page-1246/ Page 1248 /sc_admin/repeaters/for-field-158/for-page-1246/ Page 1249 /sc_admin/repeaters/for-field-159/for-page-1246/ Page 1250 /sc_admin/repeaters/for-field-169/for-page-1246/ Page 1251 /sc_admin/repeaters/for-field-170/for-page-1246/ Page 1252 /sc_admin/repeaters/for-field-180/for-page-1246/ Page 1254 /sc_admin/repeaters/for-field-137/for-page-1253/ Page 1256 /sc_admin/repeaters/for-field-182/for-page-1255/ Page 1258 /sc_admin/repeaters/for-field-170/for-page-1195/ Page 1261 /sc_admin/repeaters/for-field-182/for-page-1132/ Page 1262 /sc_admin/repeaters/for-field-159/for-page-1132/ Page 1263 /sc_admin/repeaters/for-field-169/for-page-1132/ Page 1264 /sc_admin/repeaters/for-field-170/for-page-1132/ Page 1265 /sc_admin/repeaters/for-field-180/for-page-1132/ Page Or other like : 10222 /sc_admin/repeaters/for-field-138/for-page-5710/1623420295-8678-1/ RepeaterMatrixPage 10232 /sc_admin/repeaters/for-field-138/for-page-5710/1623420316-7346-1/ RepeaterMatrixPage 10242 /sc_admin/repeaters/for-field-138/for-page-5708/1623482402-7605-1/ RepeaterMatrixPage 10256 /sc_admin/repeaters/for-field-138/for-page-10254/1624257169-0968-1/ RepeaterMatrixPage 10266 /sc_admin/repeaters/for-field-138/for-page-10254/1624257191-2937-1/ RepeaterMatrixPage 10278 /sc_admin/repeaters/for-field-138/for-page-10254/1624257284-3093-1/ RepeaterMatrixPage 10289 /sc_admin/repeaters/for-field-138/for-page-10254/1624258816-4716-1/ RepeaterMatrixPage 10302 /sc_admin/repeaters/for-field-138/for-page-10254/1624259001-0062-1/ RepeaterMatrixPage 10312 /sc_admin/repeaters/for-field-138/for-page-10254/1624259056-5808-1/ RepeaterMatrixPage 10326 /sc_admin/repeaters/for-field-138/for-page-10254/1624259204-4337-1/ RepeaterMatrixPage 10336 /sc_admin/repeaters/for-field-138/for-page-10254/1624259240-545-1/ RepeaterMatrixPage 10347 /sc_admin/repeaters/for-field-138/for-page-10254/1624259280-7777-1/ RepeaterMatrixPage 10357 /sc_admin/repeaters/for-field-138/for-page-10254/1624259299-317-1/ RepeaterMatrixPage 10369 /sc_admin/repeaters/for-field-138/for-page-6006/1624259684-8705-1/ RepeaterMatrixPage 10381 /sc_admin/repeaters/for-field-138/for-page-10379/1624259765-4187-1/ RepeaterMatrixPage More than 10000... This template doesn't contain repeaterMatrix. How can I understand what's happened ? Thanks for your help
  19. Hi @netcarver I tried with quotes and without but the result is the same : no effect...
  20. Hi @Saleena Jhon Something like that ? $pages->find('template=event, date_start <= ' . $customDateStart . ', date_end >= ' . $customDateEnd . ', sort=date_start, sort=date_end');
  21. Thanks a lot @Kiwi Chris. It was a bug in 3.0.179. I just upgraded to 3.0.180 and it's work fin.
  22. Hi On Processwire 3.0.179 Create a fieldtype image named "img_test" with option "Use custom fields" On the template "field-img_text" add a title field On a repeater matrix, add a new type with the field "img_test" Add the repeater matrix on basic-page Create a new page and add an image in the repeater matrix, in the field img_test and fill in the title field from the image field Save and reload : the title field from img_test in the repeater matrix is empty In older Processwire versions, the first time I saved this custom fields were not saved, but on the second one, yes. Any idea about it ? A bug or a bad setting ?
  23. Hi I'm using this module for the first time in a multilingual website. In my home, language prefix are empty because I manage URL directly: mydomain.fr for French mydomain.com for English mydomain.de for Deutsch The the MarkupSitemap module rendered something like that for each page (on mydomain.fr), after set default language (in module settings) to "fr" : <xhtml:link rel="alternate" hreflang="fr" href="https://mydomain.fr/"/> <xhtml:link rel="alternate" hreflang="" href="https://mydomain.fr/"/> <xhtml:link rel="alternate" hreflang="" href="https://mydomain.fr/"/> But I would like to render : <xhtml:link rel="alternate" hreflang="fr" href="https://mydomain.fr/"/> <xhtml:link rel="alternate" hreflang="en" href="https://mydomain.com/"/> <xhtml:link rel="alternate" hreflang="de" href="https://mydomain.de/"/> I tried to use Hook like that : wire()->addHookAfter(MarkupSitemap::getAdditionalPages, function ($event) { $page = $event->arguments(0); $language = $event->arguments(1); MarkupSitemap::applyLanguageSupportHooks(); return [ 'url' => 'https://mydomain.fr/test', 'fr' => [ 'url' => 'https://mydomain.fr/test', ], 'en' => [ 'url' => 'https://mydomain.com/test', ] 'de' => [ 'url' => 'https://mydomain.de/test', ], ]; }); But the sitemap rendering is the same. How can use the Hook to set alternate language URL from pages ?
  24. Thanks a lot @BitPoet. I didn't know the "user access > permission page" on Processwire Doc. I just applied the permission and it works nicely ?
  • Create New...