Jump to content

Admin Actions


adrian

Recommended Posts

Yes i've installed only WireMailSmtp, but i assume that native Php mail had nothing to do with it.

I used FB example because i thought that if other wiremail moudules were used they should be visible in that screen.

Gmail accounts were used only as receivers, while a standard SMTP account was used for sending.
I'll do more testing and i'll verify if it sends correctly using FB (until yesterday it worked perfectly),
i'll try also on other website.

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

I'd like to create a slimmer version of the Page-Manipulator-Admin-action. For that purpose I would also need to simplify the array of type "selector", you know, where you select from all possible system fields and custom fields, operators and enter a value, and instead restrict it to only what I want the user to select.
Is this selector field part of the AdminActions core module? or PW core? Can I accomplish that customisation all in the same array-item of the defineOptions function or should I create separate array-items for each criteria?

Thanks for help!

Link to comment
Share on other sites

Hello Adrian,

today I did an upgrade an I have following error:

Parse Error: syntax error, unexpected '?' (line 52 of site/modules/ProcessAdminActions/actions/ConvertFieldsToMultiLanguage.action.php)

FYI,
kind regards.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Hi @Clarity - sorry, I am a bit lost as to what you are asking. Are you referring to a particular action? Is there a place where you are being asked to enter things like 'select', 'text, 'AsmSelect', etc?

Maybe post a screenshot of the interface you are finding confusing, or if you are writing a new action, then the list of available field types is only limited to the fields in ProcessWire so that is where you should go for a complete list. Is that what you're looking for?

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

I'm writing custom admin action and trying to figure which types can be written in 'type' field, like in this code:

return array(
            array(
                'name' => 'fields',
                'label' => 'Fields',
                'description' => 'Select the fields you want to delete',
                'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete',
                'type' => 'checkboxes',
                'options' => $fieldOptions,
                'required' => true
            )
);
If these types fully correspond to Inputfields in ProcessWire, then it solves my problem. I was not sure about it. Thank you.
  • Like 1
Link to comment
Share on other sites

Good day, @adrian!

I am using this super module more and more. I tend to create some general actions, but have a few repeating settings I use over and over again. I would love to make them available to the clients as well. But I do not think that creating copies of action is a good way. I was thinking about savable options set. Something like bookmarks for lister. What do you think about this?

Link to comment
Share on other sites

13 minutes ago, Ivan Gretsky said:

Good day, @adrian!

I am using this super module more and more. I tend to create some general actions, but have a few repeating settings I use over and over again. I would love to make them available to the clients as well. But I do not think that creating copies of action is a good way. I was thinking about savable options set. Something like bookmarks for lister. What do you think about this?

Hi @Ivan Gretsky - I don't think I am quite grasping what you are looking for, but certainly happy to consider once I have a proper feel for it. Would it be possible to post some screenshots of the actions that are relevant along with an example explanation of what settings you would like to bookmark?

9 minutes ago, Ivan Gretsky said:

Do you think we should transform this thread into a dedicated sub-forum like the one for tracy debugger? There are 10 pages now. And the questions are really diverse due to the nature of the module. This move could also make us think more about sharable actions.

Sounds good to me. I'd certainly like to see more action contributions from the community. There were a couple added to the core AA repo and another by Robin that is maintained as a separate repo, but hooks into AA so that it is available from within it's interface, so there are a couple of different ways to do this.

Link to comment
Share on other sites

16 minutes ago, adrian said:

Hi @Ivan Gretsky - I don't think I am quite grasping what you are looking for, but certainly happy to consider once I have a proper feel for it. Would it be possible to post some screenshots of the actions that are relevant along with an example explanation of what settings you would like to bookmark?

Like I've got a resave action or some other action I need to run on a certain pages selected with, well, a selector field. The selector is the same, but each time I run it I need to re-enter it again and again. And I do run this for a couple of sets of options. That's where savable option sets or bookmarks would come handy.

  • Like 2
Link to comment
Share on other sites

4 minutes ago, Ivan Gretsky said:

Maybe there is a way to fill it with get params? Maybe there is a way to do it in PW for standard forms already?

You can already do that actually: https://processwire.com/modules/process-admin-actions/#populating-options-via-url-parameters

Perhaps you could create a master action that uses a markup field to provide direct links to other actions with the get params in the URL?

  • Like 1
Link to comment
Share on other sites

Hi, @adrian!

I almost completed writing custom admin action and I have a question. I have a select in which we can pick a single language, and AsmSelect in which we can pick multiple languages. If we pick some language on select, it automatically shouldn't be pickable in AsmSelect. There must be some setting which I miss. Since we pick language on browser (on client side), I'm not sure how to do it in PHP. Could you please point me how to do it in PHP's ProcessWire, without writing own JS for it?

Link to comment
Share on other sites

@Clarity - I think you'll need to write your own JS for that scenario.

That said, I am a bit confused why you need the two separate fields. Any reason the user can't just select one or many languages from the ASM version? I am sure there is a good reason, I just can't see it :)

  • Like 1
Link to comment
Share on other sites

I need that because my admin action copies content of fields from one language to another, and we should somehow warn user that languages are identical (since I think it doesn't make sense to copy the content to the same field). I've thought that not allowing to pick language in "destination" fields might solve the root problem, but I already solved my problem using PHP. Just added the warning that languages were identical after successful execution of Admin Action.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

I have troubles using AdminActions. I get…

Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) (Zeile 1325 in wire/core/WireDatabaseBackup.php)

However, if I disable automatic backup, it works fine. So now I wonder how to fix this properly, without disabling the automatic backup. Which memory is exhausted exactly? Hardly is it the server, we have unlimited storage.

Thanks for help

Link to comment
Share on other sites

1 hour ago, Clarity said:

I think it is because of limit of RAM in your php.ini file. You can set memory_limit = 512M or larger instead of 256M there. Very likely the backup consumes more than 256M of memory.

Thanks, I already put the memory_limit to 320MB which didn't help. It works on my test-installation though, which however has a smaller database. So I guess if setting the RAM to 512MB works, that solution would only be temporarily as well. Any more ideas?

  • Like 1
Link to comment
Share on other sites

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...