File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ; Version 2.2.1 (May 4, 2026)
2+ * Fixed issue where if page did not exist it would cause a fatal error on special:SmartComments
3+
14; Version 2.2.0 (Feb 3, 2026)
25* Added 'X no. of comments on page' while viewing a page
36
Original file line number Diff line number Diff line change 66 " Robin van der Wiel" ,
77 " Yvar Nanlohij"
88 ],
9- "version" : " 2.2.0 " ,
9+ "version" : " 2.2.1 " ,
1010 "url" : " https://www.archixl.nl" ,
1111 "descriptionmsg" : " sc-desc" ,
1212 "license-name" : " GPL-2.0+" ,
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ private function generateCommentTable(): string {
261261 $ tableHtml .= Xml::openElement ( 'tr ' , [
262262 'class ' => "$ rowClass " ,
263263 'data-author ' => $ comment ->getAuthor ()->getName (),
264- 'data-page ' => $ comment ->getPage (),
264+ 'data-page ' => $ comment ->getPage () ?? wfMessage ( ' sc-page-not-found ' )-> text () ,
265265 'data-status ' => $ comment ->getStatus ()
266266 ] );
267267 $ tableHtml .= Xml::element ( 'td ' , null , wfMessage ('sc-status- ' . $ comment ->getStatus () ) );
@@ -483,6 +483,9 @@ private function getValidCssName( $string ) {
483483 */
484484 private function getPageUrl ( $ pageName ): string {
485485 $ title = Title::newFromText ( $ pageName );
486+ if ( $ pageName === null ) {
487+ return wfMessage ( 'sc-page-not-found ' )->text ();
488+ }
486489 return ( $ title instanceof Title ) ? $ title ->getLinkUrl () : '' ;
487490 }
488491
You can’t perform that action at this time.
0 commit comments