Closed zenmatt closed 10 years ago
There could be a lot of reasons for it not to work.
If it still won't work I'd need a reproducable repository to checkout and have a look at.
1 - Yes using collection2. Apologies, thought that was clear as I can see the Collection fields properly and assumed it was recognizing them via schema definition.
2 - Yes, we can add items without problems (this app is already in production).
3 - Yes.
Okay, yeah than please provide me with a reproducable repository.
Unfortunately I can't do that, maybe we can leave this open for a week or two and see if anyone has a similar problem before closing? I'll have some time today and will continue poking around on my end, will update this thread if I can fix it or provide more information.
Could it be that you only can edit items after refreshing the site? I'll have a closer look at it l8er.
Can you please mrt update
and have a look if it works now?
Refreshing doesn't help. I also updated to the latest release, unfortunately that didn't fix it or have any noticeable changes.
I can confirm this too. no data! I've just setup and got into the admin panel, its showing all collections and schema fields but not displaying any records. When I try to add something using a form it gets added into the database but not displayed. But you can see that it kinda appears on the screen before being taken off.
I wonder if its something to do with subscribing to the collections' data. I'll see if I could do a screencast.
Update: Alright I got the data by adding publish and subscribe rules for the collections as I have the autopublish removed. You may want to add this to the package description :). But I am getting issues with add users collection from here: https://github.com/matteodem/meteor-ogno-admin/issues/4
Can we please reopen this issue.
Also I get these warnings when I click on the collection. It has only 1 record :
duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6
How can this be fixed?
Hey there, having no subscription and publish rules is a common error. I guess that goes under common MeteorJS knowledge.
Are these errors happening on the client side? I'll be happy to have a reproducable repository. I'm also getting client errors with the example repository (https://github.com/matteodem/meteor-ogno-admin-example.git).
I'll have a closer look at it tonight.
I fixed some autoform stuff in the last version https://github.com/matteodem/meteor-ogno-admin/commit/ae1c4426b3c171fe47b759574c0cc2c9de0fe205
please try it out.
Thanks mate.
But I am still getting the errors:
duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6
Seems like the observer gets some documents twice or more. Not sure about that.
Fixed even more autoform complications. Please try it out, the duplicate id notice is still happening for some reason though.
Thanks mate. I'll test now and get back.
yes still getting them: duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6 duplicate id undefined in ["PDGqm57iwyFWQvF4W", "One", "Description One", ""2014-04-03T05:17:59.683Z"", "BBS7SWYF2s9LJgsGo", undefined, undefined, undefined] observe_sequence.js:6
Back to the original problem @zenmatt. Is it still empty with the newest version? 0.3.10
Please feel free to re-open this issue when you still got the error.
Replicated here: https://github.com/electricjesus/meteor-ogno-admin-issue-9
On the frontend, clearly there is data for the collection.. but when you go to /admin
you see the section for the collection but there is no data at all.
The problem was that one wasn't subscribed to the collection in the admin views. Removing the .subscribe statement to the beginning of the Meteor.startup code would fix it.
I added a new waitOn property though which you can use, I'll add a loading screen in near time: https://github.com/matteodem/meteor-ogno-admin#possible-properties-for-views.
OgnoAdmin.config({
auto : true,
prefix: '/admin',
isAllowed : function () {
var user = Meteor.user();
if(user) return true; // just allow all users for this app.. not really recommended obviously :)
},
homeScreenTemplate : 'manage',
homeScreenTemplateGuest : 'manage',
waitOn : function () {
Meteor.subscribe('cars');
}
});
Don't forget to update with mrt update
. Also fixed some other stuff on the way, thanks to your help.
Everything works, I can see all of my collections and their respective fields, but I get no data from Mongo. I cannot add new records either.