LostKobrakai

PW-Moderators
  • Content count

    4,579
  • Joined

  • Last visited

  • Days Won

    92

LostKobrakai last won the day on June 20 2017

LostKobrakai had the most liked content!

Community Reputation

4,494 Excellent

3 Followers

About LostKobrakai

  • Rank
    Hero Member
  • Birthday 11/29/1991

Contact Methods

  • Website URL
    http://www.kobrakai.de

Profile Information

  • Gender
    Male
  • Location
    Munich, Germany

Recent Profile Visitors

14,644 profile views
  1. LostKobrakai

    Disregarding the viability of using _callMethod() here: While I understand that ProcessPageView is awefully structured for hooks – I tried to make it work with a testing framework last year – I'd not suggest you calling getPage from your hook if you don't intend to replace the whole execute function. getPage() is not safe to be called multiple times, because it does modify global state and therefore does not return the same value on multiple invocations. Also I doubt searching for the called page multiple times would be good for your page response times anyways.
  2. LostKobrakai

    I certainly agree that the EU is once again trying to go from one extreme to the other which is quite probably not a good idea at all. If I understand this correctly it's about copyright, right of moneytization and licensing. All those things are mostly well defined in the non-digital world, while on the internet people just didn't care much up until now mostly because of anonymity and lack of ways to prevention or prosecution, while the impact of sharing unlicensed content is easily greater than in the analog world. I certainly see that reform critically for anything, where people want to get payed for or limit access to their work, because it would probably restrict many good cases of quotation/linkage as well. But the internet imho is great for the things, which are willingly shared and licensed to be usable/shareable/editable by other people. Most of my open source work is licensed under MIT or Apache just because of that. It just seems people just don't want to be bothered with the question of: Am I allowed to use a piece of information elsewhere. Sadly the EU just seems to be fully driven by publishing corporations trying to get their share of money from their content being shared instead of dealing with the issue in a sensible way.
  3. If @BitPoet's description is fitting for the intended project I'd say there might be more fitting tools out there than ProcessWire (also depending on your skillset though). It's a great CMS and you can make it work in a lot of situations, but it does have it's issues at bigger scale projects like being quite prone to n+1 queries if you're not cautious and pitfalls like getting into trouble with a great diversity in templates/fields because those are all loaded on each request. Caching can help in places, but dynamic content is hard to cache and personally I'd always look for the options, where you can get away without caching first before depending on it working out elsewhere.
  4. LostKobrakai

    It seems like nette is a bit less crufty than phpunit, which is nice. However I'm wondering how you're handling state in the database. E.g. how do you make sure if one tests creates a new page it's not affecting the next test?
  5. LostKobrakai

    Are you sure? I'd expect it to always return the object. It's just that the object implements __toString with it's name, so it's casted to a string if needed. @PWaddict With == it's doing the same thing, because __toString returns the name of the template, but if you'd use === they would no longer have the same result.
  6. LostKobrakai

    I'd rather have db backups stored outside the webroot then having them encrypted. By default they're protected by the .htaccess file, but screwing up that file is easy and common. But if that's working (or files are outside the webroot) only people with access to the webserver can see/use the backup files and are highly likely to also have access to the config.php and therefore the db credentials as well. In that case encryption won't give you anything anymore.
  7. LostKobrakai

    Just so people don't prematurely jump to disabling useful security features: Having cookies enabled to allow for session storage or csrf protection can be justified as "legitimate interest" (Art. 6 GDPR), which means you no longer need explicit consent. You'll probably still need to document that justification in the privacy policy, though.
  8. LostKobrakai

    @Jonathan Lahijani Those are certainly true for arbitrary uploads/retrieval from links, but less so for hardcoded, not user facing download links, where packages could even be chechsum checked before usage by the installer.
  9. LostKobrakai

    I think having a download option in the installer for getting additional site profiles beyond blank and basic would be the simpler option, which depends less on GitHub and people being familiar with it.
  10. LostKobrakai

    sessionAllow is a recent addition. Are you sure those instances run on a version needed for the setting to work?
  11. LostKobrakai

    The reason for adding findMany() was to not load all pages into memory like find() does. It does so by harnessing PHP iterators to load batches of pages within a foreach loop and discard already computed batches to free up memory again.
  12. LostKobrakai

    Generators are PHP 5.5+ so it won‘t fit for ProcessWire, which is still running down to PHP 5.3. But the new $pages->findMany() works similarly to how generators work.
  13. LostKobrakai

    It's certainly not intentional. https://github.com/LostKobrakai/Migrations/blob/master/classes/ModuleMigration.php There's what a module migration does. I'd expect that $this->modules->install($name) would also take care about installing any permissions of modules. — I just quickly checked the source and it seems this method should handle that.
  14. LostKobrakai

    Considering this it might be true in austria: https://euobserver.com/justice/141746.
  15. LostKobrakai

    To append to that: Autoloaded fields are retrieved by getById() as you said, but non-autoloaded fields are retrieved on first access of the fields property from the page ($page->my_field) as a separate query. This is an important fact to consider when needing performance, as that default behaviour is quite prone to cause n+1 queries.