Skip to content

Aaron's scribble page

Aaron McGowan edited this page Mar 19, 2014 · 10 revisions

Generic and Portable

  • All code should be developed in a generic method unless client or project specific.
  • All implementations of components (generic or project specific) must use the Portable First rule in which no serial identifiers may exist in a feature and instead be replaced with UUIDs. This will mean, in most cases, creating patches or leveraging existing patches to implement alter hooks into contributed modules that allow for export render altering and rebuild altering in a specific manner allowing for features to contain UUIDs and not serial identifiers. For an example, see: UUID Features Helper.

UUID Features + Paths + Pathauto

  • node_save invokes update operation and as a result, Pathauto's pathauto_update_action variable should be PATHAUTO_UPDATE_ACTION_NO_NEW (0) during installation of featurized content.
  • Exported content with paths ($node->path) should also have pathauto set to false so that a secondary alias . This MAY need to be specified manually in the exported feature AND/OR when using uuid_menu_links at time of rebuild, if no pathauto element exists as part of $node->path, uuid_menu_links will forcefully specify it as a boolean FALSE and therefore will allow pathauto to exit early.

Permissions

  • No ImageX component shall house a permission submodule and all permissions must be built as part of a project specific implementation.
  • All Client specific permissions should living in a single module, installed late, named CLIENTNS_user_permissions. CLIENTNS is that of the client namespace, for example: abc should the company be named Company ABC. Additionally, this feature if NOT installed late MUST have absolutely all dependencies listed so that Drupal's module sorting is accurate and places the installation of this at the end.

Exported Permissions with Overrides

  • PHP error that occurs when permissions are exported using features with all selected feature overrides is, in_array() expects parameter 2 to be array, null given in features.user.inc:151 is generally the result of a features override existing where the .roles property is deleted.

TODOs

  • Support translations out of the box for ready to go multi-lingual sites.
  • Add feature-revert installation command to be invoked, late, once the core operations are completed. This would then theoretically remove then need for drush fra -y post-installation.
  • Remove COMPONENTNAME_permissions from all components.

Clone this wiki locally