plone / plone.app.workflow

Sharing tab for Plone local role delegation
2 stars 7 forks source link

Giving error in sharing tab search if content is not folderish #14

Closed idgserpro closed 7 years ago

idgserpro commented 7 years ago

Created a minimal Plone with https://github.com/collective/minimalplone4 and pinned to 4.3.14 (so, plone.app.workflow was 2.1.9). Went to http://localhost:12455/Plone/front-page/@@sharing, entered "Re" in input and then "search". I received the following error:

2017-08-01 17:47:11 ERROR Zope.SiteErrorLog 1501620431.440.468750776055 http://localhost:12455/Plone/front-page/@@sharing/@@updateSharingInfo
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.app.workflow.browser.sharing, line 615, in updateSharingInfo
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/user/.buildout/eggs/plone.app.workflow-2.1.9-py2.7.egg/plone/app/workflow/browser/sharing.pt
   - Line 67, Column 8
   - Expression: <PathExpr standard:u'view/role_settings'>
   - Names:
      {'args': (),
       'container': <Products.Five.metaclass.SharingView object at 0x7f6aca16c510>,
       'context': <Products.Five.metaclass.SharingView object at 0x7f6aca16c510>,
       'default': <object object at 0x7f6ade1e8bf0>,
       'here': <Products.Five.metaclass.SharingView object at 0x7f6aca16c510>,
       'loop': {},
       'nothing': None,
       'options': {'instance': <Products.Five.metaclass.SharingView object at 0x7f6aca16c510>,
                   'the_macro': [('version', '1.6'),
                                 ('mode', 'html'),
                                 ('setPosition', (67, 8)),
                                 ('setSourceFile',
                                  '/home/user/.buildout/eggs/plone.app.workflow-2.1.9-py2.7.egg/plone/app/workflow/browser/sharing.pt'),
                                 ('beginI18nContext',
                                  {'domain': u'plone',
                                   'source': None,
                                   'target': None}),
                                 ('beginScope',
                                  {u'class': u'listing',
                                   u'i18n:attributes': u'summary summary_assigned_roles;',
                                   u'id': u'user-group-sharing',
                                   u'metal:define-macro': u'user-group-sharing',
                                   u'summary': u'Current sharing permissions',
                                   u'tal:define': u'available_roles view/roles;\n                           num_columns python:len(available_roles) + 1;\n                           role_settings view/role_settings'}),
                                 ('setLocal',
                                  (u'available_roles',
                                   <PathExpr standard:u'view/roles'>)),
                                 ('setLocal',
                                  (u'num_columns',
                                   <PythonExpr (len(available_roles) + 1)>)),
                                 ('setLocal',
                                  (u'role_settings',
                                   <PathExpr standard:u'view/role_settings'>)),
                                 ('startTag',
                                  (u'table',
                                   [(u'metal:define-macro',
                                     u'user-group-sharing',
                                     'metal'),
                                    (u'id', u'id="user-group-sharing"'),
                                    (u'class', u'class="listing"'),
                                    (u'summary',
                                     u'Current sharing permissions',
                                     'replace',
                                     None,
                                     1,
                                     u'summary_assigned_roles'),
                                    (u'tal:define',
                                     u'available_roles view/roles;\n                           num_columns python:len(available_roles) + 1;\n                           role_settings view/role_settings',
                                     'tal'),
                                    (u'i18n:attributes',
                                     u'summary summary_assigned_roles;',
                                     'i18n')])),
                                 ('rawtextColumn', (u'\n\n              ', 14)),
                                 ('setPosition', (75, 14)),
                                 ('defineMacro',
                                  (u'user-group-sharing-head',
                                   [('version', '1.6'),
                                    ('mode', 'html'),
                                    ('setPosition', (75, 14)),
                                    ('setSourceFile',
                                     '/home/user/.buildout/eggs/plone.app.workflow-2.1.9-py2.7.egg/plone/app/workflow/browser/sharing.pt'),
                                    ('startTag',
                                     (u'thead',
                                      [(u'metal:define-macro',
                                        u'user-group-sharing-head',
                                        'metal'),
                                       (u'id',
                                        u'id="user-group-sharing-head"')])),
                                    ('rawtextBeginScope',
                                     (u'\n                  ',
                                      18,
                                      (76, 18),
                                      0,
                                      {u'tal:condition': u'python:len(role_settings) > 0'})),
                                    ('condition',
                                     (<PythonExpr (len(role_settings) > 0)>,
                                      [('startTag',
                                        (u'tr',
                                         [(u'tal:condition',
                                           u'python:len(role_settings) > 0',
                                           'tal')])),
                                       ('rawtextColumn',
                                        (u'\n                      ', 22)),
                                       ('setPosition', (77, 22)),
                                       ('beginI18nContext',
                                        {'domain': u'plone',
                                         'source': None,
                                         'target': None}),
                                       ('beginScope',
                                        {u'i18n:translate': u'label_name'}),
                                       ('startTag',
                                        (u'th',
                                         [(u'i18n:translate',
                                           u'label_name',
                                           'i18n')])),
                                       ('insertTranslation',
                                        (u'label_name',
                                         [('rawtextOffset', (u'Name', 4))])),
                                       ('endScope', ()),
                                       ('rawtextOffset', (u'</th>', 5)),
                                       ('endI18nContext', ()),
                                       ('setPosition', (78, 22)),
                                       ('beginI18nContext',
                                        {'domain': u'plone',
                                         'source': None,
                                         'target': None}),
                                       ('beginScope',
                                        {u'class': u'nosort',
                                         u'i18n:translate': u'',
                                         u'tal:content': u'role/title',
                                         u'tal:repeat': u'role available_roles'}),
                                       ('loop',
                                        (u'role',
                                         <PathExpr standard:u'available_roles'>,
                                         [('rawtextColumn',
                                           (u'\n                      ',
                                            22)),
                                          ('startTag',
                                           (u'th',
                                            [(u'class',
                                              u'class="nosort"'),
                                             (u'tal:repeat',
                                              u'role available_roles',
                                              'tal'),
                                             (u'i18n:translate',
                                              u'',
                                              'i18n'),
                                             (u'tal:content',
                                              u'role/title',
                                              'tal')])),
                                          ('insertI18nText',
                                           (<PathExpr standard:u'role/title'>,
                                            [])),
                                          ('rawtextOffset',
                                           (u'</th>', 5))])),
                                       ('endScope', ()),
                                       ('endI18nContext', ()),
                                       ('rawtextColumn',
                                        (u'\n                  </tr>', 23))])),
                                    ('endScope', ()),
                                    ('rawtextColumn',
                                     (u'\n              </thead>', 22))])),
                                 ('rawtextColumn', (u'\n\n            ', 12)),
                                 ('setPosition', (85, 12)),
                                 ('defineMacro',
                                  (u'user-group-sharing-settings',
                                   [('version', '1.6'),
                                    ('mode', 'html'),
                                    ('setPosition', (85, 12)),
                                    ('setSourceFile',
                                     '/home/user/.buildout/eggs/plone.app.workflow-2.1.9-py2.7.egg/plone/app/workflow/browser/sharing.pt'),
                                    ('startTag',
                                     (u'tbody',
                                      [(u'metal:define-macro',
                                        u'user-group-sharing-settings',
                                        'metal'),
                                       (u'id',
                                        u'id="user-group-sharing-settings"')])),
                                    ('setPosition', (86, 16)),
                                    ('beginScope',
                                     {u'repeat': u'entry role_settings'}),
                                    ('loop',
                                     (u'entry',
                                      <PathExpr standard:u'role_settings'>,
                                      [('rawtextColumn',
                                        (u'\n                ', 16)),
                                       ('optTag',
                                        (u'tal:entries',
                                         None,
                                         'tal',
                                         0,
                                         [('startTag',
                                           (u'tal:entries',
                                            [(u'repeat',
                                              u'entry role_settings',
                                              'tal')]))],
                                         [('rawtextBeginScope',
                                           (u'\n                    ',
                                            20,
                                            (87, 20),
                                            0,
                                            {u'tal:attributes': u"class python:oddrow and 'odd' or 'even'",
                                             u'tal:define': u"is_group python:entry['type'] == 'group';\n                                    disabled entry/disabled | python:False;\n                                    oddrow repeat/entry/odd;\n                                    sticky python:entry['id'] in view.STICKY"})),
                                          ('setLocal',
                                           (u'is_group',
                                            <PythonExpr (entry['type'] == 'group')>)),
                                          ('setLocal',
                                           (u'disabled',
                                            <PathExpr standard:u'entry/disabled | python:False'>)),
                                          ('setLocal',
                                           (u'oddrow',
                                            <PathExpr standard:u'repeat/entry/odd'>)),
                                          ('setLocal',
                                           (u'sticky',
                                            <PythonExpr (entry['id'] in view.STICKY)>)),
                                          ('startTag',
                                           (u'tr',
                                            [(u'tal:define',
                                              u"is_group python:entry['type'] == 'group';\n                                    disabled entry/disabled | python:False;\n                                    oddrow repeat/entry/odd;\n                                    sticky python:entry['id'] in view.STICKY",
                                              'tal'),
                                             (u'tal:attributes',
                                              u"class python:oddrow and 'odd' or 'even'",
                                              'tal'),
                                             (u'class',
                                              None,
                                              'insert',
                                              <PythonExpr (oddrow and 'odd' or 'even')>,
                                              False,
                                              None)])),
                                          ('rawtextBeginScope',
                                           (u'\n                        ',
                                            24,
                                            (92, 24),
                                            0,
                                            {u'tal:attributes': u'title entry/id'})),
                                          ('startTag',
                                           (u'td',
                                            [(u'tal:attributes',
                                              u'title entry/id',
                                              'tal'),
                                             (u'title',
                                              None,
                                              'insert',
                                              <PathExpr standard:u'entry/id'>,
                                              False,
                                              None)])),
                                          ('rawtextBeginScope',
                                           (u'\n                            ',
                                            28,
                                            (93, 28),
                                            0,
                                            {u'tal:condition': u'is_group',
                                             u'tal:replace': u'structure context/group.png'})),
                                          ('condition',
                                           (<PathExpr standard:u'is_group'>,
                                            [('optTag',
                                              (u'img',
                                               '',
                                               None,
                                               1,
                                               [('startEndTag',
                                                 (u'img',
                                                  [(u'tal:condition',
                                                    u'is_group',
                                                    'tal'),
                                                   (u'tal:replace',
                                                    u'structure context/group.png',
                                                    'tal')]))],
                                               [('insertStructure',
                                                 (<PathExpr standard:u'context/group.png'>,
                                                  {},
                                                  []))]))])),
                                          ('rawtextBeginScope',
                                           (u'\n                            ',
                                            28,
                                            (94, 28),
                                            1,
                                            {u'tal:condition': u'not:is_group',
                                             u'tal:replace': u'structure context/user.png'})),
                                          ('condition',
                                           (<NotExpr u'is_group'>,
                                            [('optTag',
                                              (u'img',
                                               '',
                                               None,
                                               1,
                                               [('startEndTag',
                                                 (u'img',
                                                  [(u'tal:condition',
                                                    u'not:is_group',
                                                    'tal'),
                                                   (u'tal:replace',
                                                    u'structure context/user.png',
                                                    'tal')]))],
                                               [('insertStructure',
                                                 (<PathExpr standard:u'context/user.png'>,
                                                  {},
                                                  []))]))])),
                                          ('rawtextBeginScope',
                                           (u'\n\n                            ',
                                            28,
                                            (96, 28),
                                            1,
                                            {u'condition': u'sticky'})),
                                          ('condition',
                                           (<PathExpr standard:u'sticky'>,
                                            [('optTag',
                                              (u'tal:sticky',
                                               None,
                                               'tal',
                                               0,
                                               [('startTag',
                                                 (u'tal:sticky',
                                                  [(u'condition',
                                                    u'sticky',
                                                    'tal')]))],
                                               [('rawtextBeginScope',
                                                 (u'\n                              ',
                                                  30,
                                                  (97, 30),
                                                  0,
                                                  {u'tal:replace': u'entry/title'})),
                                                ('optTag',
                                                 (u'span',
                                                  '',
                                                  None,
                                                  1,
                                                  [('startEndTag',
                                                    (u'span',
                                                     [(u'tal:replace',
                                                       u'entry/title',
                                                       'tal')]))],
                                                  [('insertText',
                                                    (<PathExpr standard:u'entry/title'>,
                                                     []))])),
                                                ('endScope', ()),
                                                ('rawtextColumn',
                                                 (u'\n                            ',
                                                  28))]))])),
                                          ('rawtextBeginScope',
                                           (u'\n                            ',
                                            28,
                                            (99, 28),
                                            1,
                                            {u'condition': u'not:sticky'})),
                                          ('condition',
                                           (<NotExpr u'sticky'>,
                                            [('optTag',
                                              (u'tal:nonsticky',
                                               None,
                                               'tal',
                                               0,
                                               [('startTag',
                                                 (u'tal:nonsticky',
                                                  [(u'condition',
                                                    u'not:sticky',
                                                    'tal')]))],
                                               [('rawtextBeginScope',
                                                 (u'\n                              ',
                                                  30,
                                                  (100, 30),
                                                  0,
                                                  {u'tal:replace': u'entry/title'})),
                                                ('optTag',
                                                 (u'span',
                                                  '',
                                                  None,
                                                  1,
                                                  [('startEndTag',
                                                    (u'span',
                                                     [(u'tal:replace',
                                                       u'entry/title',
                                                       'tal')]))],
                                                  [('insertText',
                                                    (<PathExpr standard:u'entry/title'>,
                                                     []))])),
                                                ('rawtextBeginScope',
                                                 (u'\n                              ',
                                                  30,
                                                  (101, 30),
                                                  1,
                                                  {u'condition': u'entry/login|nothing'})),
                                                ('condition',
                                                 (<PathExpr standard:u'entry/login|nothing'>,
                                                  [('optTag',
                                                    (u'tal:title',
                                                     None,
                                                     'tal',
                                                     0,
                                                     [('startTag',
                                                       (u'tal:title',
                                                        [(u'condition',
                                                          u'entry/login|nothing',
                                                          'tal')]))],
                                                     [('rawtextBeginScope',
                                                       (u'\n                                (',
                                                        33,
                                                        (102,
                                                         33),
                                                        0,
                                                        {u'tal:replace': u'entry/login'})),
                                                      ('optTag',
                                                       (u'span',
                                                        '',
                                                        None,
                                                        1,
                                                        [('startEndTag',
                                                          (u'span',
                                                           [(u'tal:replace',
                                                             u'entry/login',
                                                             'tal')]))],
                                                        [('insertText',
                                                          (<PathExpr standard:u'entry/login'>,
                                                           []))])),
                                                      ('endScope',
                                                       ()),
                                                      ('rawtextColumn',
                                                       (u')\n                              ',
                                                        30))]))])),
                                                ('endScope', ()),
                                                ('rawtextColumn',
                                                 (u'\n                            ',
                                                  28))]))])),
                                          ('rawtextBeginScope',
                                           (u'\n\n                            ',
                                            28,
                                            (106, 28),
                                            1,
                                            {u'name': u'entries.id:records',
                                             u'tal:attributes': u'value entry/id',
                                             u'tal:condition': u'not:disabled',
                                             u'type': u'hidden'})),
                                          ('condition',
                                           (<NotExpr u'disabled'>,
                                            [('startEndTag',
                                              (u'input',
                                               [(u'tal:condition',
                                                 u'not:disabled',
                                                 'tal'),
                                                (u'type',
                                                 u'type="hidden"'),
                                                (u'name',
                                                 u'name="entries.id:records"'),
                                                (u'tal:attributes',
                                                 u'value entry/id',
                                                 'tal'),
                                                (u'value',
                                                 None,
                                                 'insert',
                                                 <PathExpr standard:u'entry/id'>,
                                                 False,
                                                 None)]))])),
                                          ('rawtextBeginScope',
                                           (u'\n                            ',
                                            28,
                                            (112, 28),
                                            1,
                                            {u'name': u'entries.type:records',
                                             u'tal:attributes': u'value entry/type',
                                             u'tal:condition': u'not:disabled',
                                             u'type': u'hidden'})),
                                          ('condition',
                                           (<NotExpr u'disabled'>,
                                            [('startEndTag',
                                              (u'input',
                                               [(u'tal:condition',
                                                 u'not:disabled',
                                                 'tal'),
                                                (u'type',
                                                 u'type="hidden"'),
                                                (u'name',
                                                 u'name="entries.type:records"'),
                                                (u'tal:attributes',
                                                 u'value entry/type',
                                                 'tal'),
                                                (u'value',
                                                 None,
                                                 'insert',
                                                 <PathExpr standard:u'entry/type'>,
                                                 False,
                                                 None)]))])),
                                          ('endScope', ()),
                                          ('rawtextBeginScope',
                                           (u'\n                        </td>',
                                            29,
                                            (119, 24),
                                            1,
                                            {u'class': u'listingCheckbox',
                                             u'tal:repeat': u'role available_roles'})),
                                          ('loop',
                                           (u'role',
                                            <PathExpr standard:u'available_roles'>,
                                            [('rawtextColumn',
                                              (u'\n                        ',
                                               24)),
                                             ('startTag',
                                              (u'td',
                                               [(u'class',
                                                 u'class="listingCheckbox"'),
                                                (u'tal:repeat',
                                                 u'role available_roles',
                                                 'tal')])),
                                             ('rawtextBeginScope',
                                              (u'\n                            ',
                                               28,
                                               (121, 28),
                                               0,
                                               {u'define': u"entry_role python:entry['roles'][role['id']]"})),
                                             ('setLocal',
                                              (u'entry_role',
                                               <PythonExpr (entry['roles'][role['id']])>)),
                                             ('optTag',
                                              (u'tal:block',
                                               None,
                                               'tal',
                                               0,
                                               [('startTag',
                                                 (u'tal:block',
                                                  [(u'define',
                                                    u"entry_role python:entry['roles'][role['id']]",
                                                    'tal')]))],
                                               [('rawtextBeginScope',
                                                 (u'\n                                ',
                                                  32,
                                                  (122, 32),
                                                  0,
                                                  {u'tal:condition': u"python:entry_role == 'global'",
                                                   u'tal:replace': u'structure context/site_icon.png'})),
                                                ('condition',
                                                 (<PythonExpr (entry_role == 'global')>,
                                                  [('optTag',
                                                    (u'img',
                                                     '',
                                                     None,
                                                     1,
                                                     [('startEndTag',
                                                       (u'img',
                                                        [(u'tal:condition',
                                                          u"python:entry_role == 'global'",
                                                          'tal'),
                                                         (u'tal:replace',
                                                          u'structure context/site_icon.png',
                                                          'tal')]))],
                                                     [('insertStructure',
                                                       (<PathExpr standard:u'context/site_icon.png'>,
                                                        {},
                                                        []))]))])),
                                                ('rawtextBeginScope',
                                                 (u'\n                                ',
                                                  32,
                                                  (123, 32),
                                                  1,
                                                  {u'tal:condition': u"python:entry_role == 'acquired'",
                                                   u'tal:replace': u'structure context/confirm_icon.png'})),
                                                ('condition',
                                                 (<PythonExpr (entry_role == 'acquired')>,
                                                  [('optTag',
                                                    (u'img',
                                                     '',
                                                     None,
                                                     1,
                                                     [('startEndTag',
                                                       (u'img',
                                                        [(u'tal:condition',
                                                          u"python:entry_role == 'acquired'",
                                                          'tal'),
                                                         (u'tal:replace',
                                                          u'structure context/confirm_icon.png',
                                                          'tal')]))],
                                                     [('insertStructure',
                                                       (<PathExpr standard:u'context/confirm_icon.png'>,
                                                        {},
                                                        []))]))])),
                                                ('rawtextBeginScope',
                                                 (u'\n                                ',
                                                  32,
                                                  (124, 32),
                                                  1,
                                                  {u'condition': u'python:entry_role in (True, False)'})),
                                                ('condition',
                                                 (<PythonExpr (entry_role in (True, False))>,
                                                  [('optTag',
                                                    (u'tal:block',
                                                     None,
                                                     'tal',
                                                     0,
                                                     [('startTag',
                                                       (u'tal:block',
                                                        [(u'condition',
                                                          u'python:entry_role in (True, False)',
                                                          'tal')]))],
                                                     [('rawtextBeginScope',
                                                       (u'\n                                  ',
                                                        34,
                                                        (125,
                                                         34),
                                                        0,
                                                        {u'class': u'noborder',
                                                         u'tal:attributes': u"name string:entries.role_${role/id}:records;\n                                                         checked python:entry_role and 'checked' or None;\n                                                         disabled python:disabled or None",
                                                         u'type': u'checkbox',
                                                         u'value': u'True'})),
                                                      ('startEndTag',
                                                       (u'input',
                                                        [(u'class',
                                                          u'class="noborder"'),
                                                         (u'type',
                                                          u'type="checkbox"'),
                                                         (u'value',
                                                          u'value="True"'),
                                                         (u'tal:attributes',
                                                          u"name string:entries.role_${role/id}:records;\n                                                         checked python:entry_role and 'checked' or None;\n                                                         disabled python:disabled or None",
                                                          'tal'),
                                                         (u'disabled',
                                                          None,
                                                          'insert',
                                                          <PythonExpr (disabled or None)>,
                                                          False,
                                                          None),
                                                         (u'checked',
                                                          None,
                                                          'insert',
                                                          <PythonExpr (entry_role and 'checked' or None)>,
                                                          False,
                                                          None),
                                                         (u'name',
                                                          None,
                                                          'insert',
                                                          <StringExpr u'entries.role_${role/id}:records'>,
                                                          False,
                                                          None)])),
                                                      ('endScope',
                                                       ()),
                                                      ('rawtextColumn',
                                                       (u'\n                                ',
                                                        32))]))])),
                                                ('endScope', ()),
                                                ('rawtextColumn',
                                                 (u'\n                            ',
                                                  28))])),
                                             ('endScope', ()),
                                             ('rawtextColumn',
                                              (u'\n                        </td>',
                                               29))])),
                                          ('endScope', ()),
                                          ('endScope', ()),
                                          ('rawtextColumn',
                                           (u'\n                    </tr>\n                ',
                                            16))]))])),
                                    ('endScope', ()),
                                    ('rawtextColumn',
                                     (u'\n            </tbody>', 20))])),
                                 ('endScope', ()),
                                 ('rawtextColumn', (u'\n        </table>', 16)),
                                 ('endI18nContext', ())],
                   'view': <Products.Five.metaclass.SharingView object at 0x7f6aca16cf10>},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f6acc678e68>,
       'request': <HTTPRequest, URL=http://localhost:12455/Plone/front-page/@@sharing/@@updateSharingInfo>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f6acc186ad0>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SharingView object at 0x7f6aca16cf10>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f6acb8a36d0>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 117, in render
  Module plone.memoize.instance, line 51, in memogetter
  Module plone.app.workflow.browser.sharing, line 166, in role_settings
  Module plone.memoize.instance, line 51, in memogetter
  Module plone.app.workflow.browser.sharing, line 231, in existing_role_settings
  Module Products.PlonePAS.pas, line 271, in _getLocalRolesForDisplay
AttributeError: 'SharingView' object has no attribute 'get_local_roles'

This doesn't happen in http://localhost:12455/Plone/news/@@sharing: instead, "Reviewers" is shown in the table. This error isn't shown to the user interface since it's an AJAX call. Testing with a folderish type (like collective.nitf) works as well.

We didn't test in Plone 5.

pbauer commented 7 years ago

I can confirm this. The error does not appear when js is disabled.

pbauer commented 7 years ago

When a user is already in the table because he has a local role and you change that the error is a little different but basically the same:

2017-08-04 09:38:32 ERROR Zope.SiteErrorLog 1501832312.640.360503056091 http://localhost:8080/Plone/asd/@@sharing/@@updateSharingInfo
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.app.workflow.browser.sharing, line 611, in updateSharingInfo
  Module plone.app.workflow.browser.sharing, line 83, in handle_form
AttributeError: 'SharingView' object has no attribute 'restrictedTraverse'

Again, without ajax it works.

pbauer commented 7 years ago

Duplicate of https://github.com/plone/Products.CMFPlone/issues/2053

idgserpro commented 7 years ago

I didn't think about searching in Products.CMFPlone, sorry.

But another question arises... should I always open an issue in Products.CMFPlone instead of specific packages in plone.app.* namespace?

gforcada commented 7 years ago

@idgserpro if you know that is about a specific package you can report it there, as a rule of thumb though, you can always report them to cmfplone