Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

invalid document for insert: keys cannot contain "." #29

Closed
wants to merge 1 commit into from

Conversation

dv336699
Copy link

See perftools/xhgui#209 (comment)

invalid document for insert: keys cannot contain ".": "main()==>load::admin/index.php"

See perftools/xhgui#209 (comment)

`invalid document for insert: keys cannot contain ".": "main()==>load::admin/index.php"`
foreach($data['profile'] as $key => $value) {
$profile[strtr($key, ['.' => '_'])] = $value;
}
$data['profile'] = $profile;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't you lose filename information this way?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should use save.handler from config and if that's == 'mongodb' the keys are updated?

On xhgui is all as expected, however, instead of seeing admin/index.php in the function list and function details, you see admin/index_php. Mongo won't accept dot as index.


Before the PR

Screenshot 2019-08-21 at 17 23 34 578


After the PR

Screenshot 2019-08-21 at 17 24 00 147

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another replacement character that could be used? Perhaps a unicode dot that isn't recognized by Mongo as a dot?

@Catalin-Ionut
Copy link

Why has this not been merged yet? it's a blocking issue.

@markstory
Copy link
Member

@Catalin-Ionut I asked a question about alternative characters and never heard back.

@dv336699
Copy link
Author

@Catalin-Ionut @markstory sorry for the delay on that. I've been using with this change without issues as is and don't really bother me, happy to update as @markstory with • as I believe that won't be a problem. Will revert back soon.

@glensc
Copy link
Contributor

glensc commented Sep 1, 2020

this project is archived, this should be continued in main repo: perftools/xhgui#209

@glensc glensc closed this Sep 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants