Meteor 0.8.2 client collection is empty when insert a new object
Asked Answered
E

3

8

I am working on a project which is using meteor 0.7.2 and it is working fine. After updating to meteor 0.8.2 I am facing an issue.

When I insert an object to the collection from client side immediately the collection is empty and then it's reloading the data. This is happening some times when I update the collection object as well.

This is only happening to one collection. Other collection are working fine.

I am using iron-router and JQuery Sortable.

Can someone please help me on this? (I feel like there is a conflict happens between minimongo and the master when insert or update. If this is the case why is that happening)

Equivoque answered 4/7, 2014 at 5:10 Comment(3)
Could you share some of your code. Especially the publish, subscribe, schema and insertRoth
my guess would be - 0.7.2 used Spark, 0.8.2 is using Blaze, the new rendering engine. So on the new rendering Engine Blaze your jQuery-Sortable integration is just broken.Kruse
not sure how it can affect the collection state though.Kruse
W
0

It would be great if you could share code which makes it possible to reproduce the behavior. You may could create a new meteor 0.8.2 app that just has this collection and see if you are able to isolate the error.

btw, what is the name of your collection that has this issue?

Weakkneed answered 14/7, 2014 at 13:46 Comment(0)
C
0

Are you sure it's empty? Is it also empty on mongo? And if it's not then try to make CollectionName.find({}) on client side for example in Chrome console.

Do you have insecure and autopublish removed? If you are using insert on client side you must remember to use Meteor.allow on server side for that collection.

Clotho answered 24/4, 2015 at 19:58 Comment(0)
I
0

You can check the subscribed data by adding below meteor package

meteor add msavin:mongol

After installation, press Control + M to toggle it.

Other details at https://github.com/msavin/Mongol

or download this and install it and run with credentials.You can check your local database

Incendiarism answered 9/9, 2017 at 15:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.