Skip to content

Markdown “Link file” limitation #1668

Closed

Description

@pr3thib

Summary

When using the “Link file” feature while editing a .md file, the link being created is relative to the directory the .md file is in. When the .md file is in the root directory, all is working fine; i.e. a click on the resulting link actually opens the linked file. (In this special case, a relative path happens to be equivalent to an absolute path.)

However, when the .md file is elsewhere in the directory tree, the relative path is not recognized as such and the link fails. To make it work, we have to go back and “Update link” to include the full path.

Pierre Thibaudeau
QC Canada

P.S.
Just found out that clicking on such a link (created with the "Link file" feature in an .md file outside the root directory) results in the system generating a complete directory tree dump in a file names "download.zip".

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create a link using the "Link file" feature editing a .md file
  2. Click the resulting ling to open the corresponding file.

Expected behaviour

Clicking the resulting link should open the file regardless of the position of the .md file in the directory tree.

Actual behaviour

Only works if the .md file is in the root directory.

What happens is the link being created by the "Link file" feature is relative. In order to have the link work, we have to go back and manually "Update link" with a full path.

Server configuration

Ubuntu 20.04.1 LTS
Apache/2.4.41 (Ubuntu)
MySQL Ver 8.0.22-0
PHP 7.4.3
Nextcloud 20.0.4

Updated from an older Nextcloud/ownCloud or fresh install:
regularly upgraded starting with version 18.

Where did you install Nextcloud from:
nextcloud.com

Signing status:
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.6.0
  - analytics: 3.1.0
  - apporder: 0.11.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.1.2
  - circles: 0.20.6
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.4.2
  - contactsinteraction: 1.1.0
  - cookbook: 0.7.7
  - dashboard: 7.0.0
  - dav: 1.16.2
  - external: 3.7.1
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_markdown: 2.3.1
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.1
  - files_texteditor: 2.14.0
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - firstrunwizard: 2.9.0
  - forms: 2.0.4
  - groupfolders: 8.2.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - maps: 0.1.8
  - metadata: 0.12.0
  - nextcloud_announcements: 1.9.0
  - notes: 4.0.2
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - ocdownloader: 1.7.10
  - password_policy: 1.10.1
  - photos: 1.2.1
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - rainloop: 7.0.3
  - recommendations: 0.8.0
  - richdocuments: 3.7.11
  - richdocumentscode: 6.4.203
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - spreed: 10.0.4
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - tasks: 0.13.6
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - twofactor_u2f: 6.0.0
  - updatenotification: 1.10.0
  - user_ldap: 1.10.2
  - user_status: 1.0.1
  - video_converter: 0.1.5
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0

Nextcloud configuration:

Config report
<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxxxxxxxxx',
  ),
  'datadirectory' => '/var/www/.privé/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxxxxxxx',
  'dbpassword' => 'xxxxxxxxxxxx',
  'installed' => true,
  'default_language' => 'fr',
  'default_locale' => 'fr_CA',
  'mail_from_address' => 'xxxxxxxxxxxx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxxxxxxxx',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxxxxxxx',
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'xxxxxx',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => 'xxxxxxxxxxxxxxxxx',
  'mail_smtppassword' => 'xxxxxxxxxxx',
  'username-autocompletion' => false,
  'maintenance' => false,
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'htaccess.RewriteBase' => '/',
  'app_install_overwrite' => 
  array (
    0 => 'sharerenamer',
  ),
  'overwrite.cli.url' => 'https://nuage.mb-pt.ca',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'defaultapp' => 'apporder',
);

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

Client configuration

Browser:
Firefox 84.0 -- Google Chrome 83.0
Operating system:
Ubuntu 20.04.1

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Activity

  1. transferred this issue fromnextcloud/serveron Jun 18, 2021
  2. added
    bug
    on Mar 4, 2022
  3. SimonXIX commented on Mar 8, 2022

    @SimonXIX

    This seems to describe the same issue I've described here for further information: https://help.nextcloud.com/t/markdown-documents-containing-internal-links-dont-open-when-shared-via-sharing-link/134938

  4. vinicius73 commented on May 6, 2022

    @vinicius73
    Member

    Closing for now.
    Looks like this is already fixed in recent releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions