Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Hi @flydev and @kixe - I am using Duplicator and CronjobDatabaseBackup on a site and I would like Duplicator to also send the DB backups created by CronjobDatabaseBackup to Google Drive. The problem is that because by default they both store files in site/assets/backups My solution has been to move Duplicators backups to /site/assets/duplicator and then uncheck the "Backups" options under the "Files and folders excluded from the package" setting. This should work, but I think perhaps there could be a cleaner solution. Also @flydev - I think the warning about exponential size if unchecking "backups" should have the caveat that it is only relevant if backups are being stored under /sites/assets/backups. The other quick question - if I set the max number of packages to 10, but leave the "Remove backup packages older than" option to "never", what will happen. I assume that as the 11th is added, the 1st will be removed, but this seems to contradict the "Remove backup packages older than" option. Can you explain exactly what happens here?
  2. @flydev - I set up the system cron last night and didn't think too much about, but checking today I see that it didn't work. It turns out the issue is: $e = new HookEvent(); You just need to add the ProcessWire namespace to the top of the cron.php file and everything works as expected.
  3. Actually I think it could actually work really well. The predefined filters would be: template=answer - that would get you limited to all the answers. Now you just need to limit to the parent with the question they are interested in. You could add another ready filter for parent.name which they could use to enter the name of the question. The catch of course is that it's not friendly for the user, so what I think I would do is create a simple Process Module (or even an AdminAction) that lists all the questions and links to the Lister view that shows all the answers for the selected question. There are other ways to make links to Listers, but this module (https://modules.processwire.com/modules/process-page-lister-urls/) might make this really easy (I haven't tested it). Another option would be to add a custom page list action button (like edit, view, etc) that links to a lister view of all the answers for the clicked question. This won't help you right now, but I think I nice addition to Lister Pro would be to define a selector for providing a list of child pages to choose from, rather than having to manually type a name/title/id, etc
  4. I think the only issue you'll have with PW 2.5 and PHP 7 will be a few PHP notices. There shouldn't be any errors, but if you are not planning on upgrading that 2.5 to 3, then might be safer to stick with php 5.6.
  5. Why not do each question as a child page. And each answer as a grandchild. I have done this before and it works really well - it's infinitely scalable! Questions ---Question 1 -------Answer 1 -------Answer 2 -------Answer 3 ---Question 2 -------Answer 1 The question template would have just a title field. The answer template would have these fields: answer (select options): yes / no body (textarea): comments or even a real comments field type if you want, although probably not appropriate in the backend
  6. Glad you got it sorted, but while you are upgrading, I would really recommend PHP 7 if it's easily available on your host. If not, at least go for 5.6. If they don't have that, then look elsewhere
  7. Can you try disabling eccelerator in you php.ini to see if that helps?
  8. Thanks @flydev - it's awesome to have that option - not sure about using a "every 1 minute (*/1)" call as the example though
  9. Hey @flydev - I am finally getting around to trying this - everything works great, but I am wondering about triggering via a manual system cronjob. I expect Lazcron will result in quite a slowdown for whichever user is unlucky enough to trigger it. As for the PWCron module - I don't really like it at first glance because it looks like it is no longer being maintained.
  10. If you have imagick available on your server, please try installing the core module: ImageSizerEngineIMagick and if that helps.
  11. Hi @flydev - thanks for all the hard work on this. I am curious about the Dropbox API - are you planning on migrating to v2, or abandoning completely?
  12. Perhaps if you could give us solid reasons why Django is superior we could have a reasoned discussion. We might even be able to learn some valuable things that could be incorporated to improve ProcessWire, but unfortunately you are only providing responses like: "Only 3 lines of code in Django" If you actually want a reasoned discussion, please ask reasonable questions and provide reasonable arguments for your own opinions. Otherwise there is no point continuing this discussion. Thank you.
  13. Then unless they will change it for you, I think you are out of luck.
  14. Do you have access to the php.ini file? If so, simply remove flock from "disable_functions"
  15. Markup is what I do: $f = $this->wire('modules')->get("InputfieldMarkup"); $f->attr('name', 'config_intro'); $f->label = ""; $f->value = "<p>These settings will override those in the main config settings for this page.</p>"; $fieldset->append($f); I think you'll need lowercase "markup" using that approach to field configuration.
  16. Hey @kongondo - I am OT here and not meaning to single you out I was going to PM you, but thought I could make this a friendly public service reminder to hit the "Y" key in Github before posting links to a line of code so they will be correct even after changes to the file. Thanks everyone!
  17. You might try hooking after: ProcessPageAdd::executeNavJSON This is an example of using that to modify the returned list of pages: https://github.com/adrianbj/AdminRestrictBranch/blob/838858fd36a78df808b7690b4cddcb3a6c25ffa3/AdminRestrictBranch.module#L144
  18. Yes, I have, although as I mentioned I am not saying it's an awesome service, but it seems to be relatively commonly used in Canada and so I thought it might be helpful for @digitex I have also used PayPal, Sallie Mae, and Frontstream with PW. Lots of options out there
  19. Additionally, you don't need a PayPal account - you can pay with your CC without signing up. I am not defending PayPal - I actually think it's a pretty ugly system to use, but it does mostly get the job done however you need. You'll always have more flexibility with other services though. In Canada, Moneris is a reasonable option - not modern like Stripe etc, but it can be completely hidden from the user - ie everything happens on your site with no redirect.
  20. @erikvanberkum I just tested on 3.0.60 (I didn't have easy access to 3.0.62 using the PW Version switcher ) and I can actually reproduce the issue you are having. Turns out it's a bug in the PW core in that version. Look at the difference between: 3.0.60 if($languages) $languages->setLanguage($language); 3.0.84 if($languageID) $languages->setLanguage($language); I would recommend upgrading to 3.0.84 to fix the problem! PS - in my experience, 3.0.84 is more stable than the current "stable" version.
  21. Might sound a little insignificant to mention, but I have found myself using the GOTO Page ID feature a lot but it was annoying me that there was no way to open the View/Edit links in a new tabs. Well, now you can - just use your standard "new tab" shortcut: middle-click, right-click > new tab, CTRL+left-click, 3-finger click, etc - really handy!
  22. Thanks @erikvanberkum - well it is returning 0 as expected, but the first line in your error shows that setLanguage is still being called. Could you please temporarily replace: if($languageID) $languages->setLanguage($language); with: if($languageID) { echo 'test' . $language->name; //$languages->setLanguage($language); } and let me know what you get.
  23. Also, next time for string versions, I think you should leave off the trailing period
  24. Some nice updates this morning for the Console and the Snippets Runner panels. 1) The code injection feature (the one that lets you run hooks etc at init, ready, and finished) now has better error handling. It will no longer inject code if it detects any type of error (previously it wasn't properly detecting 500 errors). 2) The Console panel now makes use of orange and red icon colors. The orange simply indicates that you are currently injecting code, and the red indicates that there is an error in your code and as such, nothing is being injected. 3) The Console panel now restores the last error to the results section on page load so if you missed the error when you clicked "Run" to register the code, you will see it again as a reminder of what needs fixing. 4) 500 errors in the Console and Snippet Runner panels now show the full error message - previously this had to be tracked down in the browser dev console's Network tab. Hopefully these changes will be nice improvements to debugging code in the Console and Snippet Runner panels. Let me know if you notice any problems. Cheers! PS I have been using the Console code injection feature for all my hook testing lately and really enjoying it.
  25. I see - I think I'd still persist with fixing those spex issues - I bet it won't be too difficult, but I obviously won't mention it again
×
×
  • Create New...