Sometimes mongo doesnt update my fields


#1

I am using upsert method. I hit update button, then some fields dont be updated. Going back to page where i am updating document, changing inputs, hit update button then fields being updated.

I am thinking to use ‘update callback function’. Any suggestion will be welcomed.


#2

I tried to callback function: if has error console.log error.reason and return false. Didnt worked. Some fields came blank again.


#3

Are you using simple schema? If so, is it correct for the changes you’re trying to make?


#4

Nope, i am not using even subscription/publication. I wrote my app by spaggettiest code you ever seen.

I just wanted to know, is it common problem or just me. After your comment, I think the problem is my code, not mongo or meteor.

I will check my code when my chakras open. Thanks for your interest.


#5

can you post some of your codes so we can check it?


#6

Yep, i can post full of my code.

Some infos:

  • This is polymer meteor project
  • Shitty coded for release
  • Attached screenshot of this page
  • Codes expalined in comment lines

http://paste.ubuntu.com/16325993/

Screenshot: http://i.hizliresim.com/z58loj.png

Tested like:

  1. Adding 3 question. Test, Test, Olay. (Success)
  2. Adding 3 question. Klasik, Test, Olay (Fail: Klasik inserted but others empty)

Last words: I’d tried to explain my code. If any help come, i’ll be pleased but as i said, it is drudgery for you.
I just wondered is it common update problem or is it my bad code.

Thanks for your interest, sorry for bad english.


#7

Meteor forum message: New users can put only 2 links for post.
Copied from my last message:

Followings are not neccessary but i can post them, too.
My update methods: http://paste.ubuntu.com/16326446/