calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Sharing of calendar doesn't work with owncloud 10.0.3.3 and calendar app 1.5.4

Open uwe347 opened this issue 7 years ago • 42 comments

Steps to reproduce

  1. owncloud is set up from 9.x via 9.1.5.2 to 10.0.0 to 10.0.3.3 (it worked already but now sharing has disappeared)
  2. opening calendar of any user and click on "sharing"-icon
  3. enter name of any other user and/or pick one from the list of existing users

Expected behaviour

The checkmark-fields (those to allow modify and share) should appear after selecting one of the valid usernames from the list. I looked after the changes written in this commit: https://github.com/owncloud/core/commit/dcb92b84cf53d10b2d4be3109fad1a002be18225 All changes in those four files shown there are implemented (as part of 10.0.3.3 an calendar 1.5.4, I guess).

Actual behaviour

no reaction after selecting a valid username, no access to the shared calendar for the other user.

Server configuration

I'm using calendar app 1.5.4 on owncloud version 10.0.3.3 on ubuntu 16.04LTS with Apache/2.4.18, mysql, PHP version 7.0.22-0ubuntu0.16.04.1 owncloud is set up from 9.x via 9.1.5.2 to 10.0.0 to 10.0.3.3 (I don't know the exact version steps on that route any more)

Login as admin user into your cloud and access http://example.com/index.php/settings/integrity/failed paste the results here: No errors have been found.

List of activated apps: output of 'sudo -u www-data ./occ app:list' Enabled:

  • activity: 2.3.6
  • announcementcenter: 1.2.0
  • calendar: 1.5.4
  • comments: 0.3.0
  • configreport: 0.1.1
  • contacts: 1.5.3
  • dav: 0.3.0
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_pdfviewer: 0.8.2
  • files_sharing: 0.10.1
  • files_texteditor: 2.2.1
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.0.2
  • market: 0.2.3
  • notifications: 0.3.1
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1 Disabled:
  • encryption
  • external
  • files_antivirus
  • theme-example
  • user_external

ownCloud configuration report from admin page: config_report_20171117.json.txt

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

Are you using encryption: yes/no no

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

Client configuration

Browser: Firefox Quantum 57.0 (64-Bit) Operating system: xubuntu 16.04LTS

CalDAV-clients: android CalDAVsync by Marten Gaida

uwe347 avatar Nov 17 '17 17:11 uwe347

@Julian1998 can you please have a look? THX

DeepDiver1975 avatar Nov 17 '17 18:11 DeepDiver1975

Please test this fix - very likely the same issue - https://github.com/owncloud/calendar/pull/839 THX

DeepDiver1975 avatar Dec 21 '17 10:12 DeepDiver1975

