Opened 11 months ago
Closed 10 months ago
#4621 closed Defect (fixed)
Add a warning to remove_subtype()
| Reported by: | ewinslow | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8.9 |
| Component: | Core | Version: | 1.7 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: | easy |
Description
It should be deprecated, have its guts removed, and recommend update_subtype instead.
Using this during deactivate makes the subtype receive a new id when the plugin is reactivated, meaning that all entities created with the old id look like they don't exist.
Instead, people should use update_subtype('type', 'subtype', ''); so that Elgg doesn't try to load the associated class for that subtype while the plugin is inactive.
Change History (3)
comment:1 Changed 11 months ago by cash
comment:2 Changed 10 months ago by cash
- Milestone changed from Elgg 1.9.0 to Elgg 1.8.9
- Priority changed from high to normal
- Summary changed from remove_subtype is evil to Add a warning to remove_subtype()
Let's add a big warning to the documentation and explain that they really want to be using update_subtype().
Perhaps make it a private function in Elgg 1.9?
comment:3 Changed 10 months ago by Cash Costello
- Resolution set to fixed
- Status changed from new to closed
Fixes #4621 adds warning to remove_subtype()
Changeset: b164c39ac5c82b311e9ef07fa01fcc464bab86b1

Actually, we need this for the unit tests. Perhaps we should leave it but add warnings to it.