@@ -62,12 +62,18 @@ public function getQuestion(): TranslatableMarkup {
6262 return $ this ->t ('Job not found ' );
6363 }
6464
65+
6566 $ webformId = $ this ->helper ->getWebformIdFromQueue ($ job ->getId ());
6667
67- return $ this ->t ('Are you sure you want to retry queue job related to Webform: @webformId, Submission id: @serialId ' , [
68- '@serialId ' => $ this ->helper ->getSubmissionSerialIdFromJob ($ job ->getId ()),
69- '@webformId ' => $ this ->entityTypeManager ->getStorage ('webform ' )->load ($ webformId )->label (),
70- ]);
68+ if (NULL !== $ webformId ) {
69+ return $ this ->t ('Are you sure you want to retry queue job related to Webform: @webformId, Submission id: @serialId ' , [
70+ '@serialId ' => $ this ->helper ->getSubmissionSerialIdFromJob ($ job ->getId ()),
71+ '@webformId ' => $ this ->entityTypeManager ->getStorage ('webform ' )->load ($ webformId )->label (),
72+ ]);
73+ }
74+ else {
75+ return $ this ->t ('Are you sure you want to retry queue job: @jobId ' , ['@jobId ' => $ job ->getId ()]);
76+ }
7177 }
7278
7379 /**
@@ -76,7 +82,15 @@ public function getQuestion(): TranslatableMarkup {
7682 public function getCancelUrl (): Url {
7783 $ webform = $ this ->helper ->getWebformIdFromQueue ((string ) $ this ->jobId );
7884
79- return Url::fromRoute ('entity.webform.error_log ' , ['webform ' => $ webform ]);
85+ if (NULL === $ webform ) {
86+ $ job = $ this ->helper ->getJobFromId ((string ) $ this ->jobId );
87+
88+ return Url::fromRoute ('view.advancedqueue_jobs.page_1 ' , ['arg_0 ' => $ job ->getQueueId ()]);
89+ }
90+ else {
91+ return Url::fromRoute ('entity.webform.error_log ' , ['webform ' => $ webform ]);
92+ }
93+
8094 }
8195
8296 /**
0 commit comments