Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/2019 in all areas

  1. There is an option in template settings (Advanced tab -> Template toggles -> Allow the 'created user' to be changed on pages). After you activated this, you can use the API (inside a template or via Tracy Debugger console): $p = $pages->get(11201); d($p->created_users_id); // 41 $p->created_users_id = 10040; $p->save(); d($p->created_users_id); // 10040 d() is dump command inside Tracy
    3 points
  2. Does anyone else think this is kind of a strange way to handle password reset? I've never seen this anywhere else. I've had a few very confused users caught out by this because they didn't read the full message, either they close the window or they open the email on a different device. Anyone changed this to work differently? This refers to ProcessForgotPassword.module if that was unclear.
    3 points
  3. To be honest... don't do it on a remote machine. Install Laragon, MAMP or something similar on your local machine and play around with ProcessWire. I personally prefer the blank profile but in your case the beginner profile shoud be perfect. Combined with the ProcessWire tutorials you will have a solid foundation for a perfect start in the world of ProcessWire. Depending on your skillset and experience with PHP and maybe other CMSs you could be ready to build your very first site in/with ProcessWire on Monday next week.
    2 points
  4. Hi @Christophe Badoux It sound like a permission or maybe a server cache issue, but we need more information about your hosting. Things to check : browser cache disk space available value of session.save_path and permission of this value permission of site/assets server caching (depending on the server setup, could be NGINX, Squid, Varnish, Memcached, etc..) I bet on the last one. Oh and Welcome to the forum ?
    2 points
  5. These threads discuss similar issues: While developing you might want to disable fingerprinting from within config.php - it's explained and discussed in the threads above. Another thing you can and might want to doublecheck: CDNs can be sometimes an issue as well; saw this with Cloudflare CDN a few times some browser extensions (privacy and adblock-related ones) can cause those issues as well Pi-Hole can be an issue too Operas built-in-VPN causes these conflicts/problems (especially in tools like Asana and Slack - and PW) And those things are just the few I remembered from similar situations I had to deal with on my own.
    2 points
  6. Thank you for the feedback. I have merged the change into the main branch, so once 0.1.4 hits the module repository (should be within the next 24 hours) it will be fixed the official package too.
    2 points
  7. 2 points
  8. I am doing it simply like this: $page->template->urlSegments = 1;
    2 points
  9. You may want to revise this line. 'get' will return only the first match. To return a page array, you need $pages as well. Try: <?php $children = $pages->find('template=onecolumn|twocolumn, sort=sort');
    2 points
  10. Now it runs. Thank you!
    2 points
  11. If you put your site behind Cloudflare, you have to exclude your backend URL (using Page rules) otherwise it will be cached and will disconnect you.
    1 point
  12. Thank you very much @wbmnfktr - that worked perfectly and complies with CSP as well.
    1 point
  13. Agreed. It makes sense from a security point of view, but I've encoutered numerous people who browse in one browser while their default browser is another one. They are not even aware.
    1 point
  14. @cjx2240 yep. LoginRegister & ProcessForgotPassword modules could do with some serious re-work. Especially awkward when the user registers in a browser that's not their default or on a different device
    1 point
  15. Hard to tell why this isn't working as expected without knowing about the whole setup and your templates. Either the template doesn't contain any code to show the description or the site is cached. Who built that site? Maybe they can take a look into it. We can almost only guess.
    1 point
  16. What about this: <div class="masthead" data-bg="<?php echo $page->mastheadImage->url; ?>"> <span>My Text Above Image</span> </div> and this: <script> $(document).ready(function() { $('[data-bg]').each(function() { $(this).css('background-image', 'url(' + $(this).attr('data-bg') + ')'); }); }); </script>
    1 point
  17. + = shaky mySQL server / setup. There you have it. Maybe ask hosting support or switch to another DB if you can.
    1 point
  18. Sorry for the late reply. This is definitely something I'll have to figure out, one way or another, just haven't had the time (or need for that matter) yet. I'll have to do some testing first and get back to this later ?
    1 point
  19. Looks like the plain _() translation method is not available anymore for some reason (perhaps something to do with the changes in the function API that I didn't catch). Could you try out the version at this link and let me know whether that fixes it for you?
    1 point
  20. While working on the comments form of my blog, I thought to add an honeypot field in comments form to reduce spam. ? Honeypot is simply an hidden field added to a form. Honeypot field can have any name and is made invisible normally with a css directive {display: none}. Web users, being unable to see the field, will not fill it, while spam bots majority will not detect its invisibility and will populate the field. Once the form is submitted with a not-empty honeypot field it is very likely we are dealing with spam. ? In this post you can find more details about honeypot technique. While studying FieldtypeComments module and in particular CommentForm.php, to my great surprise ? I realized that PW already supports honeypot for Comments Form. ?? This feature has been introduced with PW 3.0.40. Normally this honeypot field is disabled, so it was enough to understand how to enable it! And as often is the case with PW ... it is super easy. ? If in your profile you are directly working with CommentArray, you will just have to enable honeypot passing it as an option to the renderForm() function of CommentArray class, example below: $comments->renderForm(['requireHoneypotField' => 'email2']); And .. we are done! ?? If you will look at the html of your Comment Form you will see an additional line CommentFormHP, that's the hidden honeypot field. In case you are using the Uikit 3 Site/Blog Profile, the renderForm() function is called in _uikit.php, ukCommentForm() function. If you wish that honeypot field is applied to every comment form of your site, just add the requireHoneypotField option to the list at the function start: ... 'errorMessage' => __('Your comment was not saved due to one or more errors.') . ' ' . __('Please check that you have completed all fields before submitting again.'), requireHoneypotField' => 'email2', // >>>>> ADD THIS LINE ); ... Otherwise if you wish to add honeypot in comment form on selected templates only, do not modify ukCommentForm(), but pass the option requireHoneypotField when calling the function in your template: ukCommentForm($comments, ['requireHoneypotField' => 'email2']); Now that we enabled it, let test if honeypot works. ? In the browser development section let's select the honeypot field and disable css {display:none} to show it. A new field will appear: If the spam bot is going to fill the field with a value and submit the form, an error is returned and comment will not be submitted ? That approach is great as spam comments will not be even saved inside the table field_comments. ? I hope this can be of help if somebody needs to enable this PW comments feature.
    1 point
  21. I won't enable UrlSegments for each template, but have a autoload module with should react based on path / urlSegments. Don't like the way to do it with query string. So allow one urlSegment by name (string) would be nice without the need to activate urlSegments at all.
    1 point
×
×
  • Create New...