-
Posts
6,629 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
-
have you checked your installation on another system (local dev)?
-
maybe you want to share the code how you define your urls and also the related execute method?
-
Newsletter with wireMailSMTP, array problem with multiple emails
bernhard replied to FL0RIAN's topic in General Support
install tracydebugger and dump $subscribers: bd($subscribers);- 1 reply
-
- wiremailsmtp
- newsletter
-
(and 1 more)
Tagged with:
-
do you maybe have the page path history module installed? if you had those ajax endpoints as real pages maybe there is some redirection going on... just try your setup on a fresh pw installation. working with process modules and executeSomething is usually really easy ?
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
Here is a really nice example of a simple plugin. You can develop custom plugins and just place them in /site/assets/RockGrid/plugins or we can share them in the community. Look at that lovely UI for the user and how quickly he can get the information he wants in a very attractive way: Doubleclick = filter this row with the selected value Tripleclick = reset filter for this row (but leave all other columns untouched) document.addEventListener('RockGridItemLoadPlugins', function(e) { RockGrid.getGrid(e.target).registerPlugin(function() { this.name = 'doubleClickFilter'; this.onLoad = function() { var grid = this.grid; var clicks = 0; var timer, timeout = 350; // time between each click var doubleClick = function(e) { var colId = e.column.colId; var filter = grid.api().getFilterInstance(colId); filter.setModel({ type: 'equals', filter: e.value, }); grid.api().onFilterChanged(); grid.api().deselectAll(); } var tripleClick = function(e) { var colId = e.column.colId; var filter = grid.api().getFilterInstance(colId); filter.setModel({}); grid.api().onFilterChanged(); grid.api().deselectAll(); } // click timer grid.api().addEventListener('cellClicked', function(e) { clearTimeout(timer); clicks++; var evt = e; timer = setTimeout(function() { if(clicks==2) doubleClick(evt); if(clicks==3) tripleClick(evt); clicks = 0; }, timeout); }); } }); }); Not that complicated, right? But huge result ? PS: Do you see the click on the reload button? Loading > 900 rows of data with RockFinder in a breeze ? -
if anybody has ever wondered how secure uniqid is to use (from a security and an uniqueness point of view): https://www.sjoerdlangkemper.nl/2016/06/09/how-phps-uniqid-works/
-
- 5
-
-
-
Even if you have multilang enabled you can setup templates to only be single-language. Then all the fields will only have ONE inputfield (ONE language). All the field labels will have the user's corresponding translations. And there will also be only ONE path for each page, so I guess it will work with page-paths-module. Just try it out. I guess doing a translation mess with custom if/else hooking crazyness will be worse ?
-
hey @adrian just had to update thousands of pages via tracy and that's a bit of a problem using the tracy console because if the task takes a long time you have no idea what is going on behind the scenes... that's my workaround that i'm using: ini_set('max_execution_time', 60*10); file_put_contents('debug.txt', ''); $sel = 'template=feedback'; d($pages->count($sel)); foreach($pages->find($sel) as $i=>$p) { file_put_contents('debug.txt', "$i: {$p->id}, {$p->path}\n", FILE_APPEND); $p->save(); } Then I do this to follow: tail -f site/assets/cache/TracyDebugger/debug.txt Of course that is totally fine to use, but it would be even nicer to have something like this: $sel = 'template=feedback'; d($pages->count($sel)); foreach($pages->find($sel) as $i=>$p) { fd("$i: {$p->id}, {$p->path}\n", 60*10); $p->save(); } fd() being filedump() setting the max_execution_time, flushing the file on each new console request and appending the dump to it while execution is in progress (just like in my verbose example above); What do you think of that idea? I know there are other tools around and I'm thinking of implementing such a feature for my RockGrid batcher, but tracy console is always available and by far the quickest option. Or is there maybe a similar option? fl() dumps only when finished, so if there is an error (max execution time or max memory or the like) you are lost... if the dump is in a file you can lookup how far you got and continue from that stage. edit: fd() could also be handy when dumping huge amount of data or html code or the like, because then you could leave that file open in your IDE and anayse it quickly with syntax highlighting etc. VSCode automatically updates the file while it is populated. For larger dumps tail -f would be better of course. Another example of doing a cleanup, population of random values and creating cache:
-
why don't you want to install LanguageSupport?
-
Ah, sorry @flydev I missed that this happens when clicking on the module's page and not during installation. I pushed an update that does the check if RockGrid is available, otherwise it does not add this field (and shows only SQL). The process module is not really helpful without RockGrid, I know, but the day will come where I can release RockGrid ?
-
please try to install the regular module before the process module No, I have a clean installation only with AOS + Tracy and it worked
-
Hi @flydev sorry but I cannot reproduce this bug. I need step by step instructions, pw version etc... It is already there: https://modules.processwire.com/modules/rock-finder/ not sure when it updates, though (it's still version 7 instead of 1.0.0).
-
If anybody is already using RockFinder make sure you have the latest version (1.0.0). Just pushed an update because the previous version didn't work with checkbox selectors because I only used the WHERE part of the original query. I switched now to a join, that should work in 100% of the cases:
-
@dragan do you know adrians admin actions module?
-
You are right, my mod works. Just edited aos.js instead of aos.min.js and that had no effect ? Could you please change both occurances of querySelectorAll('textarea') to querySelectorAll('textarea:not(.noAutosize)') as requested? Thanks!
-
interested as well. did you already read https://www.google.com/search?q=site:processwire.com+sendy ?
-
Ok, I've created a PR that does at least the first part of what I requested: https://github.com/adrianbj/TracyDebugger/pull/22 @szabesz adrian was crazy enough to implement exactly what you requested, so that's is already possible ? @adrian Regarding my PR: Not sure why, but I have an options field that does not show any information about the selectable options in the request info panel. Also I'm not sure how to work with multilanguage fields, as the inputfield seems to be always single language.
-
I'd be in for that ?
-
You can already disable the request panel... And you can disable tracy completely. Don't think there is a need to overcomplicate things where we already have solutions ?
-
thx @Robin S @elabx @flydev This works: $p = new Page(); $p->template = 'project'; $field = $this->fields->get('title'); $form->add($field->getInputfield($p)); I've had an error in my field's config (requesting dynamic data, getting a page via $this->wire->process->getPage(); and that threw an error. I thought I was doing something wrong but with the title field it worked ? Thank you! Edit: This also works: $form->add($this->fields->get('recipients')->getInputfield(new NullPage()));
-
Preview/Discussion: RockDataTables
bernhard replied to bernhard's topic in Module/Plugin Development
Not sure about this on such large numbers. 10k pages per se should be easy. But with hundreds of users..?! Would need a test-run for sure. Maybe caching would be necessary or at least helpful. Are you interested in a closed beta test run? -> pm -
hey adrian, hope you are enjoying your vacation! what do you think of adding a section in the request info panel that shows the code needed for creating this field via api (for example in process module)? $form->add([ 'type' => 'page', 'label' => __('Mail auswählen'), 'derefAsPage' => 1, // single or null 'inputfield' => 'InputfieldAsmSelect', 'template_id' => 73, // mail 'value' => 23669, ]); The request info panel has all the necessary informations: If we had a section "Field code" we could just create fields in the Backend and then copy/paste them in our modules ?
-
301 Redirect for curl (and facebook crawler)
bernhard replied to verdeandrea's topic in General Support
If you set trailing slash to "NO" but facebook requests the page via trailing slash that would lead to a 301, so you need to try both settings. You could also try a browser extension (mine is called redirect path) to see if you have any unwanted redirects on that page.