Page MenuHomePhabricator

Update outdated information in top banner on static-bugzilla subpages?
Closed, ResolvedPublic

Description

I might be overcautious, but seeing that content of static-bugzilla gets indexed by search engines, the current top banner on subpages (e.g. here) might be confusing and contradictive (as you cannot log in anymore, you cannot access your votes or saved searches) for somebody directly ending up on a subpage of static-bugzilla who has not seen the frontpage.

Only if it's not a PITA to mass-change a line in each HTML file (if it is, please decline):

The banner on each page currently says

Wikimedia has <a href="https://www.mediawiki.org/wiki/Phabricator/versus_Bugzilla">migrated from Bugzilla to Phabricator</a>. Bug reports should be created and updated in <a href="https://phabricator.wikimedia.org">Wikimedia Phabricator</a> instead. Please <a href="https://www.mediawiki.org/wiki/Phabricator/Help#Creating_your_account">create an account in Phabricator and add your Bugzilla email address</a> to it.<br>Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.<br>In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.<br>You could still run searches in Bugzilla or access your <a href="https://old-bugzilla.wikimedia.org/page.cgi?id=voting%2Fuser.html">list of votes</a> but bug reports will obviously not be up-to-date in Bugzilla.

and could instead say

Wikimedia <a href="https://www.mediawiki.org/wiki/Phabricator/versus_Bugzilla">migrated from Bugzilla to Phabricator</a>. Bug reports are handled in <a href="https://www.mediawiki.org/wiki/Phabricator/Help">Wikimedia Phabricator</a>.<br>This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See the <a href="https://www.mediawiki.org/wiki/Phabricator/Help#Finding_the_Maniphest_task_corresponding_to_a_Bugzilla_bug_number">corresponding Phabricator task</a> for complete and up-to-date bug report information.

Event Timeline

Aklapper raised the priority of this task from to Lowest.
Aklapper updated the task description. (Show Details)
Aklapper added a project: Wikimedia-Bugzilla.
Aklapper added subscribers: Aklapper, Dzahn, JohnLewis.

Likely not worth the hassle, thus proposing to decline:
Since T281538 and per https://wikitech.wikimedia.org/wiki/Microsites , content is now in operations/container/miscweb under the dir html/static-bugzilla. Thus resolving this ticket would require extracting 73681 .gz files, removing the line from each HTML file, and compressing again.

If this is the only work needing to be done, we can write a simple python script to do so.

tar xzfv static-bugzilla.gz
cd static-bugzlla
..
#!/bin/bash
# fix for tasks:
# https://phabricator.wikimedia.org/T101522
# https://phabricator.wikimedia.org/T75839

bugfile=$(echo $(basename "$1"))
echo "editing $bugfile"
bz_bug_number=$(echo $(basename "$1") | sed 's/bug//g' | cut -d. -f1)
ph_bug_number=$(expr $bz_bug_number + 2000)
echo "bug: $bz_bug_number"
echo "task: $ph_bug_number"

sed -i "s/<h1>Wikimedia Bugzilla is closed!<\/h1><div id=\"message\" style=\"text-align: center; color: black\">Wikimedia has <a href=\"https:\/\/www.mediawiki.org\/wiki\/Phabricator\/versus_Bugzilla\">migrated from Bugzilla to Phabricator<\/a>. Bug reports should be created and updated in <a href=\"https:\/\/phabricator.wikimedia.org\">Wikimedia Phabricator<\/a> instead. Please <a href=\"https:\/\/www.mediawiki.org\/wiki\/Phabricator\/Help#Creating_your_account\">create an account in Phabricator and add your Bugzilla email address<\/a> to it.<br>Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.<br>In order to access the Phabricator task corresponding to a Bugzilla report, just remove \"static-\" from its URL.<br>You could still run searches in Bugzilla or access your <a href=\"https:\/\/old-bugzilla.wikimedia.org\/page.cgi?id=voting%2Fuser.html\">list of votes<\/a> but bug reports will obviously not be up-to-date in Bugzilla.<\/div>/<h1>Wikimedia Bugzilla is closed!<\/h1><div id=\"message\" style=\"text-align: center; color: black\">Wikimedia <a href=\"https:\/\/www.mediawiki.org\/wiki\/Phabricator\/versus_Bugzilla\">migrated from Bugzilla to Phabricator<\/a>. Bug reports are handled in <a href=\"https:\/\/www.mediawiki.org\/wiki\/Phabricator\/Help\">Wikimedia Phabricator<\/a>.<br>This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See <a href=\"https:\/\/phabricator.wikimedia.org\/T${ph_bug_number}\">T${ph_bug_number}<\/a>, the <a href=\"https:\/\/www.mediawiki.org\/wiki\/Phabricator\/Help#Finding_the_Maniphest_task_corresponding_to_a_Bugzilla_bug_number\">corresponding Phabricator task<\/a> for complete and up-to-date bug report information./g" $bugfile
for bugfile in $(ls bug*.html); do ./script.sh $bugfile; done
..

and then the same but for activities instead of bugs.

Doing all at once = "argument list too long" and needs different sed pattern.

for bugfile in $(ls activity*.html); do ./script.sh $bugfile; done
..
..
bz_bug_number=$(echo $(basename "$1") | sed 's/activity//g' | cut -d. -f1)
..

Also fixing "Back to bug"-links from activity*.html files back to bug*.html files.

They still linked to show_bug.cgi?id= which is of course broken in the static version.

sed -i "s/href=\"show_bug.cgi?id=${bz_bug_number}\">Back to bug ${bz_bug_number}<\/a>/href=\"bug${bz_bug_number}.html\">Back to bug ${bz_bug_number}<\/a>/g" $bugfile

Change 1012731 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/deployment-charts@master] bump version of static bugzilla image to 2024-03-19-172702

https://gerrit.wikimedia.org/r/1012731

Change 1012731 merged by jenkins-bot:

[operations/deployment-charts@master] bump version of static bugzilla image to 2024-03-19-172702

https://gerrit.wikimedia.org/r/1012731

This is done!

Text has been replaced as suggested on all the bug* and activity* pages.

Additionally added the links to Phabricator tickets (T75839)

And fixed links from activity* to bug* pages.