Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


flydev last won the day on July 15 2023

flydev had the most liked content!


About flydev

  • Birthday 09/21/1983

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    France 🥖

Recent Profile Visitors

8,385 profile views

flydev's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. It can be confusing as the readme contain a typo in the given example, the right command is the shorter, without a dash: `wirecli`
  2. Hi, I personally dont remember how the whole thing works, I suggest you to try @Juergen form if you can’t afford the paid v2 maintained by Ryan.
  3. Ok, so would you need a feature that would allow you to customize asset paths during a backup?
  4. Hi @protro But does it work even if you upload the site manually? I am asking that because as the path is written in the body field raw data in the db, with or without duplicator, image paths should be corrupted in any way. As example and based on your setup, the data of a body field with an image should look - on dev and prod - something similar to (can you confirm ?) : <p>Sagittis turpis ad habitasse risus lorem phasellus platea imperdiet aenean, platea porta adipiscing dapibus velit eros purus malesuada laoreet vestibulum</p> <p><img src="/my-site/site/assets/files/1/44849-the-image-2016.897x0-is.jpg" alt="" width="897" /></p> <p>...</p>
  5. @Flashmaster82 can you give me details about the version you are trying to install and your php version please?
  6. Hi, it seem a server issue, but for now we cant see what is the root source of the disk being filled. Do get an access to ssh again, which is the most important thing for now, you could use à logged user, and then in the admin, delete all logs file, then SSH asap. Once in the server, check /var/log and remove some old *.gz or the bigger to get more space, then investigate. Try to make a backup or an image of the server if you can before doing root cmd.
  7. @James Morris I had fixed it in on the feature-encryption branch, I will need to finish the feature and merge it, but meanwhile, can you try this version and let me know and confirm ? there: https://github.com/flydev-fr/Duplicator/tree/feature-encryption direct-dl: https://github.com/flydev-fr/Duplicator/archive/refs/heads/feature-encryption.zip Edit: @James Morris please try instead the dev branch, It is based on the latest v1.5.1 and contain the S3 fixes. dev branch: https://github.com/flydev-fr/Duplicator/tree/dev direct download: https://github.com/flydev-fr/Duplicator/archive/refs/heads/dev.zip
  8. Yes I saw that, but it was in the commented line so I didn't fixed it instantly, will push the fix. Ok I see, in first instance I had in mind to put a button to get the template script copied in the clipboard in order to paste and modify it. I will push also the fix following your recommendation 👍 I was also thinking of pushing a new feature that would allow you to export and import module settings on other installations, what do you think, it could help?
  9. @adrian with v1.5.1 you can write your dump script in the custom shell script config field like that: #!/bin/sh # Custom Remote Dump # (1) Set up all the mysqldump variables FILE=%%FILE%% DBSERVER=%%SERVER%% PORT=%%PORT%% DATABASE=%%DATABASE%% USER=%%USER%% PASS=%%PASS%% CACHEPATH=%%CACHEPATH%% # Fix trailing slash in cache path if needed CACHEPATH="${CACHEPATH%/}/" OUTPUT="${CACHEPATH}${FILE}" # (2) in case you run this more than once a day, remove the previous version of the file unalias rm 2> /dev/null rm ${FILE} 2> /dev/null rm ${FILE}.zip 2> /dev/null # (3) do the mysql database backup dump (remote) mysqldump --opt --protocol=TCP --user=${USER} --password=${PASS} --host=${DBSERVER} --port=${PORT} ${DATABASE} > ${OUTPUT} You can of course also set hardcoded values.
  10. Hi, sorry for the delay guys. @adrian I made it configurable, it should also check for carriage return when a custom script is given, please check releases/tag/v1.5.0 and tell me if you need something more. Edit2: Rereading your post again, I just realized that I omitted a detail... it'll be ok on v1.5.1 sorry. @Boost Thanks 🙂 . You can check if mysqldump is avail. on the config page. And if needed, to be sure that mysqldump is found, you could run some tests, also make sure - with Duplicator 1.4.29 - that the binary zip is available. Duplicator v1.5.0 show you this information on the module configuration page, with some more friendly exec return code error when the script run (see link at the end of this post). Some suggestions/debug steps if needed: is mysql in env path and runnable? with normal user type `mysqldump` and `zip` if #1 is ok, try with user/group assigned to your web server, eg. with www-data: sudo su www-data -s /bin/sh mysqldump zip For `mysqldump` only - grab the dump script there and adjust variables in order to make a test cd /path/to/site/assets/cache sudo wget https://raw.githubusercontent.com/flydev-fr/Duplicator/v1.5.0/scripts/mysqldump.unix.sh sudo nano ./mysqldump.unix.sh and set correct or dummy values (or with vim, etc..) sudo chown www-data:www-data ./mysqldump.unix.sh sudo su www-data -s /bin/sh chmod +x ./mysqldump.unix.sh run a test: ./mysqldump.unix.sh Anyway, you should grab the last version I just release before messing with it, because if the issue is that zip isn't available, it will fallback using WireZipFile. Edit: Just a word, I got this issue and it was zip that was missing (about exit code 2). https://github.com/flydev-fr/Duplicator/blob/8d2ee3c0327baf4cee0128b12a0724d20dadfb53/Classes/BackupDatabase.php#L253-L270
  11. Hi @protro Rainbowkit is a really good package but last time I checked it (some months ago) I could see that it's built on wagmi, which is only working with React and then didn't paid so much attention to it as I am only coding on Svelte. Recently I saw popped a port of wagmi on svelte but still not tested it. FYI, the inertia module linked miss a little update, and the samples provided you will found are deprecated and are built using webpack. Did you have some experience with JS libs or frameworks (I mean vue, react or svelte) ? If not, I suggest you to start on Svelte as it's really the easier and natural frameworks to start on without experience. Anyway, as you said it, links above will helps you for sure. With any app sample you can find, you just have to send an ajax request to your ProcessWire page/template to get an answer with the required api keys/tokens/ whatever you need. Example: // 1. create a template called `web3` with a text field called `apikey` // 2. create php template in `site/web3.php` and leave it empty with no code // 3. create a page called `web3` with template `web3` // 4. in `init.php` write: // this function will help you to fight CORS issue between your app and pw site function cors() { // Allow from any origin if (isset($_SERVER['HTTP_ORIGIN'])) { // Decide if the origin in $_SERVER['HTTP_ORIGIN'] is one // you want to allow, and if so: header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); header('Access-Control-Allow-Credentials: true'); header('Access-Control-Max-Age: 86400'); // cache for 1 day } // Access-Control headers are received during OPTIONS requests if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) // may also be using PUT, PATCH, HEAD etc header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}"); exit(0); } } /** * Example of a simple router using ProcessWire's built-in URL hook system. * By appending /json to any page URL, you'll get a JSON representation of the page * * Require ProcessWire 3.0.173 or newer. * see: https://processwire.com/blog/posts/pw-3.0.173/#outputting-json-data-about-any-page-when-the-last-part-of-the-url-is-json * * Note that this is a very simple example. For more advanced routing, you might want to * use a Process module like AppApi made by @mauricio. * */ $wire->addHook('(/.*)/json', function($event) { $page = $event->pages->findOne($event->arguments(1)); // fight cors (for test purpose only) cors(); if($page->viewable()) return [ 'id' => $page->id, 'url' => $page->url, 'title' => $page->title, 'apikey' => $page->apikey ]; }); // from any javascript lib or framework, send a request and get an answer const response = await fetch("https://localhost.local/web3/json"); const data = await response.json(); console.log(data); // <-- contain json answer /** { id: 1000, url: "https://mywebsite.local/web3", title: "web3 page", apikey: "API-ABCD-0123" } */ I've fallen behind on the vite and inertia module release, but it's coming, it's a matter of days, I suggest you to wait for it and try the web3 sample coming.
  12. Hi and welcome @ryangorley 👋 1. give a read to: https://processwire.com/about/what/ and 2. refer to #1 3. the very first one tool you and the team need while working with ProcessWire is: https://adrianbj.github.io/TracyDebugger/#/ https://processwire.com/talk/forum/58-tracy-debugger/ ✨Suggestions: - keep an eye on @Robin S gems (modules) handy on every situation: https://github.com/Toutouwai - subscribe to weekly.pw - and do not hesitate to search and use the forum, even for "i will feel dumb" questions. Enjoy 😄
  13. Yes, and I misread your post, I didn’t paid attention that the site is served from MAMP through prepos proxy. And as you already spot, they are transformed in your bundle source. Keep in mind that all process calls are Node.js things and aren’t available in the browser. Anyway, on the example of Alchemy, the api key is made for you, what I mean is, the front app make a request to ProcessWire endpoint, then the needed requests are made from ProcessWire to alchemy endpoint using your api key stored on server side, eg. in template or module, db, .env file/process, then Alchemy answer your server, and finally, ProcessWire send back the response to the front app. It seem you got the idea. What is complicated on your side, if I can help? If is just to test and see external services like alchemy from local, just do not scratch your head to much, and use them as they are, included in the bundle. Using env variable on this case make things easier than going into the source code to change them.
  14. @protro nice tool, I think I am going to build something similar but based with vite/rollup. About your issue, as you pointed it, your are serving your website from MAMP server, then the env will not be available on built app when served by MAMP and you will need to use a solution like php dotenv, and I saw you already read the thread about dotenv then I assume you got it working ? It's also worth noting that by using prepros you are bundling your app with webpack and not vite or rollup, keep in mind that when you will head to js libs documentation or when trying to find what's is not working. Under the hood, there is the stack list: Webpack 5.86.0 Babel 7.22.5 Autoprefixer 10.4.14 Node Sass 9.0.0 PostCSS 8.4.24 PostCSS Preset 8.4.2 Dart Sass 1.63.3 Tailwindcss 3.3.2 Terser 5.17.7 Yes. Or to be more precise, what we can call Entry points. It contain the entry point of your app and the vendors. For more information about the splitting process head to webpack doc.
  15. @strandoo without brainstorming a lot, you could setup an hidden pre-filled field. You certainly want to use `processLoginForm()` and optionnaly `loginSuccess()` hooks. Example there on this old thread, feel free to ask for help: Edit: I highly suggest you to buy a license for the Pro version if your project can afford it, the module is safe, but when dealing with secure access, you want something maintained. You will have possibility to ask ryan directly, and it's a way of "sponsoring" Ryan dev, without speaking of the benefit to the community. 👆 ... comes from the company’s Managing Director (you want to keep a good reputation 😁) That was my positive comment of the day 🙂
  • Create New...