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

Meteor : update to latest version 0.6 with blade #165

Closed
vraptor75011 opened this issue Apr 13, 2013 · 9 comments
Closed

Meteor : update to latest version 0.6 with blade #165

vraptor75011 opened this issue Apr 13, 2013 · 9 comments

Comments

@vraptor75011
Copy link

I did a mrt update and it appears to break the collection behavior.

Capture d e cran 2013-04-13 a 14 41 49

It looks like the javascript files of the Meteor projects are loaded but not executed, excepted for those inside client/views.

Is it a bug with meteor-blade or with meteor ?

@vraptor75011
Copy link
Author

Apparently this issue is due to a new feature in Meteor : "We've added file-level JavaScript variable scoping. Variables declared with var at the outermost level of a JavaScript source file are now private to that file. Remove the var to share a value between files."

In coffee files, il I write : "@Posts = new Meteor.Collection ..." I can access the collection.
But when accessing the posts variable in posts.blade (loop foreach), the helper Template[posts/posts].posts doesn't work well and throw

Exception from Deps afterFlush function: @http://0.0.0.0:3000/packages/blade/runtime-meteor.js?7c5904495c94aa75a5773b28d6e4671d29e90f23:45

The problems seems to be with the include in my foreach loop
"include 'post' exposing post

Still investigating ...

@vraptor75011
Copy link
Author

Working if I copy from v3.0.3
runtime-meteor
runtime

and if the included files are : "../posts/post"

@bminer
Copy link
Owner

bminer commented Apr 16, 2013

I'm confused. What, exactly, is the problem here?

@vraptor75011
Copy link
Author

with latest meteor-blade version
tag: https://github.com/bminer/meteor-blade.git#v3.2.2meteor2

Capture d e cran 2013-04-16 a 20 51 31

Looks like #154 , include post exposing post in a foreach loop

