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

Saves are not persisted in the database #5

Open
ghost opened this issue Feb 25, 2015 · 11 comments
Open

Saves are not persisted in the database #5

ghost opened this issue Feb 25, 2015 · 11 comments

Comments

@ghost
Copy link

ghost commented Feb 25, 2015

this.source.collection and Meteor.connection._mongo_livedata_collections[this.source] is a reference to the LocalCollection. Using this collection will not send the updates to the server.

The user must provide the Meteor.Collection reference to the proxy to fix this.

@mwarren2
Copy link

My saves aren't persisted at all. Showing (reading) a list of Translations is fine, but not saves. I know that the save is called, but nothing seems to happen whatsoever.
Sanjo, do you have any advice about debugging these saves? Pressing enter in an editable field calls the save, but then nothing seems to happen. Any idea how to debug this or how to see what's happening?
The save in the config of my webix datatable is like this:
save: webix.proxy('meteor', Translations)

And Translations is instantiated in the normal way:
Translations = new Mongo.Collection('translations');

@ghost
Copy link
Author

ghost commented May 13, 2015

@mwarren2
Copy link

Thanks for the pointer, which was a big help.
The code is doing exactly what it should: the record _id is correct, the data is correct for the $set.
However I see that the collection is a LocalCollection.

Could you explain the fix to me? What do you mean by the 'Meteor.Collection reference'? I only know the one way of referencing collections, and that gives the LocalCollection

@ghost
Copy link
Author

ghost commented May 14, 2015

The return value of new Mongo.Collection('translations'); is the right collection object. If that doesn't work maybe you don't declare the collection on the server side?!

@mwarren2
Copy link

It's declared correctly in a .js file in the /lib folder, so it's available to both server and client.
User permissions are all correct. At one stage I got rid of admin permissions, it still didn't work.

Thanks very much for your help, I'll just keep debugging!

@mwarren2
Copy link

Ok I think I have found my problem, something similar to yours, but I'll open another issue.
At the moment I don't have a workaround, though I will look into it.

@mwarren2
Copy link

Sanjo, I need another favour, if you have time. Do you know a decent link that explains properly how to override packages using my project's /package folder? I'd like to take a look at my problem. I've read how wonderfully easy it is to override in this way.... I've tried copying webix_webix.js to the /packages folder, uninstalling webix:webix, reinstalling webix:webix, tried copying the whole folder to the packages folder, nothing works. How is this done? (a little detail would be helpful)

@ghost
Copy link
Author

ghost commented May 21, 2015

cd packages
git clone --recursive https://github.com/dandv/meteor-webix.git

And make sure that webix:webix is in your .meteor/packages file. Haven't tested it but should work ;-)

@mwarren2
Copy link

Get it. Thanks.
But, webix folder isn't there, and webix-meteor-data folder is empty.
Maybe I'm not the right kind of user?

@ghost
Copy link
Author

ghost commented May 21, 2015

It uses submodules with ssh URLs. So you just need to have your SSH key setup correctly with Github and then do:

cd packages/meteor-webix
git submodule init
git submodule update

You can learn more about submodules here: https://git-scm.com/book/en/v2/Git-Tools-Submodules#Cloning-a-Project-with-Submodules

The --recursive option does the same and it worked for me.

@mwarren2
Copy link

Thanks, done all that and I've got the stuff, thanks for the help with the noob questions

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

No branches or pull requests

1 participant