Skip to content
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

Using partials in deeply folders structure #6

Closed
damsfx opened this issue Apr 17, 2023 · 5 comments Β· Fixed by wintercms/storm#148
Closed

Using partials in deeply folders structure #6

damsfx opened this issue Apr 17, 2023 · 5 comments Β· Fixed by wintercms/storm#148

Comments

@damsfx
Copy link
Contributor

damsfx commented Apr 17, 2023

Blocks plugin no longer allows to use partials in two (or more) depth levels.

πŸ“‚ themes
 β”— πŸ“‚ demo
   β”— πŸ“‚ partials
     ┣ πŸ“‚ site
     ┃ ┣ πŸ“‚ test 
     ┃ ┃ β”— πŸ“œ test.htm    <=== Display this partial throw an error if Winter.blocks is enabled
     ┃ β”— πŸ“œ test.htm      <=== Display this partial works
     β”— πŸ“œ test.htm        <=== Display this partial works

With Winter.Blocks plugin enabled :
An exception has been thrown during the rendering of a template ("The partial 'site/test/test' template cannot be found.").
Running php artisan cache:clear does not solve this issue.

With Winter.Blocks plugin disabled : No errors, all works fine.

This issue appears after commit 9f08478
My test environment :

winter/storm                 dev-develop 65920e8
winter/wn-backend-module     dev-develop 990252f
winter/wn-cms-module         dev-develop 03b80c6
winter/wn-system-module      dev-develop cf0c382
winter/wn-pages-plugin       v2.1.1
winter/wn-blocks-plugin      dev-main c7edec1
@damsfx
Copy link
Contributor Author

damsfx commented Apr 25, 2023

I've seen that the issue is the result of listening to cms.theme.registerHalcyonDatasource in the plugin extendThemeDatasource method.

All files in subdirectories of themes/demo/assets/less/ are also ignored.

What I have do to get more info :

  1. Clear cache with artisan cache:clear
  2. in Halcyon\Datasource\FileDatasource
    I've set the $maxDepth property to 2 (https://github.com/wintercms/storm/blob/develop/src/Halcyon/Datasource/FileDatasource.php#L40).

This solve the issue in FrontEnd but ...

important note :

Setting $maxDepth to another value than the default one throw an exception (File does not exist at path ) in "Backend > Pages"

I think the issue is resulting of wintercms/storm@b693175 changes.

@LukeTowers
Copy link
Member

@jaxwilko could you look into this for me?

@damsfx
Copy link
Contributor Author

damsfx commented May 26, 2023

@jaxwilko Did you have time to take a look at this?
I've tried to dig deeper into the issue ... but to no avail.

@LukeTowers
Copy link
Member

@damsfx can you test wintercms/storm@e228543?

@damsfx
Copy link
Contributor Author

damsfx commented May 30, 2023

@damsfx can you test wintercms/storm@e228543?

  - Upgrading winter/storm (dev-develop 9e0508c => dev-develop e228543): Extracting archive
  - Upgrading winter/wn-backend-module (dev-develop 1ab98f8 => dev-develop 851ec48): Extracting archive
  - Upgrading winter/wn-blocks-plugin (dev-main c7edec1 => dev-main 1301353): Extracting archive
  - Upgrading winter/wn-cms-module (dev-develop 237bc69 => dev-develop ff928b4): Extracting archive

Sounds good!
No more errors with three levels or more theme's partials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants