The function _features_restore() invokes two undocumented hooks: hook_features_disable_feature() and hook_features_enable_feature().

It would be great if these were mentioned in features.api.php and API.txt.

Comments

kristiaanvandeneynde’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Priority: Normal » Major

Bump, just spent hours trying to figure out why OG won't install its roles or permissions.
Turns out it is because it doesn't implement this hook.

If this were documented from the start, I wouldn't have had to dive into Features' code for about 5 hours only to discover there are two undocumented, yet important hooks.

hefox’s picture

Issue summary: View changes

Confirmed that still an issue, hook exists but documentation doesn't. Note this is a per component hook, not something anyone can implement

Don't think that is what caused the og issue; I think I recall seeing that in Og queue.

mpotter’s picture

Priority: Major » Normal

Seems like a good place for somebody to contribute a simple patch for easy commit credit ;) But this is in no way "Major"

donquixote’s picture

Status: Active » Needs review
StatusFileSize
new840 bytes

Here is a patch.
Perhaps a lot more could be written about these hooks,
I think this is "better than nothing" and "good enough", considering how D7 near its EOL.

  • donquixote committed a27d050 on 7.x-2.x
    Issue #1758774 by donquixote: Document hook_features_disable_feature()...
donquixote’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.