After creating a public share link, the button to copy the link does not appear, when password protection is on

Hello everyone,

Nextcloud version: 28.0.2
Operating system and version: Debian 11.8
Apache or nginx version: 2.4.57
PHP version: 8.1.27
Chrome 122.0.6261.58 / Firefox 123.0

The issue:

After creating a public share link, the button to copy the link does not appear.
The button appears only after refreshing the page.
The problem only occurs when password protection is administratively enforced.

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Enable “Enforce password protection” in Administration / Sharing configuration
  2. Create public share with “Share link”

The output of Nextcloud log in Admin > Logging:

NO ERRORS

The output of config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '********',
  'passwordsalt' => '********',
  'secret' => '********',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.local',
    1 => '192.168.0.100',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '28.0.2.5',
  'overwrite.cli.url' => 'https://nextcloud.local',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '********',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '********',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '********',
  'mail_smtpport' => '465',
  'mail_smtpname' => '********',
  'mail_smtppassword' => '********',
  'trashbin_retention_obligation' => 'auto, 30',
  'filelocking.enabled' => 'true',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => '********',
    'timeout' => 1.5,
  ),
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 1,
  'logtimezone' => 'Europe/Warsaw',
  'theme' => '',
  'default_phone_region' => 'PL',
  'enable_previews' => true,
  'simpleSignUpLink.shown' => false,
  'skeletondirectory' => '',
  'allow_local_remote_servers' => true,
  'maintenance' => false,
  'versions_retention_obligation' => 'auto, 60',
  'lost_password_link' => 'disabled',
  'auth.bruteforce.protection.enabled' => false,
  'app_install_overwrite' =>
  array (
    0 => 'issuetemplate',
  ),
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance_window_start' => 1,
);

The output of Apache/nginx/system log in /var/log/____:

N/A

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

NO ERRORS