Jump to content

flydev

Members
  • Posts

    1,366
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. This is because Duplicator, as ProcessWire module, rely on ProcessWire code and thus, the PHP interpreter. Then after saying that, you will remember that in PHP you have basically four (4) errors - notice, warning, parse and fatal error, and you will also remember that a notice give you a hint generally for an undefined variable but do not stop the code, the second tell you that you will end up scratching your head in the future but again do not stop the code. The third tell you that PHP can't parse the code and logically stop the code, as well as the last - the same as you got in - clearly say that the error is fatal and stop the code. At this point, your whole app is broken. If we were using an external tool to make the package/backup, we would not encounter any error. This is the main answer of your question. Hope it help ??
  2. Mmh from what I read, the issue doesn't appear to come from Duplicator but from an issue in /site/templates/_main.php line 79 on the call of displayAds which doesn't exist in Duplicator.
  3. @kalimati could you please give me more information by checking : generated log if it exist located in `site/assets/backups` ProcessWire error log PHP(-fpm) error log then reported back here please. Thanks. Edit: Are you aware of an eventual hosting provider upgrade ? Did the website and/or database as grow since last backup ?
  4. @adrian @Claus fixes pushed - thanks you ?
  5. Thanks @Claus, i will push an update to take into account this specific case.
  6. If you create this file on the root directory and navigate to https://mysite.xyz/test_disk.php it should work. ps: Please re-read my edited post above.
  7. @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 ?
  8. 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 ?
  9. 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.
  10. 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:
  11. @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 ?
  12. 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
  13. 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.
  14. @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
  15. 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.
  16. 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.
  17. Correct - let find an argument then, it was more fun to write, I like chaining things ?
  18. 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.
  19. 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/
  20. 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();
  21. @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)); });
  22. 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
  23. 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.
  24. @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 :
  25. 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.
×
×
  • Create New...