We have moved to Github. Please open tickets there.

#4555 closed Feature Request (fixed)

Add optional "id" element to manifest

Reported by: mrclay Owned by:
Priority: normal Milestone: Elgg 1.9.0
Component: Core Version: 1.8.5
Severity: minor Keywords:
Cc: brett@… Difficulty:

Description

For various reasons (e.g. cloning a repo), one may end up with a plugin with the incorrect directory name inside mod, which can lead to serious problems (e.g. if the owner renames the folder after enabling!).

Adding an optional (for now at least) id element would allow us to help admins correct this error immediately.

Change History (5)

comment:2 Changed 12 months ago by mrclay

PR adds this behavior:

If manifest has an "id": https://img.skitch.com/20120608-tq96y6gqgfmjsrckh4iyccc42j.jpg

...then plugin ID must match. Otherwise:

https://img.skitch.com/20120608-2ue85is85jtdihft6ehqwa5y8.jpg

comment:3 Changed 12 months ago by mrclay

This is better than nothing, but I'd like a name mismatch to still be valid but canActivate() = false and to generate a red warning like the unmet dependencies. Unfortunately the warning code assumes that not being to activate implies it must be a deps problem, and I don't want to add a bunch more branching logic to the plugin full view.

comment:4 Changed 11 months ago by cash

  • Milestone changed from Needs Review to Elgg 1.9.0

comment:5 Changed 11 months ago by Steve Clay

  • Resolution set to fixed
  • Status changed from new to closed

Fixes #4555: adds "id" to manifest and, if present, assert that directory name matches.
Also documents $plugin in some views to help IDEs with code comprehension

Changeset: 8a7e22be5a90e5be3902631f39fabab919d3e0b9

Note: See TracTickets for help on using tickets.