Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

User being added through Admin page gets "_id" of null #37

Open
bdws opened this issue Oct 4, 2017 · 5 comments
Open

User being added through Admin page gets "_id" of null #37

bdws opened this issue Oct 4, 2017 · 5 comments
Labels

Comments

@bdws
Copy link

bdws commented Oct 4, 2017

Apologies for stopping by with another possible bug report.

When adding a new user through the Admin page, everything looks to go through okay. Once you add a second user, however, if you switch over to the floorplan page, you'll see that the first added user is gone. The last created user will still be available, but any user created through the Admin page other than the last one will disappear.

https://prnt.sc/gtc3sw

Looking at the "people" collection in the floorplan database, it looks like users created through the Admin site get a "_id" value of null. Only one object in the collection can have that null "_id", so the older added users disappear.

If I add users manually through the mongo shell, the users get an "_id" value of "ObjectId("stringOfCharacters") and the users persist in the database and on the Admin/Floorplan sites.

For what it's worth, this happens for me on Ubuntu 16.04 and Centos 7.

Not related at all, but a fresh install pops up with broken images and formatting until permissions are sorted on public/styles. Granting rwx to everyone to that directory fixed the issue and allows the page to render successfully. Prior to fixing permissions, an error can be seen accessing all.css. Think LESS may be unable to convert files in that directory with the default permissions.

@Aldaviva
Copy link
Owner

Aldaviva commented Oct 5, 2017

Interesting, this isn't reproducing on my system. What version of MongoDB are you using? I suspect the semantics of sending { _id: null } may have changed, since I am on a fairly old version of MondoDB.

@Aldaviva Aldaviva added the Issue label Oct 5, 2017
@Aldaviva
Copy link
Owner

Aldaviva commented Oct 5, 2017

Thanks for the tip on the directory permissions, I have updated the Readme: 073f3e2

@bdws
Copy link
Author

bdws commented Oct 5, 2017

I was experiencing the issue on MongoDB 3.4.9. I spun up a fresh Centos 7 VM this morning and installed MongoDB 2.6.9 and the issue persists. Newly added users through the Admin page get a "_id: null" attribute.

Re: the directory permissions, the "all users" group needs the permission to write to the folder/files. "chmod" command in the readme looks like it only grants write permission to owner.

FWIW, I used "chmod -R 757 public/styles data/photos" to fix my permissions issue.

@Edduard
Copy link

Edduard commented Dec 12, 2017

I'm also experiencing this issue on db version v3.4.10.
I'm planning to use this repo for a project I'm working on right now. Are you still working on this issue? Will this be resolved soon?

I need to know in order to make a decision whether to use your repo or not.

@Aldaviva
Copy link
Owner

Hi @SpedsT,

Thanks for looking at this project.

I'm not actively working on this issue right now. I accept pull requests, but I will also understand if you decide to look elsewhere for your floor planning needs.

Thanks,
Ben

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

No branches or pull requests

3 participants