Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates     

  1. Past hour
  2. Mh, it works for me. I believe 'autoload' => true must be set for it to call ready(). Have you tried reinstalling the module?
  3. Good article and postgresql looks interesting with its search capabilities, thanks. Though none of these really solve what I was after here. I experimented quite as bit with stemming and different stemming libraries. Though they all did roughly the same thing. When it came to searching, stemming just wasn’t that useful. WireWordTools originally had a stemming library and methods, and the appropriate fulltext queries included the word stems with wildcards. In the end, it just wasn’t helpful most of the time. And in the few cases where it was worthwhile, it was redundant, though far less thorough, than what we already had with inflection and lemmatisation. So while stemming can have its uses, it’s not even half way there, if trying to build a smart search. Cool nevertheless that they have it built-in apparently. As far as accent support, ranking and fuzzy search, these are all things that MySQL does as well, though maybe there are differences in how they do them. For instance, MySQL supports “sounds like” and also supports pluggable parsers for fulltext searches. Fuzzy search also isn't what I'm after here, but certainly interested in exploring in the future. For me the most useful thing by far is boolean mode searches, particularly in InnoDB, which has a full-text engine modeled on Sphinx. Boolean mode searches are really very powerful, enabling you to specify what’s required, what’s excluded, matching of words or phrases, partial matching of words with wildcards, specifying noise words, isolating distance between words, adjusting ranking up or down on a per-word basis, grouped expressions and nested subexpressions. All while being incredibly fast. I’m pretty thrilled with what MySQL supports here and what it brings to ProcessWire. Postgresql looks very nice too, but for our needs, I don’t feel we are lacking anything relative to it. I think anyone that would say as a general thing that is not very familiar with what MySQL fulltext supports, or maybe is thinking of fulltext support where it was back a long time ago. For ProcessWire and the scale that most use it at, MySQL fulltext is really a sweet spot, enabling PW to deliver enormous power and capability when it comes to search features.
  4. Today
  5. where the file upload button is processed?
  6. You're right, thanks for letting me know. Links should be fixed now. I just switched to a different GitHub username and hadn't come around to updating the links yet. The docs can be found here now: daun.github.io/processwire-dashboard/
  7. It works now. Thanx for fast solution!
  8. Will look into it, thanks for your help @BitPoet, really appreciated.
  9. Hi everyone! I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. Thing is I'd like to grant my new users the power to create their own pages. Any advice? Thanks.
  10. Thanks, @elabx! It works! So it'sactually ok to interchange them. 😛
  11. Interesting to read your reply, per the other thread I just managed to get PW working with SSL connection to MySQL 8 and have seen the performance absolutely tank. I'm running a tiny site though, so would not expect to see such a shift from lack of query cache, wondering if there might be anything else going on.
  12. WTF this actually works! I've been hit by this bug the very first time, also in Firefox (v78.0.1 in my case) which I rarely use for working in the admin, so properly that is why I have not yet experienced this issue before, though as far as I understand others experienced this in Chrome too. I can confirm that opening a new admin page in Firefox does indeed fixed the issue.
  13. Hello, I manage a client website which use PW and Padloper for ecommerce. We recently had an issue where customers were seeing other customers' baskets and prefilled form data on the checkout form. From what I saw, the data was not users who had accounts, just data which was held in their sessions. I think I have narrowed this down to being caused by nginx fast-cgi caching, but I do not know enough about how this works to be certain. I have a couple of questions: • Can fast-cgi cached cause session data to be shared, leaked or incorrectly assigned? • Can fast-cgi cache provide authentication to unauthorised users? I'm reasonably confident that the whole shop cart and checkout bypassed the cache, so is it possible that somebody could 'swap' sessions on a diffetent part of the site which shouldn't have been cached? I don't have a great deal of knowlegde of how sessions, caching and cookies work and fit together, so if it's likely that the fastcgi-cache isn't the problem, can anyone point me in the direction of what might be?
  14. Yesterday
  15. Another approach to try: // Store page changes in custom property on $wire $wire->addHookAfter('Page(template=contact|sample)::changed', function(HookEvent $event) { $page = $event->object; $what = $event->arguments(0); $old = $event->arguments(1); $new = $event->arguments(2); $page_changes = $event->wire('page_changes') ?: []; $page_changes[$page->id][$what] = [ 'old' => $old, 'new' => $new, ]; $event->wire('page_changes', $page_changes); }); // Send email if there are page changes after the request is finished $wire->addHookAfter('ProcessWire::finished', function(HookEvent $event) { $page_changes = $event->wire('page_changes'); if($page_changes) { // Send the email using the values in $page_changes ... } });
  16. Is the repeater set to Ajax load? If yes, you may have to look into the network tab of the browser's developer console for the ajax request. The server's response to that should give you more of a clue.
  17. @xportde Hi Thomas, I'm quite sure it's possible, but I don't quite know how useful that will be as Google will likely find the page and index it anyway…
  18. Last week
  19. Just in case somebody needs to get the override label in the current language… I did… // Get label in current language echo $templates->get('template_name')->fieldgroup->getField('my_field_mame', true)->getLabel(); // OR directly from the page (no matter how the templates name is): echo $page->template->fieldgroup->getField('my_field_mame', true)->getLabel(); This is a way faster than using translate stings in the template: __("I'm an in english headline, translate me!")
  20. I can replicate here. There must be something wrong with the image, as it opens in FF and other deskop image viewers on windows. I recreated webp from your original jpg (using online jpg to webp converter) and this time Chronme shows the image. I have no idea what could be wrong, possible Chrome issue?
  21. I am pretty sure, the error gets logged to some log-file on the machine. If Tracy is installed as a module, you might find something in the Tracy log-files.
  22. @LostKobrakai thanks for the explanation! very helpful. Actually I created a second datetime field now, where I store the walltime of the user when the post is created. I just use this field then to display the time on frontend, instead of created. Messing with the actual created date could really make problems - thanks for the insights - especially because you still want to keep the real "order" (dependend on UTC or a universal time) of posts, even tho individual local time is different.
  23. I'm using SessionHandlerDB: $s = $modules->get('SessionHandlerDB'); foreach($s->getSessions() as $session) { $s->destroy($session['id']); } If not using SessionHandlerDB it should be enough to clear /site/assets/sessions
  24. Thanks @teppo! This was it! I ended up putting my hook inside the Fieldtype Module instead of the Inputfield Module and made the Fieldtype Module autoload with 'autoload' => 'template=admin'. This way the hook works and the Inputfield still seems to be only initialized when the corresponding field is on the page being edited is rendered. Here is my code (adapted from PageTableExtended): <?php namespace ProcessWire; class FieldtypePageTableExtendedGrid extends FieldtypePageTable { public static function getModuleInfo() { return array( 'title' => __('PageTable extended grid'), // Module Title 'summary' => __('Extends PageTable entries for rendering in admin', __FILE__), // Module summary 'version' => 233, 'requires' => array('FieldtypePageTable'), 'installs' => 'InputfieldPageTableExtendedGrid', 'autoload' => 'template=admin', ); } public function init() { parent::init(); } public function ready() { parent::ready(); if ($this->pages->get((int) wire('input')->get('id'))->style) { // add dynamically created styles from field back to document $this->addHookAfter('Page::render', function($event) { $value = $event->return; // Return Content $style = "<style type='text/css' class='pagegrid-styles'> ". $this->pages->get((int) wire('input')->get('id'))->style ." </style>"; // Add Style inside bottom head $event->return = str_replace("</head>", "\n\t$style</head>", $value); // Return All Changes }); } } /** * Get the Inputfield used for input by PageTableExtended * * @param Page $page * @param Field $field * @return Inputfield * */ public function getInputfield(Page $page, Field $field) { $inputfield = $this->modules->get('InputfieldPageTableExtendedGrid'); $inputfield->attr('value', $page->getUnformatted($field->name)); return $inputfield; } } Seems to work great, my hook only triggers when the style field is present on the page. Are there any drawbacks to this approach? Would my field still work with frontend editor, when I do 'autoload' => 'template=admin'?
  25. Updated to 1.0.1 (Stable), mainly reducing hook priority < 200 so it runs before ProCache.
  26. you can try to create the child page only after the parent is saved, like so: // create parent $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get(1234); $p->title = 'Parent Page'; if($p->save()){ // create child $c = new Page(); $c->template = 'child-template'; $c->parent = $p;// new parent above $c->title = 'Child Page'; $c->save(); }
  27. I have made no changes to my account, none at all. It just stopped receiving emails. I have multiple accounts, one personal and the other for business. It is my business account (G Suite) that I do not receive emails for. There is no method of seeking help because all my queries lead no where. Is anyone else having troubles? Found the problem, silly me. Used this tool (https://mxtoolbox.com/) to realize I didn't have the MX setting set with DigitalOcean (my host).
  28. This put me on the right track 🙂 I had a Pages::saved hook that set output formatting to true (when it shouldn't). Thank you!
  1. Load more activity
×
×
  • Create New...