Sorry for being only a user with no programming skills... I don't find the place where to apply the fix. This page shows the line which has to be changed in the file named "js/app/controllers/calendarlistcontroller.js", but I can't find any file with this name in my owncloud installation. ('find owncloud -name calendarlistcontroller.js' shows nothing). By searching for the string "scope.updateExistingUserShare = function" I discovered, that similar lines (as mentioned in the commit #839) can be found in the file apps/calendar/js/public/app.js line 617. So I changed this line to $scope.updateExistingUserShare = function (calendar, userId, displayname, writable) { but this doesn't help: The problem is still there. So I think I need help how to apply this fix...

uwe347 avatar Jan 06 '18 07:01 uwe347

You Applied the patch correctly. Please reshare the calendar and it should work.

DeepDiver1975 avatar Jan 06 '18 09:01 DeepDiver1975

This doesn't work in my case, OC 9.1.7 and calender 1.5.4 with Patch #839

localguru avatar Feb 04 '18 21:02 localguru

@DeepDiver1975: Sorry for answering that late. It still doesn't work. I am not shure, what you mean with "reshare the calendar", because the problem I described occures during the step of sharing. As I described, the checkmark-fields to allow modify and share do not appear after selecting one of the valid usernames from the list. There is only one checkmark-field for "share link" (which makes the calendar open for any user, not only for those with an account).

uwe347 avatar Feb 05 '18 20:02 uwe347

@uwe347 check #823 and there the post from @Ricardo665 . This works for me. But as soon as you try to share share a calendar and type in the user name into the search field the logfile comes up with

Error | OCP\Share | Sharing backend for principals not found

The strange thing with this bug is, that old shared calendars, which did exist before upgrading to 9.1.7, work without problems. New calendars can't be shared.

localguru avatar Feb 05 '18 20:02 localguru

Using the latest stable 10.7, I too cannot share new calendars (while the old ones works correctly).

However I do not see any Sharing backend for <> not found error in the owncloud.log file, and when I type a user or group name in the share field, nothing happens, no selection is displayed at all.

This is annoying and it's happening for quite some time now (I though upgrading from 9 to 10 would solves this, it did not)!

AlexandreBonneau avatar Apr 13 '18 22:04 AlexandreBonneau

Strange observations .... Can I See some Screenshots pleased. Maybe this helps to resolve the Situation

DeepDiver1975 avatar Apr 14 '18 08:04 DeepDiver1975

The screenshot: 2018-04-13 bug owncloud calendar

You can see there that while I'm typing the start of a group name, no menu is shown, and that one of the older calendar is correctly shared.

AlexandreBonneau avatar Apr 14 '18 09:04 AlexandreBonneau

Any error in the browser console?

DeepDiver1975 avatar Apr 15 '18 19:04 DeepDiver1975

Yes there are. I see that on each keystroke a GET request is sent to the server, and I then get the following error message:

TypeError: result.ocs.data.exact is undefined

I tried pasting the url from the GET request in a separate tab and I get:

The url:

https://example.com/owncloud/ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=Sec&perPage=200&itemType=principals

The result:

{
  "ocs": {
    "meta": {
      "status": "failure",
      "statuscode": 999,
      "message": "Invalid query, please check the syntax. API specifications are here: http:\/\/www.freedesktop.org\/wiki\/Specifications\/open-collaboration-services. DEBUG OUTPUT:\n"
    },
    "data": []
  }
}

AlexandreBonneau avatar Apr 16 '18 18:04 AlexandreBonneau

This is a great finding! THX

What are the exact versions of owncloud server (have a look at version.php) and the calendar app (apps/calendar/appinfo/info.xml)

THX

DeepDiver1975 avatar Apr 16 '18 19:04 DeepDiver1975

The version:

$OC_Version = array(10,0,7,2);
$OC_VersionString = '10.0.7';
$OC_Build = '2018-02-19T16:29:54+00:00 90535c97bad0d5455e92d1190012fb856cf7e8b0';

The calendar one:

<?xml version="1.0"?>
<info>
        <id>calendar</id>
        <name>Calendar</name>
        <version>1.4.2</version>
        <licence>AGPL</licence>
        <author>Georg Ehrke, Raghu Nayyar, Bernhard Fröhler</author>
        <dependencies>
                <owncloud min-version="9.0" max-version="10.0" />
        </dependencies>
        <description>Calendar GUI for the server-integrated CalDAV server</description>
        <documentation>
                <user>http://doc.owncloud.org/server/9.0/user_manual/pim/calendar.html</user>
        </documentation>
        <category>productivity</category>
        <screenshot>https://raw.githubusercontent.com/owncloud/screenshots/9d7c40b3f9694f4fabca464870524b9b962c8705/calendar/screenshot.png</screenshot>
        <website>https://github.com/owncloud/calendar/</website>
        <bugs>https://github.com/owncloud/calendar/issues</bugs>
        <repository type="git">https://github.com/owncloud/calendar.git</repository>
        <ocsid>168707</ocsid>
</info>
~            

AlexandreBonneau avatar Apr 16 '18 19:04 AlexandreBonneau

1.4.2

please upgrade - meanwhile there is 1.5.6 available

DeepDiver1975 avatar Apr 16 '18 19:04 DeepDiver1975

I just ran:

sudo -u www-data ./occ market:upgrade

and now the server is not responding.

If I run

sudo -u www-data ./occ market:list

I get the error message: No marketplace connection: Client error response [url] https://marketplace.owncloud.com/api/v0/api/v1/platform/10.0.7/apps.json [status code] 404 [reason phrase] Not Found

AlexandreBonneau avatar Apr 16 '18 19:04 AlexandreBonneau

https://marketplace.owncloud.com/api/v0/api/v1/

this url is wrong - please have a look at your config.php

there is a setting appstore.url of similar - just remove the whole line and run the upgrade command again

DeepDiver1975 avatar Apr 16 '18 19:04 DeepDiver1975

Ok I removed the buggy line from config.php, ran sudo -u www-data ./occ market:list and it listed all the available apps correctly.

Now, when I run sudo -u www-data ./occ market:upgrade is see no output and it get back to the command prompt.

When I check again apps/calendar/appinfo/info.xml, I see that it did not get updated and is still at the v1.4.2. The permissions on the apps directory are correct.

(Is there an owncloud chat somewhere (irc/gitter/discord/slack) we could use? This would I think be more suited than here)

AlexandreBonneau avatar Apr 16 '18 20:04 AlexandreBonneau

I specified the names of the apps I wanted to upgrade, and it did the trick:

sudo -u www-data ./occ market:upgrade calendar

Now the website is running correctly again so far.

Shouldn't sudo -u www-data ./occ market:upgrade upgrade all the installed app automatically?

AlexandreBonneau avatar Apr 16 '18 20:04 AlexandreBonneau

With the latest calendar version 1.5.7, I do not see the text field when clicking on the share icon, only the checkbox to share with the public:

2018-04-16 bug owncloud calendar 2

AlexandreBonneau avatar Apr 16 '18 20:04 AlexandreBonneau

Shouldn't sudo -u www-data ./occ market:upgrade upgrade all the installed app automatically?

with the option --all it does.

DeepDiver1975 avatar Apr 17 '18 07:04 DeepDiver1975

With the latest calendar version 1.5.7, I do not see the text field when clicking on the share icon, only the checkbox to share with the public:

can you please check again for errors in the browser console? also try with a different language - e.g. English - just to rule out that a potential wrong translation is making trouble.

furthermore: are you trying to re-share an already with you shared calendar?

DeepDiver1975 avatar Apr 17 '18 07:04 DeepDiver1975

No errors are shown in the console when I click the 'share' icon, nor any network requests (which I checked are shown if I click the 'Share link' checkbox).

I will not try to re-share an already shared calendar, since it could just break the share permanently and I cannot afford that.

I've switched to 'English', and nothing more happens.

with the option --all it does.

Perhaps using no arguments are at all could either do the same thing as --all, or display a 'usage message' because right now it does nothing.

AlexandreBonneau avatar Apr 17 '18 08:04 AlexandreBonneau

I will not try to re-share an already shared calendar, since it could just break the share permanently and I cannot afford that.

Maybe I was not explicit enough. Sorry.

I can reproduce your behavior when I try to share a calendar which was previously shared with me. Looks like re-sharing is no supported. I need to have a closer look.

DeepDiver1975 avatar Apr 17 '18 10:04 DeepDiver1975

Perhaps using no arguments are at all could either do the same thing as --all, or display a 'usage message' because right now it does nothing.

screenshot from 2018-04-17 12-32-11

DeepDiver1975 avatar Apr 17 '18 10:04 DeepDiver1975

Well, on my end calling that command does nothing and just returns:

# sudo -u www-data ./occ market:upgrade                                         
#

But I guess that's another issue!

AlexandreBonneau avatar Apr 17 '18 18:04 AlexandreBonneau

I can reproduce your behavior when I try to share a calendar which was previously shared with me. Looks like re-sharing is no supported. I need to have a closer look.

For info those calendars I cannot share are freshly created ones; I never shared them before.

AlexandreBonneau avatar Apr 17 '18 18:04 AlexandreBonneau

Did you by accident disable sharing in the admin settings? screenshot from 2018-04-18 08-52-07

DeepDiver1975 avatar Apr 18 '18 06:04 DeepDiver1975

The share option is enabled. To be sure I toggled it few days ago, with no effect

Le April 18, 2018 6:52:44 AM UTC, "Thomas Müller" [email protected] a écrit :

Did you by accident disable sharing in the admin settings? screenshot from 2018-04-18
08-52-07

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/owncloud/calendar/issues/828#issuecomment-382281968

AlexandreBonneau avatar Apr 18 '18 22:04 AlexandreBonneau

Still the same with owncloud 10.0.8.5 and calendar 1.5.7. I switched sharing option off and on again, as AlexandreBonneau did. Here are two screenshots of what happens: At first I type in the name of the user I want to share with. The user is found, so the name comes up after typing the first few characters: calendar_sharing_1 After clicking on the user's name, the field disappears. My entry stays in the input box, but no sharing is done. RETURN key doesn't help. calendar_sharing_2

uwe347 avatar May 02 '18 04:05 uwe347