{"action":"created","issue":{"url":"https://api.github.com/repos/haiwen/seahub/issues/661","labels_url":"https://api.github.com/repos/haiwen/seahub/issues/661/labels{/name}","comments_url":"https://api.github.com/repos/haiwen/seahub/issues/661/comments","events_url":"https://api.github.com/repos/haiwen/seahub/issues/661/events","html_url":"https://github.com/haiwen/seahub/issues/661","id":90415091,"number":661,"title":"500 Internal Server Error when creating private folder share","user":{"login":"DevCybran","id":706324,"avatar_url":"https://avatars.githubusercontent.com/u/706324?v=3","gravatar_id":"","url":"https://api.github.com/users/DevCybran","html_url":"https://github.com/DevCybran","followers_url":"https://api.github.com/users/DevCybran/followers","following_url":"https://api.github.com/users/DevCybran/following{/other_user}","gists_url":"https://api.github.com/users/DevCybran/gists{/gist_id}","starred_url":"https://api.github.com/users/DevCybran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevCybran/subscriptions","organizations_url":"https://api.github.com/users/DevCybran/orgs","repos_url":"https://api.github.com/users/DevCybran/repos","events_url":"https://api.github.com/users/DevCybran/events{/privacy}","received_events_url":"https://api.github.com/users/DevCybran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-23T15:13:06Z","updated_at":"2015-06-28T10:19:34Z","closed_at":null,"body":"Sharing a folder to a group or other user does not work for a particular folder. Seahub simply will never close the share overlay, but analyzing the HTTP response shows that actually a **500 Internal Server Error** is returned.\r\n\r\nThe folder to be shared is inside a non-encrypted, private library. A share link to the folder has been successfully created (possibly before a server update). The folder itself has the following path:\r\n*Bibliotheken / Meine Bibliotheken / Studium / TU_Dresden / 2015_2015_SS / Bachelor Informatik / C++ für Computergraphik / CPP4CG-Artefakte /*\r\nSharing the parent folder works without problems.\r\n\r\nThe following log entry can be found in seahub_django_request.log:\r\n```\r\n2015-06-23 22:58:33,741 [ERROR] django.request:210 handle_uncaught_exception Internal Server Error: /share/ajax/private-share-dir/\r\nTraceback (most recent call last):\r\n  File \"/media/datastore/seafile/haiwen/seafile-server-4.2.3/seahub/thirdpart/Django-1.5.12-py2.6.egg/django/core/handlers/base.py\", line 113, in get_response\r\n    response = callback(request, *callback_args, **callback_kwargs)\r\n  File \"/media/datastore/seafile/haiwen/seafile-server-4.2.3/seahub/seahub/auth/decorators.py\", line 69, in _wrapped_view\r\n    return view_func(request, *args, **kwargs)\r\n  File \"/media/datastore/seafile/haiwen/seafile-server-4.2.3/seahub/thirdpart/Django-1.5.12-py2.6.egg/django/views/decorators/http.py\", line 41, in inner\r\n    return func(request, *args, **kwargs)\r\n  File \"/media/datastore/seafile/haiwen/seafile-server-4.2.3/seahub/seahub/share/views.py\", line 1528, in ajax_private_share_dir\r\n    shared_repo_id = sub_repo.id\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n```\r\n\r\nReproduced using seafile server 4.2.1 and 4.2.3."},"comment":{"url":"https://api.github.com/repos/haiwen/seahub/issues/comments/116252199","html_url":"https://github.com/haiwen/seahub/issues/661#issuecomment-116252199","issue_url":"https://api.github.com/repos/haiwen/seahub/issues/661","id":116252199,"user":{"login":"DevCybran","id":706324,"avatar_url":"https://avatars.githubusercontent.com/u/706324?v=3","gravatar_id":"","url":"https://api.github.com/users/DevCybran","html_url":"https://github.com/DevCybran","followers_url":"https://api.github.com/users/DevCybran/followers","following_url":"https://api.github.com/users/DevCybran/following{/other_user}","gists_url":"https://api.github.com/users/DevCybran/gists{/gist_id}","starred_url":"https://api.github.com/users/DevCybran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevCybran/subscriptions","organizations_url":"https://api.github.com/users/DevCybran/orgs","repos_url":"https://api.github.com/users/DevCybran/repos","events_url":"https://api.github.com/users/DevCybran/events{/privacy}","received_events_url":"https://api.github.com/users/DevCybran/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T10:19:34Z","updated_at":"2015-06-28T10:19:34Z","body":"Update: Sharing works when renaming this specific folder.\r\n\r\nIt is very likely that the folder has been shared to other users before, the share has been revoked and the folder's internal state somehow became corrupted."}}