I just noticed this when testing Panels for Drupal 8.0.0-beta12: its templates and libraries aren't found until after a cache clear. I think it's because layout_plugin will declare it's libraries/templates, but not until after a cache clear.

I'm curious about how core is detecting this sort of thing for breakpoints and libraries, which would also need to clear some caches when new modules with MODULE.breakpoints.yml or MODULE.libraries.yml files are enabled.

Comments

dsnopek’s picture

Issue summary: View changes

Fixed type-o.

dsnopek’s picture

Priority: Normal » Major
dsnopek’s picture

Hrm, it looks like 'breakpoints' just clears it's caches anytime any theme is installed/uninstalled. From breakpoints.module:

/**
 * Implements hook_themes_installed()
 */
function breakpoint_themes_installed($theme_list) {
  \Drupal::service('breakpoint.manager')->clearCachedDefinitions();
}

/**
 * Implements hook_themes_uninstalled()
 */
function breakpoint_themes_uninstalled($theme_list) {
  \Drupal::service('breakpoint.manager')->clearCachedDefinitions();
}

I don't see anything for libraries, so I'm not sure how that works...

dsnopek’s picture

Issue tags: +D8panels

Adding to sprint board.

camoa’s picture

Will it be enough adding a hook_themes_uninstalled(), hook_themes_installed(), hook_modules_uninstalled() and hook_modules_uninstalled() that calls a parent::clearcacheddefinitions()

Do we have anything like the breakpointsbygroup or instances array in layouts?

That is simply doable, if that is the case I can do a patch for this while you focus on the real panels stuff.

dsnopek’s picture

@camao: To be honest, I'm not sure what it will take to fix this, or even exactly what the underlying problem is. But a great way for you to help would be to try and reproduce the problem, and then put the steps to reproduce in the issue summary! Then we have a place to start debugging or trying things to fix it.

And, BTW, this is "real Panels stuff." :-) Thanks for your help!

toby53’s picture

It works ok with all the latest stuff - see my process below

To run test

1) installed latest from git
Drupal 8
layout_plugin
panels and
page_manager

2) add a page via page_manager
3) add display variant
4) add a panel (2 column panel - left / right)
5) add a block to left and left columns (powered by drupal)
6) display the page
page displays correctly with block in right and left column (in safari, chrome, firefox)

dsnopek’s picture

I'm still seeing this problem from time to time. I'm starting to think this might be related to PHP-FPM like this core issue #2564921: In PHP-FPM environment, enabling a module in using a 'configure' route leads to an error page which is something I'll look into the next time I have time to look into this

damienmckenna’s picture

Status: Active » Closed (won't fix)

No further work has been made to this module since 8.3.0 was released, almost a year ago, all efforts should be made to switch over to core's Layout Discovery system instead.