Open robertgarrigos opened 4 years ago
Interesting. Could you add require_once BACKDROP_ROOT . '/' . settings_get('lock_inc', 'core/includes/lock.inc');
to install_begin_request()
(somewhere after the line backdrop_bootstrap(BACKDROP_BOOTSTRAP_CONFIGURATION);
) and recheck?
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'backdrop.semaphore' doesn't exist
I can add that, by not using the state_get function within the hook_install_tasks, I get it working (of course, without trying the batch processing)
sorry for the typo ;-)
Interesting. Could you add
require_once BACKDROP_ROOT . '/' . settings_get('lock_inc', 'core/includes/lock.inc');
toinstall_begin_request()
(somewhere after the linebackdrop_bootstrap(BACKDROP_BOOTSTRAP_CONFIGURATION);
) and recheck?
@robertgarrigos it's been a while now, did you manage to test this?
@docwilmot not sure about here, but your suggestion fixes the errors in (the otherwise unrelated) #5943.
I did try that, @klonos . This was the result:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'backdrop.semaphore' doesn't exist
Thanks for taking the time to report back @robertgarrigos 🙏🏼 ...that's similar to the error thrown in #5943, so if not the same cause, then definitely related.
Description of the bug
Working on a new profile, I wanted to implement the hook_install_tasks() function as it's shown in the api docs (https://api.backdropcms.org/api/backdrop/core%21modules%21system%21system.api.php/function/hook_install_tasks/1) which includes the function state_get() to set a batch_processing variable. Unfortunately, this triggers this error:
The problem is that lock.inc file is not included during install, because lock_acquire function uses the semaphore table, which is not yet installed.
Has this ever been tested? What's the way to use a batch state variable during a profile install??