Open CatsOnFilm opened 4 years ago
I'm having the same issue. I want badly to use slim for my project, but if this isn't resolved, I'm dead in the water.
Where is the file extension resolution happening in the codebase? It seems I'd need slimleex to be looked up as an extension
I'm having the same issue.
The file need to be what this extension(*.slimleex or just *.slime
)?
Howdy! Does anyone have a small example project on GitHub we could try to reproduce this on to troubleshoot?
I haven’t gotten to upgrading all of my projects yet unfortunately.
Howdy! Does anyone have a small example project on GitHub we could try to reproduce this on to troubleshoot?
I haven’t gotten to upgrading all of my projects yet unfortunately.
The sample repo was included in the original issue posting. Github Repo project: https://github.com/CatsOnFilm/phxslime
I experienced this when the generated project used LiveView 0.12.0, but when I updated LiveView to 0.14.1, .slimleex
files were found by template_path
as expected.
Using the example repo (https://github.com/CatsOnFilm/phxslime) I can confirm @mattdb's solution of bumping to phoenix_live_view
0.14.1 (also requires a bump to phoenix_live_dashboard
to at least 0.2.8) fixes the render/1 was not implemented...
error on compile.
I've been using LiveView extensively on phoenix 1.5.3 / phoenix_live_view 0.14.7 / phoenix_slime 0.13.1 without any of the above issues around inner slimeleex templates not getting rendered. I think this is fixed, but please speak up if I'm wrong.
With Phoenix 1.5.0 release, the generated app offers default configuration in scaffold for live_view. A default phoenix app with the --live flag now generates a different layout set than the current (at the time of this issue, v 0.13.1) phoenix_slime. Phoenix now uses a root, app, and live layout templates. After manually converting over the generated layout files, and proving those to be functional, converting the inner generated content (App.PageLive.html.leex) results in an error. Build prior to transforming template to slimleex gets re-used, so have to delete build file and rebuild to produce the error, otherwise appears to fail silently.
In the call to Phoenix.LiveView.renderer, the block generating the error:
In the {false, false} case, the view's render function is not defined and File.regular? returns false.
Elixir v 1.10.2; Phoenix v 1.5.0
Github Repo project: https://github.com/CatsOnFilm/phxslime