Ticket #843 (closed Enhancement: fixed)
Trigger plugin init() hook *before* installing in DB?
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.7 |
Component: | DeepaMehta Standard Distribution | Version: | 4.6.1 |
Keywords: | Cc: | dgf, Malte | |
Complexity: | 2 | Area: | Application Framework / API |
Module: | deepamehta-core |
Description
What is your experience with the init() hook?
Would your plugin work if the init() hook would be triggered before the plugin is installed in the DB (that includes 1) create plugin topic, 2) run migrations, 3) fire type introduction events)?
In particular: do your plugin's init() rely on the types created in your migrations?
Please tell me and let's discuss your use case.
I would like to change the init() triggering.
Change History
comment:3 Changed 9 years ago by Malte
Here are some answers, read from the various sources:
- Sign-up plugin currently uses init() hook to load configuration (topics), thus depends on topics and types introduced via migration.
- At least CSV, Mail and Twitter plugin uses init() hook to fix ACLs (so admins can edit configuration) introduced by migrations.
- Many plugins do Thymeleaf initalization in init() - that should be no problem at all.
- Freifunk Query Plugin does everything on init() - automatically importing data into from an API endpoint
- Soundposter Website Plugin uses init() to supply (hard-coded) credentials to another Service (Plugin)
- Moodle Plugin uses init() to call System.getProperties() - JRE Keystore Credentials
- Geospatial Plugin uses init() to create db-layers and index/encode existing data (like geo coordinates)
Thanks for asking.
comment:4 Changed 9 years ago by jri
Thanks for the info!
OK, I understand you want keep the init() triggering as it was.
I'll revert the recent commit then.