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

Bug on external url templates when used on nested template. #107

Open
jhnmrls opened this issue Sep 28, 2016 · 2 comments
Open

Bug on external url templates when used on nested template. #107

jhnmrls opened this issue Sep 28, 2016 · 2 comments
Labels

Comments

@jhnmrls
Copy link

jhnmrls commented Sep 28, 2016

I found a bug on

<div data-content="comments" data-format="nestedTemplateFormatter" data-format-options='{"template":"assets/templates/comment_nested_template.html"}' ></div>

This doesn't work,

However there's a workaround via inline script

<div data-content="comments" data-format="nestedTemplateFormatter" data-format-options='{"template":"#comment_nested_template"}' ></div>

Note: I'm sure the link is correct because this one loads properly:

$('#posts').loadTemplate("assets/templates/post.html",{ },{});

there must be a problem on

handleTemplateLoadingSuccess function

@codepb codepb added the bug label Sep 28, 2016
@iLennart21
Copy link

Hey!
I ran in the same issue and invesigated a bit more.

It seems to be some kind of racecondition.
A quick (and dirty) workaround is to add internalSettings.async = false to addTemplateFormatter("nestedTemplateFormatter", ... ).

A propper fix would require to provide an asyncronous addTemplateFormatter.

@codepb
Copy link
Owner

codepb commented Nov 10, 2016

ok I'll look into this when I get the time.

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

No branches or pull requests

3 participants