calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Calendar Cannot Be Deleted

Open okkine opened this issue 4 years ago • 6 comments

Steps to reproduce

  1. Unknown. I don't know how it happened in the first place

Expected behaviour

When I delete a calendar, it should be deleted from the database.

Actual behaviour

I recently imported my Google Calendar using the Google Integration app. Worked beautifully, except that it tried to import an external calendar that I’m subscribed to. Now that calendar is stuck in the list. It can't be deleted, can't be renamed, can’t even be repositioned. The calendar does not display anything.

I don’t get anything particularly interesting (I don’t think) in NextCloud logs, however when I try to delete it through DAVx5, the error below is given. It looks to me that the calendar name is that of the URL of the external calendar, and the "/" in the name is confusing the database. However, this is far from my area of expertise, so I could be way off.

Has anyone seen this before? Is there a solution that would allow me to delete this calendar for good?

Thanks.

Calendar app

Calendar app version: 2.1.3

CalDAV-clients used: DAVx5

Client configuration

Browser: Firefox, Chrome, Brave

Operating system: Windows, Android

Server configuration

Operating system: Ubuntu 14

Web server: Apache

Database: SQLite

PHP version: 7.2

Nextcloud Version: 20.0.7

Updated from an older installed version or fresh install: Updated

List of activated apps: Accessibility 1.6.0, Activity 2.13.4, Calendar 2.1.3, Collaborative tags 1.10.0, Contacts 3.4.3, Contacts Interaction 1.1.0, Dashboard 7.0.0, Deleted files 1.10.1, Federation 1.10.1, File sharing 1.12.2, First run wizard 2.9.0, Flow Upload 1.1.2, Log Reader 2.5.0, Mail 1.6.0, Monitoring 1.10.0, Nextcloud announcements 1.9.0, Notes 4.0.2, Notifications 2.8.0, Password policy 1.10.1, PDF viewer 2.0.1, Photos 1.2.3, Privacy 1.4.0, Recommendations 0.8.0, Right click 0.17.0, Share by mail 1.10.0, Support 1.3.0, Text 3.1.0, Theming 1.11.0, Update notification 1.10.0, Usage survey 1.8.0, User status 1.0.1 Versions 1.13.0, Video player 1.9.0, Weather status

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your instance's installation folder

Nextcloud configuration:

<?php
$CONFIG = array (
  'instanceid' => 'asdf'
  'passwordsalt' => 'asdf'
  'secret' => 'asdf'
  'trusted_domains' => 
  array (
    0 => 'my.domain.com',
  ),
  'datadirectory' => '/home/my_username/my.domain.com/data',
  'dbtype' => 'sqlite3',
  'version' => '20.0.7.1',
  'overwrite.cli.url' => 'http://my.domain.com',
  'installed' => true,
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'my.domain.com',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'asdf',
  'mail_smtpname' => 'asdf',
  'mail_smtppassword' => 'asdf',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpport' => '465',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 1,
);

Logs

Web server error log (e.g. /var/log/apache)

Don't have access

Log file (data/nextcloud.log)

[PHP] Error: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries at Unknown#0

at 2021-02-23T20:46:10+00:00

[no app in context] Info: Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used

GET /index.php/settings/ajax/checksetup
from 70.73.65.251 by asdfat 2021-02-23T20:45:58+00:00

[no app in context] Info: Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*wildcardListeners":[],"*listenerIndex":[],"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null

PROPFIND /remote.php/webdav
from 70.73.65.251 by at 2021-02-23T20:45:56+00:00









Browser log

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

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

DAVx5 Returned Error Code

HTTP REQUEST Request{method=DELETE, url=https://my.url.com/remote.php/dav/calendars/my_username/https://www.external_calendar_url.com/calendar/ical/private_info.ics%3f%private_info%20(Google%20Calendar%20import)/, headers=[Accept-Encoding:br,gzip]}

HTTP RESPONSE Response{protocol=h2, code=404, message=, url=https://my.url.com/remote.php/dav/calendars/my_username/https://www.external_calendar_url.com/calendar/ical/private_info.ics%3f%private_info%20(Google%20Calendar%20import)/} <?xml version="1.0" encoding="utf-8"?> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> <s:exception>Sabre\DAV\Exception\NotFound</s:exception> <s:message>Node with name 'https:' could not be found</s:message></d:error>

okkine avatar Feb 23 '21 20:02 okkine

cc @eneiluj

tcitworld avatar Feb 23 '21 21:02 tcitworld

Hi, I have exactly the same problem! And I have to remove a / in the name of the calendar.

LAfricain avatar Mar 27 '23 13:03 LAfricain

Hello,

Well, my turn now. We had the same problem today with a calendar imported from Google and had a / in the name.

I simply went in the Db, table oc_calendars and rename the calendar (without the /).

update oc_calendars set displayname = "<New name>", uri = "<New name>" where id = X;

At that point, the calendar loaded correctly in the cloud (not a wheel turning indefinitively) and I could delete it.

quenenni avatar Mar 27 '23 15:03 quenenni

@quenenni How would you go about doing that with Nextcloud AIO? Its running postgres inside a container.

cclarke591 avatar Jan 29 '24 03:01 cclarke591

@quenenni How would you go about doing that with Nextcloud AIO? Its running postgres inside a container.

nvm, I found this after some time googling. That, plus some quick PostgreSQL documentation scanning.

Some references for those in need: https://www.postgresql.org/docs/16/app-psql.html https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-delete/

Once inside the docker container for the db, oc_calendars is a table inside nextcloud_database. In my case I simply deleted the id # for the row of the troublesome calendar.

cclarke591 avatar Jan 29 '24 04:01 cclarke591

@miaulalala I think you got the wrong issue

tcitworld avatar Jan 30 '24 14:01 tcitworld

I don't know how it happened in the first place

The original issue should be fixed.

https://github.com/nextcloud/integration_google/issues/166

tcitworld avatar Mar 04 '24 12:03 tcitworld