Issue Task Resolved

#111078Show the QR code button disabled without a URL

Benjamin Kott 10/15/26, 11:29 updated 10/15/26, 15:20

Description

Problem

The two buttons for the frontend page in the document header behave differently without a URL:

  • ComponentFactory::createViewButton() without preview attributes returns the “View webpage” button disabled.
  • ComponentFactory::createQrCodeButton() with an empty URL returns an enabled button that opens a modal with nothing to encode.

A module that shows both buttons has to leave the QR code button out or disable it by hand.

Proposal

createQrCodeButton() renders the button disabled for an empty URL, as createViewButton() does without preview attributes. The signature stays as it is.

This builds on #111075, which gives GenericButton and the pseudo button elements their disabled state.

Use case

The preview module shows its document header also without a preview (no page selected, a folder, no site), with the view button and the QR code button disabled alike.

Reviews 2

History 16

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-15T15:20:15+00:00" > 10/15/26, 15:20 </span>

    Applied in changeset commit:2b122a7e52420c92deec9cf91076aa374aeee403.