This issue has been created
There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-b9a3c33b-60c9-40c6-8927-1ee9bd60fc5a XWIKI-23573 Open

Errors when setting a previously uploaded image as avatar

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-aaf6c0aa-ec17-49f3-bf68-dd6689a0dbda Ilie Andriuta created this issue on 03/Oct/25 15:39
 
Summary: Errors when setting a previously uploaded image as avatar
Issue Type: cid:jira-generated-image-avatar-b9a3c33b-60c9-40c6-8927-1ee9bd60fc5a Bug
Affects Versions: 17.7.0
Assignee: Unassigned
Attachments: Avatar_JS_Error_exp.png
Components: Icon Themes
Created: 03/Oct/25 15:39
Environment: Windows 11 Pro, Chrome 140, using an instance of XWiki 17.7.0 on PostgreSQL 17, Tomcat 11.0.11
Priority: cid:jira-generated-image-static-blocker-0c2910a1-2f88-48c3-aba3-632e687a36f3 Blocker
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Go to user's profile page
  2. Click "Change photo" button
  3. Browse and select a first image
  4. Click "Upload and select" button
  5. Click "Change photo" button again
  6. Browse and select another (second) image
  7. Click "Upload and select" button
  8. Click "Change photo" button again
  9. Click "Select" (green check) button for the first uploaded image

Expected results

The first image uploaded is set as avatar (may require a page refresh to be seen).

Actual results

The first image cannot be set as avatar at this point.

A red error message is displayed on the bottom of the page:

Failed:Server not responding

In browser's JS console, the following errors are displayed:

prototype.js?r=1:1739   POST http://localhost:1115/xwiki/bin/view/XWiki/undefined 404 (Not Found)
request @ prototype.js?r=1:1739
initialize @ prototype.js?r=1:1704
(anonymous) @ prototype.js?r=1:447
klass @ prototype.js?r=1:80
onSelect @ AttachmentSelector:227
(anonymous) @ prototype.js?r=1:417
(anonymous) @ prototype.js?r=1:7266

and

prototype.js?r=1:1837 Uncaught TypeError: Cannot read properties of undefined (reading 'match')
    at klass.isSameOrigin (prototype.js?r=1:1837:22)
    at klass.respondToReadyState (prototype.js?r=1:1819:43)
    at klass.onStateChange (prototype.js?r=1:1754:12)
isSameOrigin @ prototype.js?r=1:1837
respondToReadyState @ prototype.js?r=1:1819
onStateChange @ prototype.js?r=1:1754
XMLHttpRequest.send
request @ prototype.js?r=1:1739
initialize @ prototype.js?r=1:1704
(anonymous) @ prototype.js?r=1:447
klass @ prototype.js?r=1:80
onSelect @ AttachmentSelector:227
(anonymous) @ prototype.js?r=1:417
(anonymous) @ prototype.js?r=1:7266

The issue also reproduces if the user goes back to change any other picture from existing ones.

The issue couldn't be reproduced on XWiki 17.6.0.

 
 

3 updates

 
cid:jira-generated-image-avatar-aaf6c0aa-ec17-49f3-bf68-dd6689a0dbda Changes by Ilie Andriuta on 03/Oct/25 15:39
 
Fix Version: 17.9.0-rc-1
Labels: regression
 
cid:jira-generated-image-avatar-aea48bec-62bb-4b1d-9e98-bd20a2efb2ac Changes by Charpentier Lucas on 03/Oct/25 15:46
 
Assignee: Charpentier Lucas