1

Here MongoDB entries shows 3889 , but it all shows empty.

But if i try to get with api then it showing all data.

enter image description here

How that is possible, and which case this things happen ??

Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125
Nishchit
  • 18,284
  • 12
  • 54
  • 81
  • The documents are empty in RockMongo? Is that your question? Because that sounds like a software bug which you should report to the devs of that particular software. – ʰᵈˑ May 20 '15 at 13:01
  • Ya but this is mongodb problem. In backup via export also shows empty entries. – Nishchit May 20 '15 at 13:02
  • If they're not blank using an API (I assume you are querying with the PHP driver because you've tagged PHP), then it's not a MongoDb problem, but a problem with RockMongo. – ʰᵈˑ May 20 '15 at 13:06
  • What are your versions of Rockmongo, PHP driver, and MongoDB? If you are using MongoDB 3.0+ and the WiredTiger storage engine it's likely that you need to upgrade your PHP driver to 1.6 or newer (see: [MongoDB Compatibility](http://docs.mongodb.org/ecosystem/drivers/php/#compatibility)). – Stennie May 21 '15 at 09:12
  • i am using mongodb 2.4.6 & other database showing fine. i have filed an issue on rockmongo github repo – Nishchit May 21 '15 at 09:13

1 Answers1

2

This started happening to me recently also, to check simply go in to the mongo console, and type:

db.collection.find()

Have a look at your data, you'll you may find one of the document entries is assigned the value of NaN.

How can this occur? At least in Javascript, if a variable doesn't exist when sent to collection.update() it becomes NULL, if you then add to it, it becomes 'NaN'.

This is at-least one case when the RockMongo PHP code bugs out and only shows the title and no data of a document.

ChrisAdmin
  • 982
  • 1
  • 12
  • 32