In the function accessible_content_include_library, it looks for the library in a pretty specific location
$result = @include_once('sites/all/libraries/quail/quail/quail.php');
This blocks its inclusion in installation profiles that would want to place the library in profiles/{profile_name}/libraries. Replacing the original call with this one will account for it and fail forward if it's not found in the install profile path.
global $profile;
// to determine the profile.
if (!isset($profile)) {
$profile = variable_get('install_profile', 'default');
}
//test the install profile location first
$result = @include_once('profiles/$profile/libraries/quail/quail/quail.php');
//if it wasn't found, then test the sites all location
if (!$result) {
$result = @include_once('sites/all/libraries/quail/quail/quail.php');
}
Code is tested and in-use in the ELMS Alpha 5 distribution (to be released shortly).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | accessible_content-libraries_install_profile-1326220-5.patch | 2.23 KB | btopro |
| #4 | accessible_content-libraries_install_profile-1326220-4.patch | 2.61 KB | btopro |
| #3 | libraries_install_profile-1326220-3.patch | 2.61 KB | btopro |
Comments
Comment #1
btopro commentedFinding this is a more hardcoded solution then I had previously realized, I'll investigate further a more pervasive solution as many things reference sites/all/libraries
Comment #2
btopro commentedFound a way of getting this working. See github commit for the diff -
https://github.com/btopro/elms/commit/361adbc06976d1ce5374b3e254ae686c7a...
This was pulled from dev
Comment #3
btopro commentedThis is a more comprehensive solution that requires libraries api but then allows this to be included in any place you might expect to find a library in drupal. This patch will allow accessibility content to be included as part of the drupal.org distribution packaging script!
Comment #4
btopro commentedrerolling as packaging script doesn't seem to like it in its current name/state
Comment #5
btopro commented.info file modifications removed; can't make library assumption in packaging it would seem