{"action":"created","issue":{"url":"https://api.github.com/repos/divio/django-cms/issues/6198","repository_url":"https://api.github.com/repos/divio/django-cms","labels_url":"https://api.github.com/repos/divio/django-cms/issues/6198/labels{/name}","comments_url":"https://api.github.com/repos/divio/django-cms/issues/6198/comments","events_url":"https://api.github.com/repos/divio/django-cms/issues/6198/events","html_url":"https://github.com/divio/django-cms/issues/6198","id":283150785,"number":6198,"title":"'NoneType' object has no attribute '_inc_path'","user":{"login":"TheDeadOne","id":5821459,"avatar_url":"https://avatars0.githubusercontent.com/u/5821459?v=4","gravatar_id":"","url":"https://api.github.com/users/TheDeadOne","html_url":"https://github.com/TheDeadOne","followers_url":"https://api.github.com/users/TheDeadOne/followers","following_url":"https://api.github.com/users/TheDeadOne/following{/other_user}","gists_url":"https://api.github.com/users/TheDeadOne/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDeadOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDeadOne/subscriptions","organizations_url":"https://api.github.com/users/TheDeadOne/orgs","repos_url":"https://api.github.com/users/TheDeadOne/repos","events_url":"https://api.github.com/users/TheDeadOne/events{/privacy}","received_events_url":"https://api.github.com/users/TheDeadOne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-19T09:05:55Z","updated_at":"2018-05-09T13:32:49Z","closed_at":"2017-12-19T11:59:51Z","author_association":"NONE","body":"### Summary\r\n\r\nI have this plugin-tree\r\n\r\n![plugin-tree](https://user-images.githubusercontent.com/5821459/34148641-194d9da0-e4dd-11e7-8386-5531f0c163fc.png)\r\n\r\nAfter deleting FilerImagePlugin (pointed by red arrow on screenshot) I can't add a new one because of error\r\n\r\n```\r\nTraceback:  \r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py\" in inner\r\n  42.             response = get_response(request)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in _legacy_get_response\r\n  249.             response = self._get_response(request)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in _get_response\r\n  187.                 response = self.process_exception_by_middleware(e, request)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in _get_response\r\n  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/utils/decorators.py\" in _wrapped_view\r\n  149.                     response = view_func(request, *args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/views/decorators/cache.py\" in _wrapped_view_func\r\n  57.         response = view_func(request, *args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/contrib/admin/sites.py\" in inner\r\n  211.             return view(request, *args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/views/decorators/clickjacking.py\" in wrapped_view\r\n  39.         resp = view_func(*args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/cms/admin/placeholderadmin.py\" in add_plugin\r\n  367.         response = plugin_instance.add_view(request)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/contrib/admin/options.py\" in add_view\r\n  1509.         return self.changeform_view(request, None, form_url, extra_context)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/utils/decorators.py\" in _wrapper\r\n  67.             return bound_func(*args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/utils/decorators.py\" in _wrapped_view\r\n  149.                     response = view_func(request, *args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/utils/decorators.py\" in bound_func\r\n  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/utils/decorators.py\" in inner\r\n  185.                     return func(*args, **kwargs)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/contrib/admin/options.py\" in changeform_view\r\n  1449.                 self.save_model(request, new_object, form, not add)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/cms/plugin_base.py\" in save_model\r\n  303.         return super(CMSPluginBase, self).save_model(request, obj, form, change)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/django/contrib/admin/options.py\" in save_model\r\n  1007.         obj.save()\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/cms/models/pluginmodel.py\" in save\r\n  333.                 self.parent.add_child(instance=self)\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/treebeard/mp_tree.py\" in add_child\r\n  1013.         return MP_AddChildHandler(self, **kwargs).process()\r\n\r\nFile \"/var/www/thedeadone/evrysoft/env/local/lib/python2.7/site-packages/treebeard/mp_tree.py\" in process\r\n  387.             newobj.path = self.node.get_last_child()._inc_path()\r\n\r\nException Type: AttributeError at /admin/cms/page/add-plugin/\r\nException Value: 'NoneType' object has no attribute '_inc_path'\r\n```\r\n\r\nTop-level plugin is simple wrapper\r\n\r\n```\r\nclass BannerHolder(CMSPluginBase):\r\n    model = CMSPlugin\r\n    module = u'Главная страница'\r\n    name = u'Строка для банера'\r\n    render_template = \"plugins/banner.html\"\r\n    allow_children = True\r\n    child_classes = ['FilerImagePlugin']\r\n```\r\n\r\nCommand `python manage.py cms fix-tree` helps until next plugin deletion. It seems similar to issue #4102\r\n\r\n### Environment\r\n\r\n* Python version: 2.7.14\r\n* Django version: 1.11.8\r\n* django CMS version: 3.4.5\r\n"},"comment":{"url":"https://api.github.com/repos/divio/django-cms/issues/comments/387739631","html_url":"https://github.com/divio/django-cms/issues/6198#issuecomment-387739631","issue_url":"https://api.github.com/repos/divio/django-cms/issues/6198","id":387739631,"user":{"login":"vstoykov","id":902381,"avatar_url":"https://avatars0.githubusercontent.com/u/902381?v=4","gravatar_id":"","url":"https://api.github.com/users/vstoykov","html_url":"https://github.com/vstoykov","followers_url":"https://api.github.com/users/vstoykov/followers","following_url":"https://api.github.com/users/vstoykov/following{/other_user}","gists_url":"https://api.github.com/users/vstoykov/gists{/gist_id}","starred_url":"https://api.github.com/users/vstoykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstoykov/subscriptions","organizations_url":"https://api.github.com/users/vstoykov/orgs","repos_url":"https://api.github.com/users/vstoykov/repos","events_url":"https://api.github.com/users/vstoykov/events{/privacy}","received_events_url":"https://api.github.com/users/vstoykov/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T13:32:48Z","updated_at":"2018-05-09T13:32:48Z","author_association":"CONTRIBUTOR","body":"@czpython I have the same exception for custom plugin which extends from `djangocms_file.Folder`.\r\n\r\nI'm not overriding `objects` in my custom plugin and as I can see `objects` is not overridden in  `djangocms_file.Folder` neither. Do you think that this is a bug in `django-treebeard` when using concrete inheritance more than once or I'm missing something?"}}
{"actor":{"display_login":"vstoykov"}}