#979319 invalid link rel="canonical" on bugs.debian.org

#979319#5
Date:
2021-01-05 09:46:09 UTC
From:
To:
HTML pages with bug reports on bugs.debian.org have incorrect href
attribute for the <link rel="canonical"> element. Try e.g.

     curl -s 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890338'
| grep '^<link rel="canonical"'

Actual result:

    <link rel="canonical" href="<a
href="bugreport.cgi?bug=890338">890338</a>">

Expected result:

    <link rel="canonical"
href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890338">

or

     <link rel="canonical" href="https://bugs.debian.org/890338">


Sorry, I could not find version of package "debbugs" installed on
https://bugs.debian.org That is why I am unsure if the bug should be
submitted against the debbugs package.

My knowledge of perl is not enough to tell if the following commit fixed
this issue or some earlier one:

e47d145410 Don Armstrong 2018-08-20 03:31:42
mousify bugreport and short status templates

Another flavor of rel="canonical" issue is:

#926672 debbugs: 'bug' parameter is undefined for canonical URIs
#908038 Program fragment delivered error: <link rel="canonical"
href="..."> (Perl error in public HTML page)

The story maybe started from:

#890338 bugs.debian.org: Please add dd rel="canonical" links to bug pages

#979319#12
Date:
2026-04-05 08:10:48 UTC
From:
To:
I have realized that <link rel="canonical" ...> HTML tags are properly
formatted on bugs-devel.debian.org. So fixing bugs.debian.org is matter
of releasing next debbugs version or backporting the fix to the 2.6
branch and deploying the new version.

I've found an earlier commit that added `links_only` argument inside the
template:

<link rel="canonical" href="<: bug_links(bug=>$bug_num,links_only=>1) :>">

<https://salsa.debian.org/debbugs-team/debbugs/-/commit/377afb9d91>
canonical should just have the link
2018-03-09T18:17:24Z Don Armstrong

So the bug was fixed on master 8 years ago.

A duplicate of this bug has been reported saying that broken href
attribute causes issues with sharing links to bug reports in social media:
<https://bugs.debian.org/1042014>
Tue, 25 Jul 2023 18:39:02 UTC

#979319#17
Date:
2026-04-08 15:50:59 UTC
From:
To:
Thanks a lot for this precision.
I will fix the Debian package. Hopefully Don will fix the website.

Cheers,

#979319#22
Date:
2026-04-28 07:49:42 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
debbugs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 979319@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bill Allombert <ballombe@debian.org> (supplier of updated debbugs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 27 Apr 2026 22:05:07 +0200
Source: debbugs
Architecture: source
Version: 2.6.5
Distribution: unstable
Urgency: medium
Maintainer: Debbugs developers <debian-debbugs@lists.debian.org>
Changed-By: Bill Allombert <ballombe@debian.org>
Closes: 815198 979319
Changes:
 debbugs (2.6.5) unstable; urgency=medium
 .
   [ Colin Watson ]
   * scripts/process: import missing handle_escaped_commas
   * bugreport.tmpl: fix typo uselessmesages -> uselessmessages
   * pkgreport_options.tmpl: Add labels for pkgreport "Misc options"
 .
   [ Don Armstrong ]
   * New config option $gCcAllmailsToAddr
   * Debbugs/CGI/Pkgreport.pm: generate_package_info:
     - use package_tracking_domain instead of subscription_domain
   * Support X-Debbugs-Cc inside pseudo-headers
   * cgi/version.cgi:
     - Output useful messages when there is an empty version graph
     - Load the source package versions as well as the binary package
   * Debbugs/Status.pm: Suppress malformed UTF-8 warnings when reading status
   * bugreport.tmpl: Fix link rel="canonical" (closes: #979319)
 .
   [ Bill Allombert ]
   * debian/control: Update Standards-Version to 4.7.4
 .
   [ Mike Gabriel ]
   * script/bug2mbox: retrieve mbox associated to bug number locally
     (closes: #815198)
Checksums-Sha1:
 68a2ce3cbc47eeb3713fda671dd7c1dd141d6868 2397 debbugs_2.6.5.dsc
 0d292cf38a1241106e3e92c014814438f6fd416d 256196 debbugs_2.6.5.tar.xz
 74f7256876dd61c640c8399b84d50e4e21aa71c1 5798 debbugs_2.6.5_source.buildinfo
Checksums-Sha256:
 e9f190a0cf51ddfe2af6fc05dd7ea1399a9883963bffc37529598a32a0d08901 2397 debbugs_2.6.5.dsc
 1cc9f13118917cadfdb6d286d257632d125df554bcff9b68489aa5335f61cd5c 256196 debbugs_2.6.5.tar.xz
 08738b704cfd235835e48e0f61a578eae1132918fc9fb6ea0f3354b3346638ce 5798 debbugs_2.6.5_source.buildinfo
Files:
 af3845bdde17a70e93788796e26bf5f3 2397 misc optional debbugs_2.6.5.dsc
 7e2f3ab6f9e90a048c80090a059a5acf 256196 misc optional debbugs_2.6.5.tar.xz
 dbb52bebd797b67eb6b4f69cd750048b 5798 misc optional debbugs_2.6.5_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQgKOpASi6dgKxFMUjw58K0Ui44cFAmnwZGMACgkQjw58K0Ui
44c2JRAAjeIJSKoHM0R/aIf1uxPcGGOTcOW9Z+Xqm8puWqemQoc81raVHbrHuwSb
AyYPTpZfT4i/B35gUTv9Sg9/kJJI2r2qdGqtG/cZS5ERLTol0n7xYb6Uzbg7JPHz
mD4NVar0ANMUTRZMRTxXqi3XXMz2n8WJbNQiWQwx7ZrtDKWGMMjjxtfmgnXHchzL
zHAmnPQ+Tat2+2YW+ZxLxtMnmMM8kzXdH9NMRyLGQQcdfM+OoFUL7zBKUDxL6r2F
Nno7WcWhgQ44sIMOMDVoTHod6Ld/56AWVvGfpc81KnwQ1mkABjZqt8KdggvOnXKW
RiPlIPddd4Z4Zb6zPnSepcZasvLOh5wTOs7MbzBJiMtsxsBfcIDqy6Yy+LrzH0uh
mskFvV2OWpsnVHwXcYgjinBm/q3eanyETlKvMOtRBKR5621BOaOpx5QYWa3L1KBi
EVuvyiQOPl3ESnL436ByFtRUbU8BcHGTCWYnkwC9u6/rQblh5OhdgWzOYmKRwWYL
RKuDD/Ub7w6+y2T9EczBqjPRsm4OJB4vwT/25yBeLxMSwjdp+lxtreKQBVkhrk8W
04Y6oKSmsWnAYl7wDTjWSBGg7knoyAiDDqEC+q3Yu9tW3vpYQq7iZiu4GA4ci6Xp
3e2FilpAMJqtGD+39vW0QulPk+Xl4RIaWP8UZVu9JVFioEC7hLE=
=/W4Q
-----END PGP SIGNATURE-----

#979319#27
Date:
2026-04-28 08:20:07 UTC
From:
To:
reopen 979319
quit

Hello Maxim,

I fixed this bug in the Debian package, however I reopen this bug to give a
chance to Don to fix this bug in the Debian branch, which I promised not to
touch.

The commit to backport is fcc41de94df6291873af8a186a0a94273a685af3.

Cheers,