If i copy runtime-meteor.js and runtime.js from v3.0.3 (which solved #154 )

Capture d e cran 2013-04-16 a 20 46 30

@bminer
Copy link
Owner

bminer commented Apr 17, 2013

I cannot replicate this bug. Please post your post.blade and posts.blade files.

Also, in posts.blade try adding the following right before your include:

- console.log("posts.blade info", __)

and post the output of the console.

@ghost ghost assigned bminer Apr 17, 2013
@vraptor75011
Copy link
Author

Project visible at : git://github.com/vraptor75011/MeteorBladeBlog2.git
Here is the output :

Object
_id: Object
body: "C est un post"
createdAt: Sun Apr 07 2013 20:05:43 GMT+1100 (NCT)
nbComments: 0
submitted: true
title: "Post 1"
updatedAt: ""
userId: "C79gpCTDdbiiFqAjL"
proto: Object
posts.js:19posts.blade info ["<$label:5HyqiH632cxatiwJD><$label:yjGPQRcL3WGE2ygBG><$data:LJu8pMXEjPpMNicPR><$landmark:ryCRJGDaWqypbBqrd><$events:XKjrtw79jprCgRGmD><$watch:qi7Nyz8wCMLBqj8mu><$isolate:CExe7ePMaMnxr5xPZ><$events:sNeqo7QYqH9jEY4cu><$watch:RBQgoLo9DjaHZSYRr><$label:TEgmf8vtbuncXNSGg><$label:JbfYiqCZr2gAu9Q2p><$data:xf5d7aQ59qHrsXFoR><$landmark:ctZjz9pFYotakDepk><$events:NEbfT2ppF97nhMRiF><$watch:WwypgsJX7iDcnYdpM><$isolate:9yPfJipqtkrTFR4KF><$events:gqdL8ZLjx4mmnDSLj><$watch:796i5CY4BpizZ6scH>

Home
  • connected
  • posts/posts
  • <$label:eKT2dgHq29sDaAXSe><$data:kpAEZ3oJ5CirZtamA><$landmark:cyvbE38HBBLk572Bj><$events:FoXenaqNod9ABp7ZG><$watch:Wvfu459xgNZAZezLN><$isolate:cbThay7Yfh3KknyNg>

    <$label:GqLxJMTgRv6xvaZhP>
    <$label:8YTMYgBN5F36GMtij><$label:KPHDP39ruuGcZSrFS><$data:oWS7zo2f5zXAoXbux><$landmark:LoyuKuGNg6iFaf4nX><$events:rSRBFvQMLjQ87aArA><$watch:3XESKYzy4HMeJQpFK><$isolate:mFX3WK6g984pa3js8>

    </$isolate:mFX3WK6g984pa3js8></$watch:3XESKYzy4HMeJQpFK></$events:rSRBFvQMLjQ87aArA></$landmark:LoyuKuGNg6iFaf4nX></$data:oWS7zo2f5zXAoXbux></$label:KPHDP39ruuGcZSrFS></$label:8YTMYgBN5F36GMtij>
    </$label:GqLxJMTgRv6xvaZhP>

<$label:oSZmX5WfbzZiiuaGv><$label:PJnXdjWXLt8WzcN4v><$data:PoNT4toQbPSkWMqzR><$landmark:xBNaEup5aj2nFxd8n><$events:GWyRwandgknADYXxM><$watch:qhhQFR37JsEjqjCAr><$isolate:Pu8tNT6yacJ27wMze><$events:cMBwTByeEZ5JnEGex><$watch:bPjc8GtsGmjxfsNbX>

Bonjour

<$label:oWGnfb9Jqi9DmRkCY><$label:noQb3Gj5gEbBLcgzn><$data:gwR7sWznJbKRdWnEL><$landmark:ya8oKi5BupfuACP8r><$events:ibpNcw2WHjsb6fAWm><$watch:3FcbKDb7Za6kpRysA><$isolate:FE67NPaLsb6L497kx><$events:FziLxFX3L76p8gMDQ><$watch:j9i6z4ncdq7uaA8Yb>
<$label:ERdMPwr4hBzgKCo7i><$label:wikBe8LujoTGBD8sw><$data:ZFq8q3YozYKyKShQ5><$landmark:2qDDX44XrHajJSxCd><$events:7jrLPdxfxnMbHPzqg><$watch:kbHEj2tGMWqLhD6AT><$isolate:AfPStE8GPjGs23Lko><$events:f3GQtv5c9rD3Lhgth><$watch:dNz2vBYmFwytP9SNp> Nouveau Post
<$label:K6EsdH6X4aWSxmjwt><$label:TtM2KrC5BativzPGi><$data:Dj8h8vRHXhoHfZ2RM><$landmark:65ZyAwo6osAN8Fe48><$events:YQwtmQ2KZkSRhzS3Z><$watch:borfjfs3SNFEDPpbG><$isolate:CskL3KiC9P76crges><$events:xiphTMC3QFZe29HLH><$watch:57tNApFGBuJop4ora><$label:Hqd2eg9DoBhN3k4y6><$label:J6bjsKesMXdhFSGTQ><$data:WmXd7wtx2q3Yz9wgj><$landmark:KM6BLtCWJQRaB22Ek><$events:r3nsm6ztnLgQDcmee><$watch:QhXH3nBDkhxTz8ifF><$isolate:jmktfiqSFqfoReSe8><$events:kxpBPiiYuYTDkvvfW><$watch:n3FHeSRYDno3SfpXB>
New Post
Title
Body
<textarea placeholder="Type the post ..." id="body" rows="3"></textarea>
Bouton
Post
<$list:ypLku89pBpDtwomCn>
<$label:tzZahj47WvGA4TDCi><$label:pfShmnxmxLXbdjKd5><$data:yMAzwaqGAvoS5AyrG><$landmark:6jGjzrkh2BowwmmK8><$events:pYa42Ca3TCsBcSoyr><$watch:iBvtFT3H5RNCAkgNs><$isolate:hCDbe43yoPiDN9Xvj><$events:3cjszH7MhRifz9vS4><$watch:YJTC4Y8GuHPCuci6d>"]

@bminer
Copy link
Owner

bminer commented May 6, 2013

I cannot replicate any bugs... probably because my Mongo DB is empty. Could you provide me with some sample values that I can load into the DB? Or, can you simplify this bug into a simple example that I can run and test?

Thanks for your help.

@vraptor75011
Copy link
Author

posts.json

{ "_id" : { "$oid" : "347a0a1a7406a503bddfadc2" }, "body" : "fffff", "createdAt" : { "$date" : 1365901868581 }, "nbComments" : 0, "submitted" : true, "title" : "lllll", "updatedAt" : "", "userId" : "virEdEdkfBwPyafNL" }
{ "_id" : { "$oid" : "3ed9cb73f31b9b4e73d0c800" }, "body" : "C est un post", "createdAt" : { "$date" : 1365325543823 }, "nbComments" : 0, "submitted" : true, "title" : "Post 1", "updatedAt" : "", "userId" : "C79gpCTDdbiiFqAjL" }
{ "_id" : { "$oid" : "9300f568be0d0c2f22c402a5" }, "body" : "zzzz", "createdAt" : { "$date" : 1365326283027 }, "nbComments" : 0, "submitted" : true, "title" : "zzzz", "updatedAt" : { "$date" : 1365326294798 }, "userId" : "C79gpCTDdbiiFqAjL" }

I think it s the same issue as #154

Thanks for your help

@vraptor75011
Copy link
Author

Was a bug in my code

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

No branches or pull requests

2 participants