Jump to content

flydev

Members
  • Posts

    1,360
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. Hi @Federico try : $editpage = $this->pages->get($pageID); // get the collection of inputs that inside the selected page $inputfields = $editpage->getInputfields(); foreach($inputfields as $inputfield) { $value = $inputfield->value; // do something }
  2. You have three possibilities. The first one, you can write the code in a template file inside your site/template folder, the second you can write the code in a bootstrapped script in the root directory (or where you want, you just have to adjust the path of the index.php). The thrid, inside a module. Read the whole thread, you should find what you need. What are you trying to achieve ?
  3. Yes, thanks. @rafaoski added a site profile using Bootstrap 4 updated there :
  4. Hello, replace in your module $page by $this->page and everything should be fine. $form->attr("id+name",'$page->name'); // should be $this->page->name $field = $field->getInputfield($page); // should be this->page
  5. PwCron is not required anymore, you can set your job calling directly site/modules/Duplicator/cron.php https://github.com/flydev-fr/Duplicator#system-cron
  6. I will look at it tonight, its strange as I can't reproduce it. I set the same package name, same settings then the package is uploaded but nothing deleted ? Could you tell me if the bucket already contain other files ? Edit: my logs :
  7. Good and did you tested to upload a file with a regular FTP client ? look like a permission issue. Check your PM. Edit : @Peter Knight please enable the "Passive Mode" setting in Duplicator > FTP settings
  8. @jeve please change the "Remove backup packages older than" setting to "Never" and try again then let me know @Peter Knight are you sure you are not mixing SFTP and FTPS ? SFTP is based on ssh protocol which is not supported.
  9. Hi Piero , just to be sure - as I tested it on two versions I don't get the package deleted - did you changed the following settings ? Remove backup packages older than Maximum number of packages
  10. So something like the following will do the trick. users = $users->find('email*=@mail.ru');
  11. There is another idea I am using on the project I am working on. Admitting its a PHP script : Put the script in a secure place on your server outside the public html Check if the script is run from CLI : if(php_sapi_name() !== ‘cli’) mylog('unauthorized access from IP xxx...'); Check the IP and allow only the script to be run from localhost: if($_SERVER['REMOTE_ADDR'] !== '127.0.0.1') mylog('unauthorized access from IP xxx...'); Use a GET "sekret" variable and generate/update it each X time: if($_GET['sekret'] !== 'mysuperlongsekretkeyupdatedfromtimetotime') mylog('unauthorized access from IP xxx...'); ForceLogin the user responsible to execute this job in PW and finalize the task Hope it help.
  12. Just bumped the module to version 2. - Added Google Invisible reCAPTCHA. To use it, no change is necessary on the frontend, you just have to configure the module to use reCAPTCHA V2 or Invisible reCAPTCHA. I will update the readme to reflect the change made by @ukyo and the new available options.
  13. Just add the disabled attribute to the button : $f = $this->modules->get('InputfieldButton'); $f->attr('disabled', 'disabled');
  14. Just a fast idea because maybe it can't work and I never used it, but worth a try, you could do something like you can see in the admin page while editing an image field. If an editor is logged in then add an "overlay icon" where editor can click on to edit. What I mean :
  15. This feature come in handy for the project I am working on. As @Robin S said, in my case, it will be used to prevent the users accessing to our dashboard while updating it. I can see a small module which set this role to a group of users with a specific role to finally prevent frontend/backend login in two clicks.
  16. if that can reassure you, what you are experiencing here is normal and it has to do with php session locking mechanism. To be sure, you can do a simple test : - open the browser with a private "incognito" window and navigate to your website - open a normal tab window and start manually a duplicator job - then while the job is running, navigate your website with the incognito mode window You will see that you won't have issues and the navigation on the website is normal. Will test deeper LazyCron tomorrow. let me know if anything went wrong with the above
  17. It will, after you visit a page, in an hour. (if you wanna try LazyCron, set it to "LogoutTrigger" and logout from the admin then log-in again and check your packages). How are you running composer ? On localhost and uploading the vendor folder; or directly on the server ? The vendor folder should be along side the "wire" and "site" folder. The right repo is there : https://github.com/flydev-fr/Duplicator-SDKs
  18. I see, its not possible with ProcessWireUpgrade as the SDKs are not bundled with the module. I will try to find a workaround, like a button to import the SDKs from a previous duplicator version. If you have a better idea, I am open
  19. @dragan you should be able to update the module to 1.1.7 and run the job from LazyCron.
  20. Thanks @szabesz! - About the links, Its actually updated in the next version - ProcessDuplicator will have a "clear logs" button and a "downloads logs" button as the logging mechanism has changed a bit in the new version @dragan there is nothing wrong, I just made a mistake. give me two minutes
  21. Hi, Just an idea, you could create a new role, e.g. "cron-role" and assign to this role the permission "page-view". Then you add a new user, e.g. "cron-user" and assign to this new user the new role "cron-role". Now you add the role "cron-role" to the template you want to access the email field via "Template > Access". And in your bootstrapped script, you could write something like: <?php namespace ProcessWire; include_once ('/path/to/pw/index.php'); $cronuser = wire('users')->get('cron-user'); // get the user "cron-user" if($cronuser instanceof User) wire('users')->setCurrentUser($cronuser); // if found, set the current user to "cron-user" else die('bad user'); // not sure about the die() call but whatever its an example if($cronuser->hasRole("cron-role")) { // check if the role is assigned echo wire('pages')->get('/mysekretpage/')->sekretemailfield; // get the sekret field } else { echo 'access denied'; }
  22. Good ! and for the GoDaddy host then, you have to upgrade PHP through CPanel to at least PHP 5.6 and "maybe" it will work I say maybe because as crappy shared host, you will may encounter timeout issue there. If you upgrade your host and test Duplicator on it, let me know if you managed to build a package successfully. Thanks!
  23. Thanks, yeah it can be the issue. I am googling just to be sure. Thanks again for your input on this. @jacmaes could you check which version of PHP is installed on the GoDaddy host ? Its almost sure that is a PHP config server error.
  24. What is the version of your ProcessWire installation ? I tested it on 2.8 and 3.x and everything is running fine.
  25. As the readme say, you have to only upload/merge the SDKs folder which reside inside the Duplicator-SDKs folder. After downloading and opening the Duplicator-SDKs ZIP archive, you have this tree :
×
×
  • Create New...