Jump to content

adrian

PW-Moderators
  • Posts

    10,896
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Thanks @teppo - I am seeing the tabbed results now. The only thing that's weird is that on the "All" tab, it shows all the results, then it shows the results for the different templates below separated by template, so each result shows up twice. Viewing specific results (by clicking on a template tab/button), they are showing correctly. Hopefully this shows what I mean. Can you see this at your end as well?
  2. @teppo - I think I am the one who was asleep - not sure how I ended up with 'group_by option' but if I change it to 'group_by' then I get this error (maybe also PHP8 related) SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':pf19s0X IN BOOLEAN MODE)) ) )) \n LEFT JOIN templates AS pwse_t ON pwse_t.id=p...' at line 4
  3. I'm actually not sure why I used that and then $args['operator'] instead of simply: $findOptions['operator'] I can't see any reason at the moment not to change to the simpler version.
  4. Please ignore the awful zurb foundation markup - this was an ASAP conversion of a site from an unusable Drupal setup so I rebuilt using the old site's markup / css. At some point this will be redone as well, but at least it all works now ? You can see though that each button adds the type and then I use that like this: $findOptions['selector_extra'] = 'template=' . $type; You can ignore the hook on Renderer::renderResult at the top - it's just for adding the thumbnails to the results.
  5. Thanks @teppo - all those errors are now gone. I am trying out the group by template options but not seeing any delineation in the rendered results, with them all being in the same <ul> block. Perhaps I am missing something. $searchEngine = $modules->get('SearchEngine'); echo $searchEngine->renderStyles(); echo $searchEngine->renderScripts(); $findOptions = [ 'group_by option' => 'template' ]; $renderOptions = [ 'results_grouped' => 'template.label' ]; $query = $searchEngine->find($input->get->q, $findOptions); echo $searchEngine->renderResults($renderOptions, $query); I am also curious how you have handled pagination of results in this tabbed results scenario (since I am not getting it working, I am not sure yet whether this works or not). What I actually ended up doing for my project that just went live is to return all results, but then have buttons that look like tabs, but each one is for a different template and I use them to add a "type" (template) parameter to the query string, eg: https://ian.umces.edu/search/page2?type=media&q=seagrass - this ensures that pagination works within the results for that template. OT, but I am also seeing errors with the Debugger. 1) The Debug Index, Debug Page and Reindex Page buttons always gives me this error: array_map(): Argument #2 ($array) must be of type array, null given in /modules/SearchEngine/lib/Debugger.php:628 2) The Debug Query always give me: PHP Warning: Undefined array key "active" in .../modules/SearchEngine/lib/Renderer.php:371
  6. Well, in this case, it's Teppo who is amazing ?
  7. v4.21.52 fixes an issue with uploading images to repeatermatrix fields. This fix might also take care of a few other randomly seen bugs, although only time will tell with those. Regardless, I think this is a pretty important update for everyone.
  8. Hi @teppo - I am excited for these new features - thanks for you hard work. Unfortunately, when I install it I get this error: Deprecated: Required parameter $query follows optional parameter $args in /Users/ajones/Sites/ecoreportcard/site/modules/SearchEngine/lib/Renderer.php on line 615 Deprecated: Required parameter $type follows optional parameter $args in /Users/ajones/Sites/ecoreportcard/site/modules/SearchEngine/lib/Renderer.php on line 718 Deprecated: Required parameter $type follows optional parameter $args in /Users/ajones/Sites/ecoreportcard/site/modules/SearchEngine/lib/Renderer.php on line 755 and then when I try to do a search, I get: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':pf19s0X IN BOOLEAN MODE) ) )) \n LEFT JOIN templates AS pwse_t ON pwse_t.id=pa...' at line 4 Reverting to the last version instantly fixes these. Note that for my testing I am using the simple: <?= $modules->get('SearchEngine')->render() ?> approach to handle everything. Let me know if you need me to dig a little deeper.
  9. This sort of thing is possible, but you might find life easier with https://processwire.com/modules/search-engine/ - it will also be much more performant for the end user.
  10. The only thing I know of is: https://github.com/apeisa/Discussions I used it once on a site that had a limited life. It worked OK, but it's very low on functionality. Not sure if it should really have a modules directory given it's state, but it's also listed here: https://processwire.com/modules/discussions/
  11. There is also this new module from @BitPoet
  12. The problem is that Ryan doesn't seem to update the docs on the website until he commits a new master version which is I why I always use the API panel in Tracy ?
  13. I actually find the Debug panel > Selector Queries section more useful because it shows which selector calls result in which SQL queries.
  14. Also, this video: https://www.youtube.com/watch?v=7kcRf3iUgSk It's horribly put together, but the I wonder if perhaps there is something to the "link to malicious or hacked page" - perhaps a link on your site is linking to an external malicious site?
  15. @Kiwi Chris - I haven't ever seen this warning, but it sounds potentially something that needs to be taken care of. Have you seen these info pages? https://developers.google.com/search/docs/advanced/security/social-engineering https://www.getastra.com/blog/911/social-engineering-content-detected/ https://software-wikipedia.medium.com/social-engineering-content-detected-on-your-site-how-to-fix-it-238cd3fb9d65 https://www.trendmicro.com/vinfo/pl/security/news/cybercrime-and-digital-threats/google-now-warns-against-social-engineering-content https://software-wikipedia.medium.com/social-engineering-content-detected-on-your-site-how-to-fix-it-238cd3fb9d65
  16. Silly question perhaps, but have you applied the textformatter to the field where the video URLs are being embedded?
  17. Is the problem really related to the <p> tags? Any chances it's related to this: https://github.com/ryancramerdesign/TextformatterVideoEmbed/issues/16 Ryan seems to have dropped the ball with this module. Might be time to start using this instead: https://processwire.com/modules/textformatter-video-markup/
  18. Tracy's File Editor panel allows you to easily fix stuff. It doesn't have the file management component like this module, but it works for my needs when I am away from my dev machine.
  19. Click the icon after the "Console" in the title bar to see all the shortcuts
  20. Hi @MoritzLost - sorry about that - not sure how I messed up the keyboard shortcut. Should be working properly in the latest version. Note that I typically use the ALT/OPT + Enter to run snippets because it clears and runs in one action. Regarding deleting a saved snippet - did you do that from the Console panel, or directly from the file system? You should do it from the console panel so that it also removes the entry from its local storage so it doesn't try to load the snippet from disk.
  21. @Ivan Gretsky - sorry for the trouble - could you please debug which of these conditions (https://github.com/adrianbj/AdminRestrictBranch/blob/4964a3f5b83338f7313f7c6daeefe6c6793640b0/AdminRestrictBranch.module.php#L228) is resulting in the error message? And if it's the last one, then figure out where in this method: https://github.com/adrianbj/AdminRestrictBranch/blob/4964a3f5b83338f7313f7c6daeefe6c6793640b0/AdminRestrictBranch.module.php#L236 or in this hook (https://github.com/teppokoivula/AdminRestrictBranchSelect/blob/3ac88e7f4da482a5a16dad1abe3f221fdaeb2742/AdminRestrictBranchSelect.module.php#L54) in @teppo's module it's returning "1", rather than one of the allowed branch parents? BTW - are you having the same issue with ARB without this addon module?
  22. If I understand correctly, this should do it: https://github.com/adrianbj/TracyDebugger/blob/481a548a4d9f09784ccb1c7f598212e2923b2191/TracyDebugger.module.php#L774-L784
  23. @Ivan Gretsky - guest a guess - are you using the correct setting in the main ARB module? Or are you perhaps logging in via a URL to open a specific branch of the page tree?
  24. Does this help? https://processwire.com/modules/fieldtype-image-marker/ I have modified it to use the coordinates, but not show the marker on the frontend. Otherwise, perhaps you could build in fieldtype around this https://github.com/maschek/imgmap/
  25. @rjgamer - you could of course just use a different image field in the repeater so the rules can target it separately.
×
×
  • Create New...