Sam's notebook

Including views in Drupal modules December 17th, 2014, 9AM

Programming

Views are included in modules by implementing hook_views_api() and hook_views_default_views() and returning an array of view objects from the latter. The easiest way to construct the view object is to create the desired view via the UI and then export it, saving each exported view into its own function in sites/all/modules/custom/modulename/modulename.views_default.inc and then returning them […]

[No comments] [Keywords: , , , , , ] [Permanent link]

A bug in the Workflow module confuses me November 19th, 2014, 8AM

Programming

I’m getting and annoying error when running reverting a Feature (drush fr featurename): /var/www/stage.example.org$ drush fr featurename Fatal error: __clone method called on non-object in /var/www/stage.example.org/sites/all/modules/workflow/workflow.features.inc on line 55 Drush command terminated abnormally due to an unrecoverable error. Error: __clone method called on non-object in /var/www/stage.example.org/sites/all/modules/workflow/workflow.features.inc, line 55 It looks like this bug was fixed […]

[No comments] [Keywords: , , , , ] [Permanent link]