This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-526df961-eedb-4eab-9423-297e6a42f40e XWIKI-23487 Open

Uncaught SyntaxError: Unexpected token ':' in JS console when uploading any attachment

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-15b094ad-0baa-480f-ab86-cfd9c81b16f6 Andreea Tarata created this issue on 28/Aug/25 08:47
 
Summary: Uncaught SyntaxError: Unexpected token ':' in JS console when uploading any attachment
Issue Type: cid:jira-generated-image-avatar-526df961-eedb-4eab-9423-297e6a42f40e Bug
Affects Versions: 14.10, 16.10.10, 17.4.3
Assignee: Unassigned
Attachments: JS_Console.png
Components: Attachments
Created: 28/Aug/25 08:47
Environment: Windows 11 Pro, Edge 138, using an instance of XWiki 17.4.3 on MariaDB 11.8, Jetty 12.0
Priority: cid:jira-generated-image-static-major-988abf61-2c62-4a77-992f-6b51aa6dbe01 Major
Reporter: Andreea Tarata
Description:

Steps to reproduce:

  1. Go to attachment tab in any page
  2. Open JS Console
  3. Attach any file (e.g. .png)

Expected results:

The JS Console does not show any errors.

Actual results:

The JS Console shows the following error:

```VM15804:2 Uncaught SyntaxError: Unexpected token ':' at prototype.js?r=1:640:69 at Array.map (<anonymous>) at Array.collect (prototype.js?r=1:1270:23) at String.evalScripts (prototype.js?r=1:640:34) at prototype.js?r=1:434:23

  (anonymous) @ prototype.js?r=1:640
  (anonymous) @ prototype.js?r=1:1270
  evalScripts @ prototype.js?r=1:640
  (anonymous) @ prototype.js?r=1:434
  setTimeout    
  delay @ prototype.js?r=1:433
  defer @ prototype.js?r=1:440
  update @ prototype.js?r=1:2281
  _methodized @ prototype.js?r=1:456
  onRequestDone @ upload.js:346
  (anonymous) @ prototype.js?r=1:417
  XMLHttpRequest.send    
  startUploading @ upload.js:255
  onUploadNextFile @ upload.js:574
  (anonymous) @ prototype.js?r=1:417
  (anonymous) @ prototype.js?r=1:7282
  fireEvent_DOM @ prototype.js?r=1:7141
  fire @ prototype.js?r=1:7130
  k @ eventsBridge.js:61
  onFilesSelected @ upload.js:565
  (anonymous) @ prototype.js?r=1:417
  (anonymous) @ prototype.js?r=1:7266

```

 
 

1 update

 
cid:jira-generated-image-avatar-555b36dd-a1b4-47d2-a534-894f1ffbdad8 Changes by Ilie Andriuta on 28/Aug/25 08:48
 
Description: {*}Steps to reproduce{*}:
# Go to attachment tab in any page
# Open JS Console
# Attach any file (e.g. .png)

{*}Expected results{*}:

The JS Console does not show any errors.

{*}Actual results{*}:

The JS Console shows the following error:
{code:java}
``` VM15804:2 Uncaught SyntaxError: Unexpected token ':'  at prototype.js?r=1:640:69  at Array.map (<anonymous>)  at Array.collect (prototype.js?r=1:1270:23)  at String.evalScripts (prototype.js?r=1:640:34)  at prototype.js?r=1:434:23
| |(anonymous)|@|prototype.js?r=1:640|
| |(anonymous)|@|prototype.js?r=1:1270|
| |evalScripts|@|prototype.js?r=1:640|
| |(anonymous)|@|prototype.js?r=1:434|
| |setTimeout| | |
| |delay|@|prototype.js?r=1:433|
| |defer|@|prototype.js?r=1:440|
| |update|@|prototype.js?r=1:2281|
| |_methodized|@|prototype.js?r=1:456|
| |onRequestDone|@|upload.js:346|
| |(anonymous)|@|prototype.js?r=1:417|
| |XMLHttpRequest.send| | |
| |startUploading|@|upload.js:255|
| |onUploadNextFile|@|upload.js:574|
| |(anonymous)|@|prototype.js?r=1:417|
| |(anonymous)|@|prototype.js?r=1:7282|
| |fireEvent_DOM|@|prototype.js?r=1:7141|
| |fire|@|prototype.js?r=1:7130|
| |k|@|eventsBridge.js:61|
| |onFilesSelected|@|upload.js:565|
| |(anonymous)|@|prototype.js?r=1:417|
| |(anonymous)|@|prototype.js?r=1:7266|

```
{code}