server icon indicating copy to clipboard operation
server copied to clipboard

TypeError: n.indexOf is not a function[Learn More] commentstabview.js:612:8

Open rassakali opened this issue 6 years ago • 7 comments

Steps to reproduce

  1. have a user with a numeric username. in my case, I created a user with (username = 2 and display name = numericUsername)
  2. Go to a file or folder -> Detail --> Comments
  3. In commant, yype this: @numericUsername (it is to quote the user in the text) and send.

Actual behaviour

the comment does not pass (see the image in attachment) No problem if it is a user with a username with string. 20191223_nextcloud16_erreur_comment

Server configuration

Operating system: Version Apache 2.4.41 Version de PHP 7.3.12 Version de MySQL 10.3.21-MariaDB Architecture x86_64 OS linux

Database: Type: mysql Version: 10.3.21 Size: 2.5 MB

PHP version: Version: 7.3.12 Memory Limit: 512 MB Max Execution Time: 3600 Upload max size: 64 MB

Nextcloud version: (see Nextcloud admin page) Version: 16.0.7.1 Apps installed: 50 Apps updates available: 0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: from scratch

rassakali avatar Dec 23 '19 16:12 rassakali

cc @nickvergessen

kesselb avatar Dec 23 '19 17:12 kesselb

Hello, Is there a workaround for this bug? I tried to debug the source commentstabview.js. but it does not exist locally! How I can debug this source to suggest a solution? Thank you in advance for your assistance :)

rassakali avatar Jan 08 '20 13:01 rassakali

after debugging. here is what I found as a solution: replace : -1!==n.indexOf(" ")?e.html('@"'+n+'"'):e.html("@"+n) by -1!==n.toString().indexOf(" ")?e.html('@"'+n+'"'):e.html("@"+n) in ../apps/comments/js/comments.js

rassakali avatar Jan 14 '20 11:01 rassakali

Is this Issue still valid? If not, please close this issue. Thanks! :)

szaimen avatar May 28 '21 10:05 szaimen

This is not yet resolved! I proposed a solution but is not yet included in the sources!

rassakali avatar May 29 '21 16:05 rassakali

Thanks for the feedback @rassakali! Would you be able to create a PR with your fix? That would be great! :)

szaimen avatar May 29 '21 18:05 szaimen

After verifications, this problem is not reproducible in version 21.x.

rassakali avatar May 30 '21 18:05 rassakali