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

Room name missing after renamed using Arabic characters #1571

Closed
engelgabriel opened this issue Dec 4, 2015 · 9 comments
Closed

Room name missing after renamed using Arabic characters #1571

engelgabriel opened this issue Dec 4, 2015 · 9 comments

Comments

@engelgabriel
Copy link
Member

The room was created with an english name, then I enabled Arabic characters in the UTF8 regex, renamed the room to an arabic name, it accepted the name but it disappeared!

image

@engelgabriel engelgabriel changed the title Room name missing is a bug that happened after I renamed one of the rooms. Room name missing after renamed using Arabic characters Dec 4, 2015
@fduraibi
Copy link
Contributor

fduraibi commented Dec 4, 2015

This only happened once so far, I later renamed a few other rooms and all went smooth.

@graywolf336
Copy link
Contributor

Can you provide what you renamed it to? That way we can test it ourselves.
Thanks

On Fri, Dec 4, 2015, 3:42 PM Fahad Alduraibi [email protected]
wrote:

This only happened once so far, I later renamed a few other rooms and all
went smooth.


Reply to this email directly or view it on GitHub
#1571 (comment)
.

@fduraibi
Copy link
Contributor

fduraibi commented Dec 5, 2015

I don't remember exactly, but it was something that meant "test", so maybe it was "اختبار" or "تجربة"

However, I tried it again with these names and it didn't cause the issue,it seems more of a glitch than a persistence bug.

@engelgabriel
Copy link
Member Author

Let's close this in that case.

@fduraibi
Copy link
Contributor

The same problem just happened again

The main channel was called "acc" and I wanted to change it to its Arabic name "اسس" but the name disappeared!

The message that shows after changing a name is: "تم تغيير اسم الغرفة إلى: بواسطة فهد" which translates to
"Room name changed to: by Fahad" <-- the name is blank! :(

@fduraibi
Copy link
Contributor

I tried it on my test server and I found this in the browser console:

Exception while simulating the effect of invoking 'saveRoomName' TypeError: room.u is undefined
Stack trace:
.saveRoomName@http://10.2.2.37:3000/app/client/methods/saveRoomName.coffee.js?33455a18ae9f2374eac35da694e687297ee09020:17:1
.apply/stubReturnValue<@http://10.2.2.37:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3911:20
.withValue@http://10.2.2.37:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:971:17
.apply@http://10.2.2.37:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3902:31
.call@http://10.2.2.37:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3780:12
renameRoom@http://10.2.2.37:3000/packages/rocketchat_ui.js?f4aea65f0b324d2923aa5eff5477e637ef3ad5ac:6524:1
["keydown #room-title-field"]@http://10.2.2.37:3000/packages/rocketchat_ui.js?f4aea65f0b324d2923aa5eff5477e637ef3ad5ac:6191:14
wrapHelpersAndEvents/</fn1/dict[name]@http://10.2.2.37:3000/packages/rocketchat_logger.js?1169b1644984b860d8f19217f8b4351cdeb9beec:56:20
Template.prototype.events/eventMap2[k]</</<@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3697:18
Template._withTemplateInstanceFunc@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3671:12
Template.prototype.events/eventMap2[k]</<@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3696:1
attached_eventMaps/</</</<@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:2557:22
Blaze._withCurrentView@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:2211:12
attached_eventMaps/</</<@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:2556:1
HandlerRec/this.delegatedHandler</<@http://10.2.2.37:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:833:14
jQuery.event.dispatch@http://10.2.2.37:3000/packages/jquery.js?1015953f785c9b76503e2ecb391507dce965f357:4690:15
jQuery.event.add/elemData.handle@http://10.2.2.37:3000/packages/jquery.js?1015953f785c9b76503e2ecb391507dce965f357:4359:6

@fduraibi
Copy link
Contributor

This problem happens every time if "UTF8 Name Slugify" is set to true.

This code always returns an empty string if the name is in Unicode characters:
name = _.slugify name

the _.slugify which is being used here is not Unicode friendly

@engelgabriel
Copy link
Member Author

Good debugging! What do you suggest?

@fduraibi
Copy link
Contributor

Use one that supports Unicode :)

e.g. https://github.com/mozilla/unicode-slugify
is it a built in function?

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

No branches or pull requests

4 participants