This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-afa0c271-1a32-4c0e-8f3a-2bf6106ae4ce XWIKI-25290 Open

Scheduler actions show an empty error message when the job page cannot be loaded

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e852fd83-c524-4329-b3e6-0188b9af6e6d Vincent Massol created this issue on 14/Oct/26 10:42
 
Summary: Scheduler actions show an empty error message when the job page cannot be loaded
Issue Type: cid:jira-generated-image-avatar-afa0c271-1a32-4c0e-8f3a-2bf6106ae4ce Bug
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Scheduler
Created: 14/Oct/26 10:42
Priority: cid:jira-generated-image-static-minor-2a34385c-2a4f-4b44-a366-b650dea3b4c3 Minor
Reporter: Vincent Massol
Description:

The Scheduler home page (Scheduler.WebHome) displays $xcontext.get('error') in an error box when an action on a job (schedule, pause, resume, unschedule, trigger) fails. However when the job page cannot be loaded (e.g. a database error), the error box is empty and the user doesn't know why the action failed.

The SchedulerPluginApi methods taking an com.xpn.xwiki.api.Object (the ones used by Scheduler.WebHome: scheduleJob, pauseJob, resumeJob, unscheduleJob, triggerJob, getNextFireTime, getPreviousFireTime) catch the exception thrown when retrieving the job and return false/null without putting its message in the error context key, with the comment "we don't need to push the exception message in the context here as it should already have been pushed by the throwing exception". But SchedulerPluginApi#retrieveBaseObject(), which throws it, never pushes it.

Verified with a unit test making the loading of the job page fail: scheduleJob(Object) returns false and $xcontext.get('error') is null.