According to workbench_access.api.php

You module may place its hooks inside a file named module.workbench_access.inc for auto-loading by Drupal.

That does not work however. I get:

WD workbench_access: Failed to load required include file

Patch in comment.

Comments

berenddeboer’s picture

Autoloading is done by workbench_access_load_include and it says:

@TODO: Allow loading from outside the module directory. However,
this should be convered by the magic loading from hook_hook_info() and
the registry system.

Here a patch so auto loading works.

berenddeboer’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, workbench_access-inc-autoload-1783208-1.patch, failed testing.

agentrickard’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

You must patch against -dev.

berenddeboer’s picture

Status: Needs work » Needs review
StatusFileSize
new1.58 KB

Thanks agentrickard. Here the patch against dev.

Status: Needs review » Needs work

The last submitted patch, workbench_access-inc-autoload-1783208-5.patch, failed testing.

agentrickard’s picture

Patch failed. Also, you cannot remove the $ from the regex in file_scan_directory(), doing so causes other failures if you have backups files in your dir.

jibran’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.03 KB

How about this?

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine.

jibran’s picture

Thanks! @agentrickard.

  • agentrickard committed 71c8140 on 7.x-1.x
    Issue #1783208 by berenddeboer, jibran: Does not auto load the...
agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Committed!

Status: Fixed » Closed (fixed)

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

agentrickard’s picture