Jump to content

theo

Members
  • Posts

    299
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by theo

  1. Yes, it is true. But this will get too complicated. It's just an exercise for me. Take ProDrafts if you need to cross reference elements by id. It will work in simpler scenarios it think. It is up to the "admin" to decide. At least the original page will remain untouched this way. You can even restore it from trash as if nothing happened. Thank you.
  2. On this cold and rainy weekend in Switzerland, I was trying to learn something about Processwire modules. "Page Draft Control" seemed an ideal starting point, because it has not so many lines of code and looks rather abandoned. While trying to understand it, I've added some code. For me the result looks quite usable, but I am very open for any suggestions, about what could be done better theoretically. I'm not going to further develop this, because there is ProDrafts if you need something perfect. Processwire modules and "ecosystem" are really great. Thank you.
  3. Hello Is there a multi-language version of this module? Thank you.
  4. Same problem here. Works after update (entities1)
  5. In addition to what blynx said: if ($flip) means the same as if ($flip!=0)
  6. Not sure: http://www.linuxjournal.com/content/happy-new-year-linux-journal-alive
  7. I did the update manually now. Interestingly, all the files were there, like "wire-3.0.87"-folder and then new htaccess and index.php. I just had to rename them and refresh module cache and the update was done. Not sure what the problem is. To me it does not look like a problem with the Webhosting. Thank you. Happy new year to everyone!
  8. I'm having problems upgrading pw using the upgrade tool. The file "dev.zip" is being downloaded to /users/pwdev/www//site/assets/cache/ProcessWireUpgrade/. It seems a valid zip, I can open it using FTP. After pressing "> Skip Database Backup" I'm getting the message: "Unable to locate ZIP: /users/pwdev/www/site/assets/cache/ProcessWireUpgrade/dev.zip" After that, the file and folder is indeed deleted. It's free hoster: http://phpinfo.square7.ch/ Any ideas? I think this worked before. Thank you.
  9. Bootstrap 4 is in beta now and there are some differences. Most important: It uses Popper.js instead of Tether.js https://medium.com/@lukaszholeczek/how-to-upgrade-bootstrap-4-alpha-6-to-bootstrap-4-beta-d43b4210f2a3 Just for information.
  10. I have only discovered this today. I have made a code template for netbeans. For the $page var, the template_name has to be filled in, then it should work with the template-stubs module. Hope it helps. /* ----------------------- ProcessWire API variables ------------------------ */ // <editor-fold> /* @var $page tpl_${template_name} */ /* @var $pages Pages */ /* @var $modules Modules */ /* @var $user User */ /* @var $users Users */ /* @var $permissions Permissions */ /* @var $roles Roles */ /* @var $input WireInput */ /* @var $sanitizer Sanitizer */ /* @var $session Session */ /* @var $log WireLog */ /* @var $cache WireCache */ /* @var $datetime WireDateTime */ /* @var $files WireFileTools */ /* @var $mail WireMail */ /* @var $config Config */ /* @var $database WireDatabasePDO */ /* @var $fields Fields */ /* @var $templates Templates */ /* @var $languages Languages */ /* @var $wire ProcessWire */ /* @var $wire \ProCache */ // </editor-fold>
  11. It works with Netbeans here. I can select the fieldnames from within the IDE.
  12. Do mean something like this? https://modules.processwire.com/modules/template-stubs/
  13. @flydev "Delete All" seems OK, but I was talking about the trashcans. <button id="deletePackages" class="ui-button ui-widget ui-corner-all ui-state-default" name="deletePackages" value="Delete All" type="button" data-action="http://localhost/~theo/mysite/processwire/setup/duplicator/?action=deleteAll"><span class="ui-button-text"><i class="fa fa-trash"></i> Delete All</span></button> Trashcan is wrong: <a href="?action=delete&file=2017-12-07_15-22-42-localhost.package.zip" class="trashTrigger" data-action="http://localhost/~theo/mysite/~theomysiteprocesswire/setup/duplicator/?action=none"><i class="fa fa-trash"></i></a>
  14. There is another little problem. I guess it has to do with mod_userdir. If you go to the package manager page and delete a package (trashcan), the item will be deleted but you will get redirected to an invalid URL. Sort of: /~theo/mysite/~theomysiteprocesswire/setup/duplicator/?action=none Thank you.
  15. Yes, it took a while. I had the idea before, but was using "file_exists" which is not enough. The file has to be readable. It's all fine now. The files were some hidden ".directory" files, which for a reason were not readable for the webserver. These were blocking the entire zip building process. Thank you.
  16. OK, some success here: Please add "is_readable" check in function zipData } elseif (is_file($file) && is_readable($file)) { $filecount++; $zip->addFile($file, str_replace($source . '', '', $file)); $limitItems++; Like this it works. If a file is not readable, it silently fails otherwise.
  17. Strange thing in function zipData I add these logs around $zip->close() ChromePhp::log($zip); ChromePhp::log($zip->close()); ChromePhp::log($zip); log.js:137 ZipArchive {status: 0, statusSys: 0, numFiles: 4951, filename: "/home/theo/public_html/mysite/site/assets/cach…cator-temp/1/2017-12-08_13-42-33-localhost.pw.zip", comment: ""} log.js:137 false log.js:137 ZipArchive {status: 0, statusSys: 0, numFiles: 0, filename: "", comment: ""} $zip->close() returns false. What could be the reason?
  18. I can't find the problem. Here again the logs of the variables in buildProcessWireBackup: log.js:137 $root: log.js:137 /home/theo/public_html/mysite/ log.js:137 $path: log.js:137 /home/theo/public_html/mysite/site/assets/ log.js:137 $options: log.js:137 {filename: "2017-12-08_11-56-07-localhost.pw.zip", folder: {…}, exclude: Array(8), extension: Array(0)}exclude: Array(8) 0: "/home/theo/public_html/mysite/site/assets/cache/WireTempDir" 1: "/home/theo/public_html/mysite/wire" 2: "/home/theo/public_html/mysite/site/assets/backups" 3: "/home/theo/public_html/mysite/site/assets/logs" 4: "/home/theo/public_html/mysite/site/assets/cache" 5: "/home/theo/public_html/mysite/site/assets/sessions" 6: "/home/theo/public_html/mysite/site/assets/files" 7: "" length: 8__proto__: Array(0) extension: []length: 0__proto__: Array(0) filename: "2017-12-08_11-56-07-localhost.pw.zip" folder: {}__proto__: Object__proto__: Object log.js:137 $zipinfo: log.js:137 {files: 4951, dirs: 0, size: 280395773}dirs: 0files: 4951size: 280395773__proto__: Object log.js:137 $fileinfo: log.js:137 {zipfile: "/home/theo/public_html/mysite/site/assets/cach…cator-temp/1/2017-12-08_11-56-07-localhost.pw.zip", zipname: "2017-12-08_11-56-07-localhost.pw.zip", structure: {…}}structure: {files: 4951, dirs: 0, size: 280395773}zipfile: "/home/theo/public_html/mysite/site/assets/cache/WireTempDir/.duplicator-temp/1/2017-12-08_11-56-07-localhost.pw.zip"zipname: "2017-12-08_11-56-07-localhost.pw.zip"__proto__: Object Thank you
  19. But it doesn't. Next line after the debug log commands above is if (!file_exists($fileinfo['zipfile'])) { DUP_Logs::log("An error occured while building the ProcessWire structure."); return false; } And this throws the message "An error occured while building the ProcessWire structure." so zipfile does not exist and buildProcessWireBackup returns false.
  20. Hi flydev Thank you for your patience. ;-) I have still the same problem with my 2.7.2. After pressing the button "Initiate Backup Process" it says "Processing..." then it seems to do something for some 10 seconds and then it returns to "Initiate Backup Process". The log says: 2017-12-08 10:42:15: Package build failed. 2017-12-08 10:42:15: An error occured during package build. 2017-12-08 10:42:15: An error occured while building the ProcessWire structure. Where could I try to find the problem? P.S. I have ChromePHPLogger installed. The image below for example is the result of ChromePhp::log($zipinfo); ChromePhp::log($fileinfo); in Line 311 of Duplicator Module. Does it mean anything?
  21. Great. I didn't really understand what it is doing anyway. The fact that mod_userdir is installed, does not mean, that it is actually used. Thank you.
×
×
  • Create New...