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

Edit not working? #9

Open
dorbareket opened this issue Feb 10, 2023 · 17 comments
Open

Edit not working? #9

dorbareket opened this issue Feb 10, 2023 · 17 comments

Comments

@dorbareket
Copy link

dorbareket commented Feb 10, 2023

  • Edit button is only available when I choose an id field of documents,
  • and clicking it doesn't do anything.

Expected behavior:

  • Edit button should be available on the document itself
  • and work

Maybe Edit button is supposed to be available for any field of the document? I'm not sure what was intended.

Clarification: Double clicking does nothing as well.
Effectively this means I can only view documents, which makes this amazing plugin useless.

Thx!

@geetesh-gupta
Copy link
Owner

As of now, when you will Right Click on the _id field, you will get the option to Edit the document. This has been the designed fliw from the start. Please try to validate if this is working for you.

@geetesh-gupta
Copy link
Owner

Hi @dorbareket, is the above approach working for you? If not, please let me know. Thanks

@dorbareket
Copy link
Author

Hi @geetesh-gupta
On right click on _id field I do get the Edit option, but nothing happens when I press it

P.S
sorry for the delay

@geetesh-gupta
Copy link
Owner

Right clicking on _id and clicking on Edit opens a window titled Edition which allows to edit each key-value.

If it is not working for you, it would be great if you can share a short video for the same.

Also, please share if any error is coming on clicking Edit. Errors come at bottom right corner and are also available via a Alert icon in bottom bar on right side.

@dorbareket
Copy link
Author

I just discovered I can create new documents and edit them, but I cannot edit existing documents using your tool (it does work from 3t studio or DataGrip).
There's no issue logged under notifications, it's just that absolutely nothing happens.
Here's a video:
MongoDBBrowserEdit

Thanks!

@geetesh-gupta
Copy link
Owner

Hi @dorbareket , sorry for delayed response. Are you still facing the issue? Did u check if u have edit access to the database your are trying to edit?

@dorbareket
Copy link
Author

@geetesh-gupta yes I'm an admin, I use Studio3T and I can edit whatever i want

@berndlueneburg
Copy link

Hi, @geetesh-gupta. I experience the same edit issue as dorbareket. Tried with no user (local default) and with different admin user setups. Edit does not work as expected. Thanks!

@geetesh-gupta
Copy link
Owner

I just now created a new collection with a document using Studio3T, then went to the plugin, loaded that collection, right clicked on the document _id, I was able to see the edit menu and edit the document.

One thing I observe in @dorbareket video, that the document you are trying to edit, is having the _id as 1, which in an ideal scenario should be something like 6697fc91313970259c0b06fc. Maybe that's the issue.

@berndlueneburg Can you share the screenshot of your collection, maybe if their is any similarity?

@juliojm13
Copy link

I just now created a new collection with a document using Studio3T, then went to the plugin, loaded that collection, right clicked on the document _id, I was able to see the edit menu and edit the document.

One thing I observe in @dorbareket video, that the document you are trying to edit, is having the _id as 1, which in an ideal scenario should be something like 6697fc91313970259c0b06fc. Maybe that's the issue.

@berndlueneburg Can you share the screenshot of your collection, maybe if their is any similarity?

I have the same issue and I agree that having an _id that is not an uidd like "my_settings" is the problem. But why is this a problem? In other clients like studio 3T that doesn't happen, it seems like a bug on your side for me, we can not change our _id values just for updating the data.
Thanks for your help in advance.

@berndlueneburg
Copy link

I just now created a new collection with a document using Studio3T, then went to the plugin, loaded that collection, right clicked on the document _id, I was able to see the edit menu and edit the document.

One thing I observe in @dorbareket video, that the document you are trying to edit, is having the _id as 1, which in an ideal scenario should be something like 6697fc91313970259c0b06fc. Maybe that's the issue.

@berndlueneburg Can you share the screenshot of your collection, maybe if their is any similarity?
No, i use standard MongoDb Ids:

Screenshot 2024-07-17 213706

@dorbareket
Copy link
Author

I also use standard ids. I just created that temporary DB for the video and to try with a clean db

@geetesh-gupta
Copy link
Owner

So, we are able to know the issue that _id is not in standard format. Will check for the support for other IDs. As of now, it only supports the ObjectIds.

@berndlueneburg
Copy link

So, we are able to know the issue that _id is not in standard format. Will check for the support for other IDs. As of now, it only supports the ObjectIds.

as I understand @dorbareket and i use standard MongoDb ObjectIds and the Edit issue appears anyhow. So it cannot be the problem of a different id format. I think the hottest hint is that newly added documents within the MongoDb Browser are editable but existing ones not. Does this eventually help you?

@geetesh-gupta
Copy link
Owner

I tried creating documents from Studio3T. I was able to edit them in the plug-in.

@dorbareket
Copy link
Author

So umm

  1. With the plugin, I can totaly create a document with string/numberInt _id. The new document is NOT EDITABLE, albeit edit button is in color. On creation I can add fields, but not afterwards.
    image

  2. I tried creating a document from Studio3T with objectId and indeed I am able to edit it from the plugin.

So @geetesh-gupta I think you are right, edit only works when _id is an ObjectId. It doesn't work if it's a string/NumberInt
image
image
image

So the plugin allows creating documents with _id that is not ObjectId, but wont' allow editing it

@geetesh-gupta
Copy link
Owner

Correct @dorbareket. Will try to see if we can fix it.

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

4 participants