New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashbboard map not visible on fresh install #273
Comments
Hmm - thinking about this more...
Need to give this more thought... |
I put a breakpoint in |
Looking into exactly when So this is related to #272 And that explains why it hasn't been an issue on Farmier-hosted farmOS instances:
The theme is enabled on Farmier instances, and the cache is cleared after they are created. So the map works there. So to fix this... maybe we just need to call that |
I tried this inside the new |
Stepped through the install process with XDebug and discovered why this wasn't working. The code was running, but I was able to make it work with the following code in a new install tasks /**
* Callback for farmOS blocks install task.
*/
function farm_install_blocks() {
// Update blocks for the farmOS theme.
// We need to run _block_rehash() so that hook_block_info_alter() in
// farm_theme has a chance to alter blocks provided by other farmOS modules
// (eg: to enable/insert them into regions).
// We need to override the global $theme variable and manually include the
// theme's template.php file so that drupal_alter() runs its alter hooks.
// @see https://github.com/farmOS/farmOS/issues/273
global $theme;
$old_theme = $theme;
$theme = 'farm_theme';
include_once drupal_get_path('theme', $theme) . '/template.php';
_block_rehash($theme);
$theme = $old_theme;
} It feels a bit hacky, but it works. I would like to see if there's a better way to load |
I committed this. We can improve/iterate in the future if we need to. |
Spun off as a separate issue from #272
The text was updated successfully, but these errors were encountered: