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

custom view path not honored when using denjucks template engine #294

Open
peanutbother opened this issue May 23, 2021 · 0 comments
Open

Comments

@peanutbother
Copy link

[Details]
Mandarine seems to ignore view path setting when configured for denjucks.

[Stacktrace]

error: Uncaught MandarineException: The template ./src/main/resources/templates/index.html could not be initialized. This may be caused because the path is incorrect.
                    throw new MandarineException(MandarineException.INVALID_TEMPLATE.replace("%templatePath%", fullPath));
                          ^
    at MandarineTemplateManager.register (https://deno.land/x/mandarinets@v2.3.2/main-core/templates-registry/templatesRegistry.ts:39:27)
    at https://deno.land/x/mandarinets@v2.3.2/main-core/templates-registry/templatesRegistry.ts:83:75
    at Array.forEach (<anonymous>)
    at https://deno.land/x/mandarinets@v2.3.2/main-core/templates-registry/templatesRegistry.ts:81:38
    at Array.forEach (<anonymous>)
    at https://deno.land/x/mandarinets@v2.3.2/main-core/templates-registry/templatesRegistry.ts:76:65
    at Array.forEach (<anonymous>)
    at MandarineTemplateManager.initializeTemplates (https://deno.land/x/mandarinets@v2.3.2/main-core/templates-registry/templatesRegistry.ts:74:10)
    at MandarineCore.initializeTemplates (https://deno.land/x/mandarinets@v2.3.2/main-core/mandarineCore.ts:56:63)
    at new MandarineCore (https://deno.land/x/mandarinets@v2.3.2/main-core/mandarineCore.ts:32:14)

[Scenario]
Steps to reproduce the behavior:

  1. set templateEngine > "path":"[custom path]" and set template > "engine": "denjucks" in properties.json
  2. create controller with attached view ( @Render('view path') )
  3. start mvc

[Minimal Repro]
https://gist.github.com/peanutbother/263a01f90374e6d230931f83518047ab

[Expected behavior]
Rendering should work as expected.

[Screenshots]
image

[OS]
Windows 10 Professional 20H2 (Build 19042.985)

[Environment]

  • Mandarine version: v2.3.2
  • Deno version: 1.10.1
  • Deno v8 version: 9.1.269.27
  • Deno typescript version: 4.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant