Ticket #1119 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

error when subscribed local role is empty

Reported by: mihamina Owned by: ogrisel
Priority: P2 Milestone: CPS 3.4.0
Component: CPSSubscriptions Version: TRUNK
Severity: normal Keywords: comment notification empty
Cc: mihamina.rakotomandimby@…

Description

I upload a zipped html file on a workspace i have enough right on, and when I try to autorize comments, I got this:

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module Zope2.App.startup, line 215, in commit
    * Module transaction._manager, line 84, in commit
    * Module transaction._transaction, line 373, in commit
    * Module transaction._transaction, line 413, in _callBeforeCommitHooks
    * Module Products.CPSCore.TransactionManager, line 139, in __call__
    * Module Products.CPSSubscriptions.EventManager, line 136, in __call__
    * Module Products.CPSSubscriptions.SubscriptionsTool, line 776, in notify_processed_event
    * Module Products.CPSSubscriptions.Subscription, line 177, in sendEvent
    * Module Products.CPSSubscriptions.RecipientsRules, line 850, in getRecipients
    * Module Products.CPSDefault.MembershipTool, line 212, in getEmailFromUsername
    * Module Products.CPSDirectory.BaseDirectory, line 415, in _getEntry
    * Module Products.CPSDirectory.BaseDirectory, line 885, in _getDataModel
    * Module Products.CPSSchemas.DataModel, line 249, in _fetch
    * Module Products.CPSDirectory.MembersDirectory, line 327, in getData
    * Module Products.CPSDirectory.MembersDirectory, line 278, in _getMember

KeyError: "No member 'root'"

Sorry, I dont know what component is wrong, I put CPSDefault without really knowing. I do apologize.

Change History

comment:1 Changed 14 years ago by fguillaume

  • Milestone changed from CPS 3.3.8 to CPS 3.4.0

What CPS version ? Use the "Version" field of the tickets.

comment:2 Changed 14 years ago by mihamina

  • Version changed from 3.0.0 to TRUNK

Shame on me, I was running an old SVN Trunk one. After updating it, running [29398], just trying to preview the zipped HTML file generates this:
(Error message has changed)

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module Zope2.App.startup, line 215, in commit
    * Module transaction._manager, line 84, in commit
    * Module transaction._transaction, line 373, in commit
    * Module transaction._transaction, line 413, in _callBeforeCommitHooks
    * Module Products.CPSCore.TransactionManager, line 139, in __call__
    * Module Products.CPSSubscriptions.EventManager, line 136, in __call__
    * Module Products.CPSSubscriptions.SubscriptionsTool, line 776, in notify_processed_event
    * Module Products.CPSSubscriptions.Subscription, line 196, in sendEvent
    * Module Products.CPSSubscriptions.Notifications, line 427, in notifyRecipients

TypeError: sequence item 0: expected string, NoneType found

I have zip/unzip installed on my system (Debian).

comment:3 Changed 14 years ago by mihamina

  • Keywords member root authorise removed
  • Summary changed from it looks for a non existent member to comments brake the rendering

I foud more tips:

  • When I authorize comments, I get the traceback
  • But the comments are authorized (becauze the link to manage the comments becomes "UNauthorize comments)
  • If I click on it and therefore UNauthorize comments, then everything is OK, I dont get any tracebacks.

The traceback is:

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module Zope2.App.startup, line 215, in commit
    * Module transaction._manager, line 84, in commit
    * Module transaction._transaction, line 373, in commit
    * Module transaction._transaction, line 413, in _callBeforeCommitHooks
    * Module Products.CPSCore.TransactionManager, line 139, in __call__
    * Module Products.CPSSubscriptions.EventManager, line 136, in __call__
    * Module Products.CPSSubscriptions.SubscriptionsTool, line 776, in notify_processed_event
    * Module Products.CPSSubscriptions.Subscription, line 196, in sendEvent
    * Module Products.CPSSubscriptions.Notifications, line 427, in notifyRecipients

TypeError: sequence item 0: expected string, NoneType found

I hope this helps. PS: I changed the "title" of the ticket, the topic has now nothing to do with membership, I guess...

comment:4 Changed 14 years ago by mihamina

  • Component changed from CPSDefault to CPSSubscriptions

I get no error when I unsubscribe everybody in "manage notification".
In the beginning, I have subscribed everybody for everything related to comment.
I have no time to try what combination of "event"/"user subscription" is buggy, but I'm pretty sure the mess is out there.

comment:5 Changed 14 years ago by mihamina

  • Keywords notification empty added
  • Summary changed from comments brake the rendering to error when subscribed local role is empty

I found:
let a workspace be.
Say we just delegate the manager role to two portal members
No more local role to anyone. (ie there is no workspace member)
In the notification manager, if I subscribe the workspace member local role, it generates this error. The list of workspace member is empty, and that is why it "TypeError?: sequence item 0".
I change the summary again, sorry.

comment:6 Changed 14 years ago by janguenot

  • Status changed from new to assigned
  • Owner changed from trac to janguenot

comment:7 Changed 14 years ago by janguenot

I can't reproduce any of the scenarios above that I hope I understood.

Can you reproduce this on the latest CPS trunk ? If you find out more details can you mail this in on the cps-users-fr please ?

comment:8 Changed 14 years ago by ogrisel

  • Owner changed from janguenot to ogrisel
  • Status changed from assigned to new

comment:9 Changed 14 years ago by ogrisel

  • Status changed from new to assigned

comment:10 Changed 14 years ago by ogrisel

  • Status changed from assigned to closed
  • Resolution set to fixed

fixed in [30928] with a bunch of tests.

Note: See TracTickets for help on using tickets.