-
Notifications
You must be signed in to change notification settings - Fork 42
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
specialization seems to be broken #72
Comments
I'd love to know what your config looks like -- things moved around a bit. |
Thanks, here is my current config.json:
And the specialization.json file:
I am passing the config like this:
And before the upgrade shopsite/noprods.dust was getting rendered, now only ./noprods.dust seems to come up. |
Hrm. At a glance that looks right -- you don't need the indirection of using both Can you run your app with the |
|
if I put {template.is} into the index.dust file it shows the value of "shopsite", which should trigger the alternate partial if I have all the bits lined up correctly. |
Oh! I bet I know what it is. Change your specialization map to include the extension on the filename of the template. |
Thanks, but still the same (but different) - there's a lot of 404 stuff in the debug log now, but the rendered output looks the same.
My spec file is now
|
try
|
With spec file:
Same rendered output as before |
Well nuts! that should work! |
This is running on Windows Server 2012 with latest node.js if that helps |
I'll have to try later -- I've my job to get to at the moment, but I may see if I can delve into this in the kraken specialization sample app and upgrade that to makara 2. |
Ok cool, yes it would be good to have a standard example to work with. Can confirm a rollback to earlier code works as expected on the same machine. |
Quick question (I'm still a bit of a node noob) is it possible to have a dynamic specialization, so that the controller defines the mapping so I don't need to restart the app every time I make a change? |
Not as it stands -- might be able to tweak the map if you can get a reference to it, but I'd have to see if it's cleanly exposed or not. |
Ok thanks, have had a quick look and can see it being assigned in engine-munger but any hints or tips as to when and where to hook into the render process would be welcome :) |
I'm up to my elbows in the guts right now and it looks like the main templates should be working properly, but partials aren't passing the full information, and therefore aren't being specialized. |
Yes, that sounds like what was happening |
So yes, I can confirm this is a bug. It's actually a bug in adaro, which should be fixed by krakenjs/adaro#92 |
Cool, great, thanks for fixing it so fast :) What do I need to do to test it? Can I do an npm update, or manually patch the code my side? |
You can install the module from the git branch to test, or apply my changes -- they're simple -- to your existing copy. |
ok I'll apply your changes directly. Also I'm very keen on setting up dynamic specialization if you have any pointers in that regard. Thank you very much for your help. |
kraken is going to fight you a bit on the dynamic specialization. It does a bit of extra work to keep people from using the config as a data store shared among modules -- so mutating it is hard. How hard on your workflow is it to just restart the server on change with something like nodemon? |
Ok thanks I'll give that a go, I haven't used nodemon before, so appreciate the tip |
Hi, I've followed http://krakenjs.com/2015/07/09/upgrading-makara.html and upgraded my v1.0 app running on Windows. Now the specialization rules don't seem to be processed any more, I've verified the values are still being set, but the correct specialized partials no longer show, only the default one does. Any ideas? Let me know if you need any snippets. Thanks.
The text was updated successfully, but these errors were encountered: