Opening Calendar Link In Email Fails With URL Not Found

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 28.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.1.2-1ubuntu2.14

The issue you are facing:
Sending a link to a shared calendar via email succeeds. However, when clicked the link in the email results in this error:

 # Not Found

 The requested URL was not found on this server.

 Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

The problem is with the URL that is provided in the email. It looks like this:

 https://the.nextcloud.server/nextcloud/index.php/apps/calendar/p/4faHr3BtRYwyF8cL

However, Nextcloud resides in /var/www/html/nextcloud. The link is appending an extraneous “nextcloud” in the URL. Removing it so that the URL reads as follows works:

 https://the.nextcloud.server/index.php/apps/calendar/p/4faHr3BtRYwyF8cL

So the question arises: Can the Calendar app configuration be changed to prevent this erroneous link? Or will a bug need to be filed to get the code changed to correctly check where Nextcloud is installed and format the URL correctly?

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

Steps to replicate it:

  1. Create new calendar.
  2. Edit the new caledar.
  3. Click the + to enable Share Link.
  4. Click … and select “Send link to caledar via e-mail”.
  5. Enter an email address.
  6. When email is received, user click the link to open the calendar.
  7. Web browser opens and error is displayed.

The output of your Nextcloud log in Admin > Logging:

Nothing related to this error is seen.

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

 'instanceid' => 'och9s5ww3868',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' =>
  array (
    0 => 'REDACTED',
    1 => 'REDACTED',
  ),
  'datadirectory' => '/mnt/nextcloud-storage',
  'dbtype' => 'mysql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'http://REDACTED/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'defaultapp' => 'files',
  'allow_user_to_change_display_name' => false,
  'appstoreenabled' => true,
  'profile.enabled' => false,
  'auth.webauthn.enabled' => false,
  'default_phone_region' => 'US',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance_window_start' => 2,
  'lost_password_link' => 'disabled',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'pipe',
  'mail_from_address' => 'REDACTED',
  'mail_domain' => 'REDACTED,
  'mail_smtphost' => 'REDACTED',
  'mail_smtpport' => '25',
  'mail_smtpstreamoptions' =>
  array (
    'ssl' =>
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'REDACTED',
  'mail_smtppassword' => 'REDACTED',

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

Nothing related to this error is seen.

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.

Nothing related to this error is seen.