Jump to content

Recommended Posts

Posted

Hi @adrian, often your actions turn out to be life saving! I've a similar request of Fuzen for the use a field type.

In the action "Field Set Or Search And Replace", 
it doesn't seem to be possible to manipulate a field type Options/Radios. Is this an unsupported field, or is it possible to extend the use to this fieldtype?
I think that would really be very helpful.

Thanks

Posted

@Mike-it - the latest version supports the Options field type but note that you need to use the numeric key for the option rather than the label, so 1 or 2 rather than Yes or No, for example.

  • Like 1
  • Thanks 1
  • 2 weeks later...
  • 1 month later...
Posted

Hi @adrian,

while your module is a real pleasure to work with, i wonder if i miss something, as "Copy Field Content to other Page" seems not to work with fields of type "files". The references are copied, but the files itself not.

Not sure if this is intended or maybe a bug?

Cheers
Olaf

  • Like 1
  • 6 months later...
Posted

Hi @adrian,

I have an action that was working in v0.9.8

<?php namespace ProcessWire;
class DownloadModulesDirectory extends ProcessAdminActions {
	protected $title = 'Download modules directory';
	protected $description = 'Download a ZIP file of /site/modules/';
	protected $author = 'Robin';
	protected $dbBackup = 'disabled';
	
	protected function defineOptions() {
		return array();
	}
	
	protected function executeAction($options) {
		$files = $this->wire('files');
		$config = $this->wire('config');

		$zip_pathname = $config->paths->site . 'modules.zip';
		$files->zip($zip_pathname, $config->paths->siteModules, ['overwrite' => true]);
		$files->send($zip_pathname);

		return true;
	}

}

In v1.0.1 the zip is created but a download isn't prompted, and I see this when executing the action:

image.png.9f812152b3b4132bf821587fa58b7e2a.png

 

  • Like 1
Posted

Sorry about that @Robin S - I had checked file downloads with the new version, but not using PW's $files->send.

I tested with your example above and it's working again in the latest version.

Please let me know if you notice any issues. I think it's really nice having actions run in the background now so that aren't subject to any time limits, but it has complicated things.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...