Page MenuHomePhabricator

CentralNotice doesn't warn if attempted banner name doesn't match permitted regex
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

Request ID: XBWTrwpAICsAADsn@isAAAAI

message
[XBWTrwpAICsAADsn@isAAAAI] 2018-12-15 23:52:15: Fatal exception of type "BannerDataException"
trace
2018-12-15 23:52:15 [XBWTrwpAICsAADsn@isAAAAI] mw1322 metawiki 1.33.0-wmf.8 exception ERROR: [XBWTrwpAICsAADsn@isAAAAI] /wiki/Special:CentralNoticeBanners/Edit/Community_banner_templatev2   BannerDataException from line 1079 of /srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/includes/Banner.php: Banner name must be in format /^[A-Za-z0-9_]+$/ {"exception_id":"XBWTrwpAICsAADsn@isAAAAI","exception_url":"/wiki/Special:CentralNoticeBanners/Edit/Community_banner_templatev2","caught_by":"mwe_handler"} 
reedy@mwlog1001:/srv/mw-log$ grep XBWTrwpAICsAADsn@isAAAAI exception.log -A 15
2018-12-15 23:52:15 [XBWTrwpAICsAADsn@isAAAAI] mw1322 metawiki 1.33.0-wmf.8 exception ERROR: [XBWTrwpAICsAADsn@isAAAAI] /wiki/Special:CentralNoticeBanners/Edit/Community_banner_templatev2   BannerDataException from line 1079 of /srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/includes/Banner.php: Banner name must be in format /^[A-Za-z0-9_]+$/ {"exception_id":"XBWTrwpAICsAADsn@isAAAAI","exception_url":"/wiki/Special:CentralNoticeBanners/Edit/Community_banner_templatev2","caught_by":"mwe_handler"} 
[Exception BannerDataException] (/srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/includes/Banner.php:1079) Banner name must be in format /^[A-Za-z0-9_]+$/
  #0 /srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/special/SpecialCentralNoticeBanners.php(928): Banner->cloneBanner(string, User, string)
  #1 /srv/mediawiki/php-1.33.0-wmf.8/includes/htmlform/HTMLForm.php(663): SpecialCentralNoticeBanners->processEditBanner(array, CentralNoticeHtmlForm)
  #2 /srv/mediawiki/php-1.33.0-wmf.8/includes/htmlform/HTMLForm.php(555): HTMLForm->trySubmit()
  #3 /srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/special/SpecialCentralNoticeBanners.php(437): HTMLForm->tryAuthorizedSubmit()
  #4 /srv/mediawiki/php-1.33.0-wmf.8/extensions/CentralNotice/special/SpecialCentralNoticeBanners.php(85): SpecialCentralNoticeBanners->showBannerEditor()
  #5 /srv/mediawiki/php-1.33.0-wmf.8/includes/specialpage/SpecialPage.php(569): SpecialCentralNoticeBanners->execute(string)
  #6 /srv/mediawiki/php-1.33.0-wmf.8/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(string)
  #7 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
  #8 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(862): MediaWiki->performRequest()
  #9 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(517): MediaWiki->main()
  #10 /srv/mediawiki/php-1.33.0-wmf.8/index.php(42): MediaWiki->run()
  #11 /srv/mediawiki/w/index.php(3): include(string)
  #12 {main}

Impact

Wikimedia Production.

Notes

Got this while trying to clone https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/Edit/Community_banner_templatev2

Software, etc.

Event Timeline

Thanks for the trace, @Reedy
So the problem seems to be the banner name: Banner name must be in format /^[A-Za-z0-9_]+$/. The naming I wanted to use was ESWP-Antarctica-Month-2018.

I don't think CentralNotice should fatally fail and give no explanations (unless you have Logstash access) if the naming format is not correct. Not very user friendly IMHO. Perhaps CentralNotice should warn the user that the name is not accepted, prompting them to choose a different one based on the hardcoded naming rules...

Peachey88 renamed this task from Fatal exception of type "BannerDataException" when cloning a banner to CentralNotice doesn't warn if attempted banner name doesn't match permitted regex.Dec 16 2018, 12:30 AM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM