Jump to content

flydev

Members
  • Posts

    1,366
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. Hi @Wanze I don't know if it's possible in the current state of the module to disable "Global File Template" for a given template file. I needed this feature in order to work with a REST API endpoint. The problem is when I try to get JSON data from http://my.sites.sek/api, the markup of the global template file is sent. I forked your module and added an option to ignore the global template file on given template. If it make sense, I can send a pull request.
  2. Okay, I tried it yesterday, but got this error on the dev3 branch: Exception: Class '\ProcessWire\RockFinderFieldText' not found on line: 58 in /www/sites/kp/wwwroot/site/modules/RockSqlFinder/RockFinder.module.php
  3. Using the module from the dev2 branch, I made a test based on your example but on my side it return an error. $selector = "template=transactions,date>=1522620000,date<=1523051999"; $finder = new RockFinder($selector, ['montant_especes', 'date']); $finder->sort = false; $sql = $finder->getSQL(); $results = $this->database->query("SELECT sum(montant_especes) as especes FROM ($sql) AS rockfinder"); The field exist in the database : PS: copy/pasting the query returned by Finder in PHPMyAdmin throw the same error. Also, the query returned look weird, check the where clause : SELECT `field_montant_especes`.`data`, `field_date`.`data` FROM ( SELECT `field_montant_especes`.`data` AS `montant_especes`, `field_date`.`data` AS `date` FROM `pages` LEFT JOIN `field_montant_especes` as `field_montant_especes` on `field_montant_especes`.`pages_id` = `pages`.`id` LEFT JOIN `field_date` as `field_date` on `field_date`.`pages_id` = `pages`.`id` ) AS `` WHERE ``.`id` IN (...)
  4. I just took a look at the number of pages I got into the system, there is 407446 pages found, expecting around 1.2M pages at the end of the year. I didn't got the time to test your module again deeper but it look promising. The only thing I am scratching my head in, its the calculation of multiple fields on 100K+ pages at one time... Did you tried something already ? Actually, doing some calculation on 119k pages on one go take about 19seconds and rendering a chart from this number of pages take about two or three minutes! ?
  5. Hi @Karl_T sorry for that and thanks for reporting this issue, I think I have an idea why is happening - checking this afternoon.
  6. Hi, Double check that you are not sending the email to a domain out of your control. Double check your SPAM folder If you use a Google account, you have to disable a security option on your account Read this thread and get back to us
  7. Stuck to delayed output for a while before using to a template engine, I really should give a try to markup region with it. A quick ref for myself: https://processwire.com/blog/posts/processwire-3.0.49-introduces-a-new-template-file-strategy/ https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/
  8. you can just put a get variable ?register=1 on the request and it will show the registration form..
  9. If you put namespace ProcessWire; on top of the module file, does it work ?
  10. I Will make a thread ?
  11. I finally found my mistake - it was an autoload module. Also another mistake was the selector. I was using the has_parent keyword on a ~360k pages, growing each night. Selecting a direct parent reduced considerably the time of the aggregation. It take ~18 seconds to do some calculation on 112 689 pages fetched, but it take 60 seconds to build and show two charts from theses 112k pages. Still looking to improve it before scratching my head into MySQL stocked procedures. Didn't checked the repo, do you have pushed an update regarding the implementation in RockSqlFinder yet ? okay
  12. https://github.com/nefe/You-Dont-Need-jQuery
  13. Okay, Not sure how to debug the right query in the module, but The findIDs() in buildQuery(), in the DBMS take 0.3087 second for 18119 pages. The query ($query) in findObjects(), in the DBMS take 1.9846 seconds for 18119 pages. And, why we have a difference of ~10 seconds when calling findObjects() or even findMany() from Tracy ? Edit 1: same average with 96611 pages. Edit 2 : I stumbled on this thread : If you are interested, I have the code of two hooks which implement COUNT(), SUM() and DATEDIFF().
  14. I don't want to pollute your official thread so I post here. Perhaps you have an idea before I go further in my questions I have a template which contain some fields. Two of them are timestamp, rest are integer. What I want is to fetch pages that are in a date range, so I have this selector : In this example, the system fetch 18119 pages. Results : It take around 10 seconds to fetch all pages, in the DBMS it take 0.3908 second(s) for 18119 pages. I think I am missing something
  15. Thanks for this module @bernhard , I am going to test it heavily today. In the project I built, similar to what you showed us, we are calling 30,000 pages to 100,000 pages per iteration (17 atm) and doing heavy aggregation on it to generate statistics and chart - a pain, hopefully fixed with your module. At this moment I am using this module quite modified for my need which add custom functions to the Page object by hooking it. I think that today I will re-write my hooks using your module. Feedback coming. Thanks again for the work and congratulation ?
  16. Maybe you could provide a Gulp tasks file along the module which could be called and generate a rockdatatables.min.js/css.
  17. If you are not using TracyDebugger, then I urge you to install it then debug both variables, you will find your answer
  18. The value of the Inputfield is set from an user trough the module config page ? If yes (I dont know how your module work) , then imagine the following, in the getDefaultData() you have : protected static function getDefaultData() { return array( 'ml_myfield_data' => '' ); } In your getModuleConfigInputfields() : public static function getModuleConfigInputfields(array $data) { $data = array_merge(self::getDefaultData(), $data); // [...] $f = $modules->get("InputfieldCKEditor"); $f->attr('name', 'ml_myfield_data'); $f->value = $data['ml_myfield_data']; $f->useLanguages = true; // [...] } Then in module ready() (for testing purpose) you can return the right language : if($this->wire('languages')) { $userLanguage = $this->wire('user')->language; $lang = $userLanguage->isDefault() ? '' : "__$userLanguage->id"; } else { $lang = ''; } bd($this->data['ml_myfield_data'.$lang]); // debug with tracy After you change your language in your profile, it should return the right language.
  19. I really like the cursor !
  20. Its the same features yes. Only the data space is limited. More info there: https://www.idrive.com/online-backup-plans-faq
  21. I lol'd, thanks. Yes sure, but its robust! Like ProcessWire and his 90s homepage ? They work on features, no time for frontend fashion things!
  22. Hi @pycode, welcome to the forum. First advice, if you need more answers, try to format your post with the forum tools so it will be more readable by us ! Wrap your code into the code tag, use quote for errors, etc. About the error you are encountering, looking at the line 777 of the _uikit.php $n = $page->comments->count(); It seem that the function want a Page with a comments field registered on the template. To fix it, just add the comments field to the according template and everything should work. I also suggest you to read this thread :
  23. Cool! I forgot to say that the Dropbox API installation is only supported trough Composer. I will see if I got the time to make a "standalone SDK". Also I don't know if people here already heard about of the cloud backup solution for professional, iDrive. Our company is a long time customer of their services and we never had an issue. They have military grade security implemented on backups. I was not going to promote their service as I trough they had only paid plans, but finally they have a free plan of 5Gb. I would like to say that there are no more reason to not have a professional backup solution for your client ! It will be implemented in Duplicator very soon as I need it quickly! ?
  24. For people interested, Dropbox support is back. It needs to be tested a bit
  25. Sorry - ok understood, its another issue then. Thanks again.
×
×
  • Create New...