Markdown documents containing internal links don't open when shared via sharing link

Nextcloud version (eg, 20.0.5): 22.2.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.21.4
PHP version (eg, 7.4): 8.0.12
Docker image: nextcloud:22.2.0-fpm

The issue you are facing:

I run a small Nextcloud instance for a research project and we’ve come across an issue with opening certain Markdown documents. Whenever a Markdown document is created with an internal link to another file on Nextcloud and then shared via sharing link, the sharing link will not open: it continually hangs on the loading screen and never opens.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Create a new text document called ‘test.md’.
  2. Write the word ‘file’ in that document, highlight it, and link to another file on Nextcloud.
  3. Create a sharing link for the test.md document and attempt to open it in another tab.

The output of your Nextcloud log in Admin > Logging:

Deprecated event type for OCA\Files_Sharing::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used

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

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' => 
  array (
    0 => 'REDACTED',
    1 => 'REDACTED',
    2 => 'REDACTED',
    3 => 'REDACTED',
    4 => 'REDACTED',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'REDACTED',
  'dbname' => 'nextcloud',
  'dbhost' => 'REDACTED',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'REDACTED',
  'mail_from_address' => 'REDACTED',
  'mail_domain' => 'REDACTED',
  'mail_smtpport' => '25',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'app_install_overwrite' => 
  array (
    0 => 'end_to_end_encryption',
    1 => 'tasks',
    2 => 'whiteboard',
  ),
  'updater.release.channel' => 'stable',
  'allow_local_remote_servers' => 'true',
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'default_phone_region' => 'GB',
);

I can reproduce it on Nextcloud 22 and Nextcloud 23.

Text A

Text B

Text A and Text B is shown

Text A

Link to File

Text B

Only Text A is shown.
Maybe someone can search and/or create issues.

2 Likes