6.0.0-beta1
7/4/25

[#8870] Certain notifications get lost
Summary Certain notifications get lost
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 02/12/2010 (5621 days ago)
Due
Updated 02/18/2010 (5615 days ago)
Assigned
Resolved 02/18/2010 (5615 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/18/2010 07:47:10 AM Michael Slusarz State ⇒ Resolved
 
02/18/2010 07:46:48 AM CVS Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

Another Notification rewrite.
First, fix Bug #8870. Fixed by removing Nag specific event type
(nag.alarm).  However, this was just a symptom of a larger problem.

The problem: using application specific Notification handlers to handle
application specific event types.  The problem comes when switching
between applications.  Since these application handlers don't have any
knowledge of each other, events created by one handler may not be able
to be displayed when notify() was eventually called, because another
status handler had replaced the original handler.

The solution: all notifications need to be handled by a single,
centralized source - namely, the horde-level handlers.  Application
specific details are instead injected into the horde-level handler to
extend behavior.

While reworking the code, also provided opportunity to remove all
application-specific code from Notification.  Horde-specific
instantiation (i.e. adding Horde logging and Alarm decorators) is now
done in Horde_Core rather than in the base Notification object.

Additionally, rework some of the complexity added to the package.  I
believe the goal of the recent Notification changes was to make the
Notification package testable and/or usable outside of a base Horde
install.  But these changes also made the code unreadable, redundant,
and overly complex.

e.g. using interfaces where simple class extensions
make much more sense (IMHO - there are very few cases where an interface
makes more sense than an abstract class. Using interfaces for the
Handler class was simply overkill.  Out of the 10 methods defined, there
are only 2 methods useful for decorator purposes - push() and notify().
And any given decorator won't even use both of these.  Having to contort
code to do things like chaining handlers to achieve this in an interface
pattern was almost impossible to follow.  It is much simpler to simply
add decorators directly to the base handler object.

  create mode 100644 framework/Core/lib/Horde/Core/Binder/Notification.php
  create mode 100644 framework/Core/lib/Horde/Core/Notification/Status.php
  create mode 100644 
framework/Notification/lib/Horde/Notification/Event/Status.php
  create mode 100644 framework/Notification/lib/Horde/Notification/Handler.php
  delete mode 100644 
framework/Notification/lib/Horde/Notification/Handler/Base.php
  create mode 100644 
framework/Notification/lib/Horde/Notification/Handler/Decorator/Base.php
  delete mode 100644 
framework/Notification/lib/Horde/Notification/Handler/Interface.php
  delete mode 100644 
framework/Notification/lib/Horde/Notification/Listener/Mobile.php
  delete mode 100644 
framework/Notification/test/Horde/Notification/Class/Notification/Handler/BaseTest.php
  create mode 100644 
framework/Notification/test/Horde/Notification/Class/Notification/HandlerTest.php
  delete mode 100644 
framework/Notification/test/Horde/Notification/Class/Notification/Listener/MobileTest.php
  create mode 100644 imp/lib/Notification/Event/Status.php
  create mode 100644 imp/lib/Notification/Handler/Decorator/Imap.php
  create mode 100644 imp/lib/Notification/Listener/AjaxStatus.php
  delete mode 100644 imp/lib/Notification/Listener/Status.php
  delete mode 100644 imp/lib/Notification/Listener/StatusMobile.php
  delete mode 100644 nag/lib/Notification/Listener/Status.php
http://git.horde.org/diff.php/framework/Ajax/lib/Horde/Ajax/Application/Base.php?rt=horde-git&r1=c14ae6da7bc547fecf3163d1b20960de9e18bdd4&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Core/lib/Horde.php?rt=horde-git&r1=0effa829cab0f81ae350b4090120f67ac8eb2e7a&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Core/lib/Horde/Core/Binder/Notification.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Core/lib/Horde/Core/Notification/Status.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Core/lib/Horde/Registry.php?rt=horde-git&r1=5fb5cc21e861699d935a686940e72dc5097ec2fe&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Core/package.xml?rt=horde-git&r1=0141832fe45176c993464c4b52cef1f3cb3a20dd&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification.php?rt=horde-git&r1=3e76a786ef6dda262954d25d5f9327911a9ed584&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Event.php?rt=horde-git&r1=0e1f67a2365ac4fbe0a6392c0a979d84b7fa79a1&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Notification/lib/Horde/Notification/Event/Status.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Notification/lib/Horde/Notification/Handler.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Handler/Base.php?rt=horde-git&r1=bf94ab2ee58ffe15add8169edda91ecf15da2dce&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Handler/Decorator/Alarm.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Notification/lib/Horde/Notification/Handler/Decorator/Base.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Handler/Decorator/Hordelog.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Handler/Decorator/Log.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Handler/Interface.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Listener.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Listener/Audio.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Listener/Javascript.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Listener/Mobile.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/lib/Horde/Notification/Listener/Status.php?rt=horde-git&r1=6c80a3d3b53d7dc002d400fbb2dc33c20ca397d0&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/package.xml?rt=horde-git&r1=0204b97343010ce85f794638451087affcbcc20e&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Autoload.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/EventTest.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Handler/BaseTest.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Handler/Decorator/AlarmTest.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Handler/Decorator/HordelogTest.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Handler/Decorator/LogTest.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/framework/Notification/test/Horde/Notification/Class/Notification/HandlerTest.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Listener/AudioTest.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Listener/JavascriptTest.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Listener/MobileTest.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/Listener/StatusTest.php?rt=horde-git&r1=499b725b8970672ba487fc951a42929c82168727&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/Notification/ListenerTest.php?rt=horde-git&r1=b4468d4962d0167c7067fa96af2bdddb8bb022af&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Notification/test/Horde/Notification/Class/NotificationTest.php?rt=horde-git&r1=7214eb6aec6b0199bd2877a39f0aff32ec57dd1c&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/framework/Prefs/lib/Horde/Prefs/Ui.php?rt=horde-git&r1=a97a35b17ec2884b85b10503c7f795b1811d7719&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/horde/services/ajax.php?rt=horde-git&r1=c1be869263d94434647831660105616acc22effb&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/horde/services/prefs.php?rt=horde-git&r1=06092df8b6c7e81e134df6d3a0254d9c0aa95a4a&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/compose-dimp.php?rt=horde-git&r1=49893aecfc0d44ad7250d5056ac1b7ed91dd0d52&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/js/DimpCore.js?rt=horde-git&r1=241298ea23cfd63946ad43fbe4669d72f03c8c85&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Ajax/Application.php?rt=horde-git&r1=2067a57a095ca5466dc098ff12005fc3835d6e36&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Application.php?rt=horde-git&r1=5fb5cc21e861699d935a686940e72dc5097ec2fe&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Auth.php?rt=horde-git&r1=8c77e8fa7db5a04ad26f8147155df4e458a8a50d&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Dimp.php?rt=horde-git&r1=7eba9311ccd488faabe102efee17cca2be7f4f72&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/imp/lib/Notification/Event/Status.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/imp/lib/Notification/Handler/Decorator/Imap.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/co.php/imp/lib/Notification/Listener/AjaxStatus.php?rt=horde-git&r=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Notification/Listener/Status.php?rt=horde-git&r1=205d6b608b229dbc485b89469d5a4039c58dcff0&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/lib/Notification/Listener/StatusMobile.php?rt=horde-git&r1=205d6b608b229dbc485b89469d5a4039c58dcff0&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/message-dimp.php?rt=horde-git&r1=49893aecfc0d44ad7250d5056ac1b7ed91dd0d52&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/message-mimp.php?rt=horde-git&r1=49893aecfc0d44ad7250d5056ac1b7ed91dd0d52&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/templates/compose/compose-mimp.inc?rt=horde-git&r1=99e7aaf59cae56bbdbbfe3256ce8d4564f547e49&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/templates/compose/redirect-mimp.inc?rt=horde-git&r1=99e7aaf59cae56bbdbbfe3256ce8d4564f547e49&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/templates/folders/folders-mimp.inc?rt=horde-git&r1=99e7aaf59cae56bbdbbfe3256ce8d4564f547e49&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/templates/mailbox/mailbox-mimp.inc?rt=horde-git&r1=99e7aaf59cae56bbdbbfe3256ce8d4564f547e49&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/imp/templates/mailbox/search-mimp.inc?rt=horde-git&r1=99e7aaf59cae56bbdbbfe3256ce8d4564f547e49&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/kronolith/lib/Ajax/Application.php?rt=horde-git&r1=0ccc349f26569383cc37e40c04cea9e5106c0f9b&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/nag/lib/Application.php?rt=horde-git&r1=bf94ab2ee58ffe15add8169edda91ecf15da2dce&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/nag/lib/Nag.php?rt=horde-git&r1=9f529bff639f1cafde6bae97fa3d6c7ee0112bce&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
http://git.horde.org/diff.php/nag/lib/Notification/Listener/Status.php?rt=horde-git&r1=9cd8bf7a40411347cf2b363a35cb3392d3b88d09&r2=e48b8a54fc54a179be749967a6a8b6b73cc1162e
02/12/2010 10:48:13 AM Jan Schneider Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Queue ⇒ Horde Framework Packages
Summary ⇒ Certain notifications get lost
Type ⇒ Bug
State ⇒ Assigned
Reply to this comment
After the recent changes to the Notification framework, certain 
notifications are not properly raised anymore, even though they are on 
the notification stack. This can be reproduced in Kronolith. If you 
try to open a non-existant event, you get an error message:
http://server/horde/kronolith/#event:CALENDAR:RANDOM_ID
You don't if you try to open a non-existant task:
http://server/horde/kronolith/#task:TASKLIST:RANDOM_ID

Saved Queries