Jump to content

flydev

Members
  • Posts

    1,360
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. @Claus this issue is quite strange as it's a core PHP function. Could you test to create a file test_disk.php containing the following code <?php echo phpversion() . " - " . disk_total_space(__DIR__); ?> and navigate to this php page to check result ? If you still have an issue, it could be that your host disabled this function on php.ini disabled_functions directive. On PHP-8 : Which hosting provider are you using ?
  2. Just to be sure, it's correct to say that if I paste the class you wrote on the other thread and write down the routes, without installing this module it result on the same things ?
  3. I bet that the first version of LR was removed because the module is not maintained in favor of the new version. As well, the pro module make things easy to implement and will let you sleep tight, as most hassles (security.. blabla..) got handled by ryan and contributors. If you want to try it out before pulling out the wallet, you can find the free version on the author's github ? https://github.com/ryancramerdesign/LoginRegister - (I have myself the first version in the wild since years without issue / registration disabled) and you will find some threads around the forum to customize it.
  4. You could also use (if up-to-date) the free version of the LoginRegister module, or you will find a lot of implementation here in the forum, eg:
  5. @rjgamer I check it. Thanks you @adrian , the update also contain your change - feel free to ping me if something is broken. --- @rjgamer I checked it on PHP-7.4, 8 and 8.1 and I don't get any error, the package is created after invoking cron.php When you can please update to v1.4.18 and fill an issue if the problem persist ?
  6. March 2022 UPDATE The module got updated, the current stable version is the ^1.4.17 The module can be updated troughs ProcessUpgrade or from Github, all the updates and fixes made by @Autofahrn are now in the master, some minors fixes was also pushed. The main feature of this update beside all the fixes is the native backup mode which use mysqldump if available and set in Duplicator options. ? I have not tested it personally on PHP-8 but @rjgamer made some update to fixes notices and warning. - a test of a backup of 2GB was successfully created on 169 seconds duplicator.mp4
  7. As @Robin S suggest, you can try mysqldump in a script, it might be available from the admin panel, or you can also try the module Duplicator, I just updated the master version - you can try the web-mode or the native-mode (which use mysqldump) to see if it works. In the past we got quite good results on limited shared hosts.
  8. @cpx3 give a read to @MoritzLost's article: https://processwire.dev/performance-optimizations-for-processwire/#server-side-caching-template-cache-and-procache and there https://github.com/MoritzLost/CachePlaceholders - #motivation-and-breakdown
  9. On my side, from what I understand (and what I would like to see implemented) is something like the following : - in config.php set $config->restapi = [ 'endpoint' => 'api', 'enabled' => true]; then use simples built-in functions to get data from api (eg, home page) GET /api/1 Anyway, even if it could/should be easy to use, things are a bit more complex than what we can see here in this thread. I mean, almost all functionalities of AppApi should definitely exists.
  10. Good post @Ivan Gretsky, I recently asked something similar about ProcessWire it-self there and forgot to mention modules's authors. Shame on me and I also suggest @adrian (and others) to give the possibility to not only to send a coffee or a simple donation, but a monthly donation. What's is "cool" about it on Github - it could be taken a bit as narcissism but it's not - it's to show that we are sponsoring a project on our page and make us proud of it.
  11. Correct - let find an argument then, it was more fun to write, I like chaining things ?
  12. Result, it crashed two times, but managed to delete 2 millions of pages in about ~15 hours ?? RockFinder really helped here - it reduce the code that should be written and the server overhead of getting the millions of record through a loop.
  13. Hi @Laegnur and welcome here. Your issue come from the fact that your translated strings are on the same line (I admit it could be tricky to spot on first instance if you are not used with ProcessWire). To understand better, please read this sentence : So to get it working, write the first line on two lines lol : <?php // i18n - copyright echo _x('All rights reserver', 'copyright'); ?> <!-- html markup - separator --> | <?php // i18n - developer echo _x('Developed by', 'developer'); ?> You can use of course the syntax you want, just keep in mind that the strings need to be on two lines. For more information about: https://processwire.com/docs/multi-language-support/code-i18n/
  14. Thanks, it's running on batch of 5000 records and I will see how much time it take. I guess I still have the benefit of not crashing the server while getting all the candidate pages. $end = strtotime( "2021-02-27 23:59:59"); // loop $database->beginTransaction(); $result = $rockfinder ->find("template=receipt, numChildren=0, created<$end, limit=5000") ->each(function($row, $finder) use ($database) { $finder->pages->delete($finder->pages->get($row->id)); }); $database->commit();
  15. @bernhard How you would have started to delete more than 4 millions pages ? $end = strtotime( "2021-02-27 23:59:59"); $result = $rockfinder ->find("template=receipt, numChildren=0, created<$end, limit=25000") ->each(function($row, $finder) { $finder->pages->delete($finder->pages->get($row->id)); });
  16. Eh nothing, all is ready, we have even more with JWT implementation. It's just missing a function which return the pages tree. Something like less than 10 lines of code. Already shipped with : - Authentication - Three different authentication-mechanisms are ready to use. - Access-management via UI - Multiple different applications with unique access-rights and authentication-mechanisms can be defined And you can generate your own routes dynamically by just adding a simple hook. Installation will/should be required in every case, even with a core module. But you should give a try to the AppApi module, you can start in less than two minutes, check : Enregistrement #27.mp4
  17. I admit that this functionality could/should be included in the kernel (but disabled by default) as I personally use it for every installation, but still I didn't feel the need for it (getting it in the core) as I find the flexibility provided by the module AppApi made by @Sebi more interesting. Just include this module in your setup and you are ready. Anyway the argument is really good about that it will excite new users who have not yet tried ProcessWire but want to give a try when they see that they can use/build an API out-of-the-box.
  18. @wbmnfktr this module is for you : https://processwire.com/modules/blackhole/ Then add the 3 `wp-` magics folders and you will get rid of most bots :
  19. If you are interested I can take the time to publish a draft of a profile which you could use as starting point, and IMO it's better and easily than other solution that I could have tested. Basically it use a modified version of InertiaAdapter made by @clsource and let you code your app inside ProcessWire's template and using pages for everything fetched dynamicaly and internally, as JSON. You can see it "in action" in this example url: https://blog.sekretservices.com/ (Do not take care of the issue while refreshing the blog post due to hanna codes, it's an old version) For example, from your template you build the page properties as a simple PHP array, let's say I want to fetch the title of the page: $component = "Home/BlogPost"; $properties = [ // accessible from app components with $page.props 'name' => $page->name, 'title' => $page->title, 'subtitle' => $page->subtitle, 'content' => $page->body, 'author' => ucFirst($page->createdUser->fullname[0])."."." ".ucFirst($page->createdUser->surname), 'date_created' => $page->created, 'date_relative' => $datetime->relativeTimeStr($page->created) ]; Then from a component BlogPost.`{svelte, vue, react}` (or whatever) you can simply retrieve the page's props like: (Svelte example) <script> import {inertia, page} from '@inertiajs/inertia-svelte'; export const { title:title, body:body } = $page.props </script> <div class="blog-post"> <h1 class="font-sans mt-8 text-center font-bold">{@html title}</h1> <div>{@html body}</div> </div> Look at this sample, at the page's tree and the routes prop from the console : About the workflow, it's not really different from what you should be used to. You write your logic in template in PHP then write some HTML/JS in your component. Also, hot module replacement (HMR) is working ? A word about server side rendering (called SSR and which is needed to get best SEO results), it's working for React and VUE, still a WIP for Svelte ? Get a note of ?on every lighthouse performance. Bundled with ViteJS, powered by ProcessWire, I am glad to say that it's the best stack I have ever built and used ?? Edit: A small note, but the better one. You don't have to build your app again on every change on the backend, I mean for example when you add a new page, it's work out-of-the-box, you create and page, and it's available to your JS components. Edit2: To understand better, here we can achieve what you already used/saw with Laravel. Having a `src` folder with the JS things, another folder with the Laravel `app` and running artisan and some npm command. Here, in dev mode, you run `yarn dev` and you are ready. Simple as that.
  20. I missed the point you are using caddy. You can also show us the webserver error.log, php.log and an output of phpinfo().
  21. What could be helping here is the PHP logs. From experience when you do an upgrade after verifying compatibilties, issues can arise from access permissions. 1. empty manually the mysql table session_login_throttle 2. get php version (php8 got patched last month, addressing an issue in session serialization, might not be related) php -v ... paste output php -m ... paste output (you should check that every mod required by processwire is installed) 3. reload caddy sudo systemctl caddy reload 4. verify php-fpm sudo systemctl status php8.1-fpm ... paste output 5. check the logs cat /var/log/fpm-php.log ... paste output
  22. Hi everyone ?? I hope everyone is doing well here. @ryan It's something I have in mind for months, even if am not actively participating to the community (?), I am still using this tool for quite everything and I know that we can support the project by buying license of Pro Modules. That's said, personnaly I am not using them as I mostly build custom modules, or even use it as is. I would like to have the ability to financially support you and people whish maintain this tool. Eventually, Github's Sponsors could be a good choice; You could choose a one-time payment or a recuring one. What do you think about it ?
  23. Recently @Wanze starred a free app on Github, just awesome : https://github.com/responsively-org/responsively-app It's a browser modified that show how a website work in all selected devices. I think a lot of people will fall in love for this soft - give them a star on github ?
  24. Welcome here Seema, you just spot a damn good community, ready to help and share in a professional fashion ? Where are you from (if its ok) ?
  25. Just a heads-up on this, Really strange, when using nested hannacode, each nested hannacode add 100ms to TTFB. I saw old issue on Github and a commit about nested hannacode but I ask myself if it was tested with a lot of content and something than more than 30 hannacode in the same body field. I used RockReplacer from @bernhard and the whole page load in 200ms instead of 1.8s. It was used like: [[tag element="div" class="row"]] [[tag element="div" class="col-6"]] $content [[end-tag]] [[end-tag]]
×
×
  • Create New...