Hi,
I'm using scheduler module to publish some content on an Acquia environment with Acquia purge module configured. We have set paths to be flushed appropriately. For queues to be processed in a request, we have set the variable "acquia_purge_lateruntime" to TRUE, which triggers the AcquiaPurgeRuntimeProcessor for processing the queues when a request is made through hook_exit in Acquia purge module.
So, I'm getting this fatal error "Call to undefined function drupal_get_path_alias()" in the logs always, when a request is made. I believe this is due to path.inc not getting included in the subsequent code flow, in acquia_purge.diagnostics.inc
function _acquia_purge_get_diagnosis_domains($t) {
$allriskmode = _acquia_purge_variable('acquia_purge_allriskmode');
$domains_link = drupal_get_path('module', 'acquia_purge') . '/DOMAINS.txt';
$domains_link = url($domains_link);
$domains = _acquia_purge_get_domains();
$domains_c = count($domains);
$test = array(
'value' => implode(', ', $domains),
'title' => $t('Purged domains'),
'description' => $t('The domains for which content gets cleared from your'
. ' load balancers. Every domain name multiplies the purging work to be'
. ' done, it is therefore important to <a href="!link" target="_blank">'
. 'specify your domains</a> when the automatically detected list exceeds'
. ' 4 domains or when it is incorrect.', array('!link' => $domains_link)),
);
Here, the url() function calls drupal_get_path_alias which is in path.inc, and that file is not included in the request. I think we should include that file and cache.inc in the function _acquia_purge_load in acquia_purge.module, which gets called when processor objects are loaded.
Current Code:
function _acquia_purge_load($path) {
// Initialize our module path just once, to avoid doing this many times.
static $module_path;
if (is_null($module_path)) {
//Loading include paths for functions to later use in the processing
require_once DRUPAL_ROOT . '/includes/common.inc';
$module_path = drupal_get_path('module', 'acquia_purge');
}
We should change it to become:
function _acquia_purge_load($path) {
// Initialize our module path just once, to avoid doing this many times.
static $module_path;
if (is_null($module_path)) {
//Loading include paths for functions to later use in the processing
require_once DRUPAL_ROOT . '/includes/common.inc';
require_once DRUPAL_ROOT . '/includes/path.inc';
require_once DRUPAL_ROOT . '/includes/cache.inc';
$module_path = drupal_get_path('module', 'acquia_purge');
}
Let me know your thoughts
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2550497-call-to-undefined-function.patch | 561 bytes | snufkin |
Comments
Comment #2
snufkin commentedHere is a patch, we are having this issue as well, so I hope to give you some feedback whether or not this solves the problem for us.
Comment #3
snufkin commentedWe have also ran into a new error (which has a fix for now in the dev branch):
For reference we are using the following settings:
Comment #4
aditya.ghan commentedDoes the this patch and the latest dev code solve this issue?
If not, we can add unicode.inc also
Comment #6
nielsvm commentedThanks, fixed in next release.