Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25290

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 18.10.0-rc-1
    • 17.10.0
    • Scheduler
    • None
    • Unknown
    • N/A
    • N/A

    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.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: