Punctuation is strange and something is missing from the list, for example: "DE; : (All except )"
Steps to reproduce:
- Set a campaign to include one or more countries but without selecting any specific regions.
- Visit Special:CentralNotice
awight | |
Sep 21 2022, 11:28 AM |
F35535412: image.png | |
Sep 26 2022, 7:47 PM |
F35527150: image.png | |
Sep 21 2022, 11:28 AM |
Punctuation is strange and something is missing from the list, for example: "DE; : (All except )"
Steps to reproduce:
Change 833757 had a related patch set uploaded (by Awight; author: Awight):
[mediawiki/extensions/CentralNotice@master] Convert configuration into class const
Change 833775 had a related patch set uploaded (by Awight; author: Awight):
[mediawiki/extensions/CentralNotice@master] Move short-list helper into a dedicated class
I haven't been able to reproduce this locally, but uselang=qqx shows where the data is missing:
AT(comma-separator)CH(comma-separator)DE(comma-separator)LI(and)(word-separator)LU; : ((centralnotice-all-except: ))
Looking at the database with this query,
select * from cn_notices left join cn_notice_countries on not_id = nc_notice_id left join cn_notice_regions on not_id = nr_notice_id where not_name='WikiCon 2022 in Germany';
there are only linked countries, no regions. The countries match the list above.
Reproducing the bug locally is simple, I see. Selecting any combination of countries but not changing the region selection will result in a rendered list like "CH; : (Alle außer )". Deselecting at least one region results in a correct rendering like "CH: (Alle außer UR)".
Change 834490 had a related patch set uploaded (by Awight; author: Awight):
[mediawiki/extensions/CentralNotice@master] Detect empty list of countries or regions
To be clear, the "Detect empty list" patch fixes the original bug, and the other two patches are just optional clean-up.
Change 834490 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Detect empty list of countries or regions
Problem is fixed on the beta cluster where many campaigns are set with countries and no regions, so previously buggy.
ReleaseTaggerBot added a project: MW-1.40-notes (1.40.0-wmf.3; 2022-09-26).Mon, Sep 26, 16:00
I don't believe this is correct. Can ReleaseTaggerBot be taught about the wmf_deploy branch for CentralNotice?
Change 833757 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Convert configuration into class const