BaySchoolCS2 / ProjectRepo

Whirpl - A network designed with small communities in mind
MIT License
1 stars 9 forks source link

ID system does not work #89

Closed michardy closed 9 years ago

michardy commented 9 years ago

When I create a post I get redirected to the same post every time When I click on a link I go to a different post than the one displayed by the posting page but it is still the same post every time

michardy commented 9 years ago

Here is the what the database is storing for my posts:

michael@michael-HP-EliteBook-8470p ~ $ mongo
MongoDB shell version: 2.4.9
connecting to: test
> use project
switched to db project
> db.posts.find()
{ "_cls" : "Posts", "_id" : ObjectId("5553c25a8e77452f39b484ff"), "author" : ObjectId("5553c2448e77452f39b484fe"), "comments" : [   {   "commentid" : "932f8767",   "created_at" : ISODate("2015-05-13T21:28:09.029Z"),     "author" : ObjectId("5553c2448e77452f39b484fe"),    "body" : "testing",     "flags" : 0,    "flagTypes" : [ ],  "invisible" : false,    "moderated" : false,    "moderatedBy" : [ ] } ], "content" : "test", "created_at" : ISODate("2015-05-13T21:28:09.030Z"), "flagTypes" : [ ], "flags" : 0, "invisible" : false, "moderated" : false, "moderatedBy" : [ ], "postid" : "9d5c5b36", "score" : 0, "sticky" : false, "title" : "test" }
{ "_id" : ObjectId("5553c3308e77452f39b48502"), "_cls" : "Posts", "postid" : "9d5c5b36", "created_at" : ISODate("2015-05-13T21:28:09.030Z"), "title" : "Eggs and Spam", "author" : ObjectId("5553c2448e77452f39b484fe"), "content" : "", "score" : 0, "sticky" : false, "comments" : [ ], "votedUp" : [ ], "votedDown" : [ ], "flags" : 0, "flagTypes" : [ ], "invisible" : false, "moderated" : false, "moderatedBy" : [ ] }
{ "_id" : ObjectId("5553c4468e77452f39b48503"), "_cls" : "Posts", "postid" : "9d5c5b36", "created_at" : ISODate("2015-05-13T21:28:09.030Z"), "title" : "123", "author" : ObjectId("5553c2448e77452f39b484fe"), "content" : "", "score" : 0, "sticky" : false, "comments" : [ ], "votedUp" : [ ], "votedDown" : [ ], "flags" : 0, "flagTypes" : [ ], "invisible" : false, "moderated" : false, "moderatedBy" : [ ] }
{ "_cls" : "Posts", "_id" : ObjectId("5553c2f08e77452f39b48500"), "author" : ObjectId("5553c2448e77452f39b484fe"), "comments" : [ ], "content" : "", "created_at" : ISODate("2015-05-13T21:28:09.030Z"), "flagTypes" : [ ], "flags" : 0, "invisible" : false, "moderated" : false, "moderatedBy" : [ ], "postid" : "9d5c5b36", "score" : 1, "sticky" : false, "title" : "hello world", "votedDown" : [ ], "votedUp" : [  ObjectId("5553c62f8e77453052224cef") ] }
{ "_cls" : "Posts", "_id" : ObjectId("5553c3128e77452f39b48501"), "author" : ObjectId("5553c2448e77452f39b484fe"), "comments" : [ ], "content" : "", "created_at" : ISODate("2015-05-13T21:28:09.030Z"), "flagTypes" : [ ], "flags" : 0, "invisible" : false, "moderated" : false, "moderatedBy" : [ ], "postid" : "9d5c5b36", "score" : 1, "sticky" : false, "title" : "posting", "votedDown" : [ ], "votedUp" : [  ObjectId("5553c62f8e77453052224cee") ] }
{ "_id" : ObjectId("5553c8118e7745305b113be1"), "_cls" : "Posts", "postid" : "9b4bf141", "created_at" : ISODate("2015-05-13T21:46:28.152Z"), "title" : "testing 1 2 3", "author" : ObjectId("5553c62f8e77453052224cee"), "content" : "testing", "score" : 0, "sticky" : false, "comments" : [ ], "votedUp" : [ ], "votedDown" : [ ], "flags" : 0, "flagTypes" : [ ], "invisible" : false, "moderated" : false, "moderatedBy" : [ ] }
{ "_id" : ObjectId("5553c8478e7745305b113be2"), "_cls" : "Posts", "postid" : "9b4bf141", "created_at" : ISODate("2015-05-13T21:46:28.152Z"), "title" : "testing 321", "author" : ObjectId("5553c2448e77452f39b484fe"), "content" : "", "score" : 0, "sticky" : false, "comments" : [ ], "votedUp" : [ ], "votedDown" : [ ], "flags" : 0, "flagTypes" : [ ], "invisible" : false, "moderated" : false, "moderatedBy" : [ ] }
{ "_id" : ObjectId("5553c85b8e7745305b113be3"), "_cls" : "Posts", "postid" : "9b4bf141", "created_at" : ISODate("2015-05-13T21:46:28.152Z"), "title" : "more posts", "author" : ObjectId("5553c2448e77452f39b484fe"), "content" : "", "score" : 0, "sticky" : false, "comments" : [ ], "votedUp" : [ ], "votedDown" : [ ], "flags" : 0, "flagTypes" : [ ], "invisible" : false, "moderated" : false, "moderatedBy" : [ ] }
> 

Not all the posts have the same postid but for every id at least two share it.

fhebert-perkins commented 9 years ago

Fixed 29513e12e6ba6510aa60d93f46dd17797ba0a6b1