Jump to content

Module installation options - persistent configuration vs default/initial configuration?


gornycreative
 Share

Recommended Posts

I'm guessing this is the intended behavior, so this might be a feature request more than a bug.

I ran into an issue with a module where there was an asmselect inputfield that I was trying to add additional options to and they kept reverting.

What was odd to me was that I don't believe any migrations were actually running, but the options array that I had included in the installModule call kept returning and overwriting my changes.

The watched file containing the module installation calls had not triggered as far as I can see in the logs, but the options array values kept overriding my attempts to expand the selections. (It says the file was skipped).

Is there a way to set the options for a module on installation so that you can choose between setting a locked-in configuration or just setting default/initial settings for the module?

EDIT - I realized that the reason the installModule was installing the options repeatedly was because I placed the install in the init() for a custom page class. I should move it to the migrate() at least or perhaps put additional checks in place to determine if it is necessary to populate an options array.

Edited by gornycreative
  • 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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...