<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Login tasks don&#039;t work</title> 
  <pubDate>Sun, 05 Apr 2026 05:17:23 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9767</link> 
  <atom:link rel="self" type="application/rss+xml" title="Login tasks don&#039;t work" href="https://bugs.horde.org/ticket/9767/rss" /> 
  <description>Login tasks don&#039;t work</description> 
 
   
   
  <item> 
   <title>I get the confirmation screen when accessing IMP (using LDAP</title> 
   <description>I get the confirmation screen when accessing IMP (using LDAP auth and hordeauth in IMP), but the tasks don&#039;t run when confirming them. I just get to DIMP.</description> 
   <pubDate>Fri, 01 Apr 2011 09:03:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t62947</link> 
  </item> 
   
  <item> 
   <title>Now I don&#039;t see any login task action at all anymore. I just</title> 
   <description>Now I don&#039;t see any login task action at all anymore. I just figured that I haven&#039;t seen the login tasks confirmation screen for weeks.</description> 
   <pubDate>Fri, 20 May 2011 07:53:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t64894</link> 
  </item> 
   
  <item> 
   <title>I don&#039;t see this.  Picking an example task (e.g. IMP&#039;s delet</title> 
   <description>I don&#039;t see this.  Picking an example task (e.g. IMP&#039;s delete attachments monthly), and setting the interval to &quot;EVERY&quot;, I always get the confirmation page and I can verify that execute() is called in that class if the task is confirmed.

Hmmm... I think I found the issue.  It seems that *Horde* logintasks would be lost if the first application authenticated to did not have logintasks run.  This is because the Horde logintasks are always associated with the first application to load.

Solution (I think): Don&#039;t initiate a LoginTasks object until we are sure we are going to call runTasks() on it.  Seems to fix things for me (I now see things like last login/test.php warning notifications).

This probably would have broke when we added something like setupNotification() - this would have potentially caused other applications to be initialized before the login app is.</description> 
   <pubDate>Tue, 24 May 2011 05:15:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65004</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Fix running </title> 
   <description>Changes have been made in Git for this ticket:

Fix running Horde login tasks (Bug #9767).

 2 files changed, 7 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/87a2647928d8de5869f9a62aafb3b07b9f9a3db8</description> 
   <pubDate>Tue, 24 May 2011 05:15:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65005</link> 
  </item> 
   
  <item> 
   <title>I see the Horde login tasks running now (test.php notificati</title> 
   <description>I see the Horde login tasks running now (test.php notification), but IMP&#039;s tasks still don&#039;t run.
I use LDAP authentication and hordeauth. initial_application is Horde, I got to IMP directly from the portal.</description> 
   <pubDate>Tue, 24 May 2011 09:49:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65011</link> 
  </item> 
   
  <item> 
   <title>Can&#039;t reproduce.  IMP tasks run fine.</title> 
   <description>Can&#039;t reproduce.  IMP tasks run fine.</description> 
   <pubDate>Tue, 24 May 2011 16:03:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65032</link> 
  </item> 
   
  <item> 
   <title>&gt; Can&#039;t reproduce.  IMP tasks run fine.

Additionally, peo</title> 
   <description>&gt; Can&#039;t reproduce.  IMP tasks run fine.

Additionally, people on the list have reported that IMP tasks run fine - at least one person reported that the new autocreate login task is working for them.</description> 
   <pubDate>Tue, 24 May 2011 16:06:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65033</link> 
  </item> 
   
  <item> 
   <title>The first time IMP is pushApp()&#039;ed for me is on the portal p</title> 
   <description>The first time IMP is pushApp()&#039;ed for me is on the portal page. Horde_Block_Collection calls Horde_Registry::getAppDrivers() which calls pushApp() without passing any $options parameter. Thus $options[&#039;logintasks&#039;] is empty too and the login tasks section in pushApp() is skipped.</description> 
   <pubDate>Tue, 24 May 2011 16:51:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65039</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9767: E</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9767: Ensure that Horde login tasks are always run first

 5 files changed, 65 insertions(+), 50 deletions(-)
http://git.horde.org/horde-git/-/commit/c0e01ac0f7012ceba6fc20b4afc4ab656febffc9</description> 
   <pubDate>Wed, 25 May 2011 07:24:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65054</link> 
  </item> 
   
  <item> 
   <title>I think I correctly fixed this.</title> 
   <description>I think I correctly fixed this.</description> 
   <pubDate>Wed, 25 May 2011 07:25:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65055</link> 
  </item> 
   
  <item> 
   <title>Didn&#039;t make any difference for me.</title> 
   <description>Didn&#039;t make any difference for me.</description> 
   <pubDate>Wed, 25 May 2011 12:00:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65064</link> 
  </item> 
   
  <item> 
   <title>This works perfectly for me, so I can&#039;t debug anymore.</title> 
   <description>This works perfectly for me, so I can&#039;t debug anymore.</description> 
   <pubDate>Tue, 07 Jun 2011 05:32:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t65435</link> 
  </item> 
   
  <item> 
   <title>using git (30 September 2011) on my  test server this mornin</title> 
   <description>using git (30 September 2011) on my  test server this morning , login tasks did not run.
using IMP 5.0.11 and horde 4.0.9 on my production server, login tasks did run, but task renameSentmailMonthly  renamed &#039;Sent&#039; to &#039;Sent-01-1970&#039;.

So, I can I track this using git ? 
Here what I tried :

mysql&gt; delete from horde_prefs where pref_name=&#039;last_logintasks&#039;;
Login and go to IMP : pref last_logintasks = a:3:{s:5:&quot;_once&quot;;a:7:{i:0;s:45:&quot;turba_LoginTasks_SystemTask_UpgradeFromTurba2&quot;;i:1;s:40:&quot;turba_LoginTasks_SystemTask_UpgradePrefs&quot;;i:2;s:40:&quot;turba_LoginTasks_SystemTask_UpgradeLists&quot;;i:3;s:45:&quot;horde_LoginTasks_SystemTask_UpgradeFromHorde3&quot;;i:4;s:41:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4&quot;;i:5;s:45:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4Auth&quot;;i:6;s:43:&quot;ingo_LoginTasks_SystemTask_UpgradeFromIngo1&quot;;}s:5:&quot;horde&quot;;i:1317633346;s:3:&quot;imp&quot;;i:1317633358;} 

logout, change horde/imp unixtime to 1300633069

Login and go to IMP : pref last_logintasks = a:3:{s:5:&quot;_once&quot;;a:7:{i:0;s:45:&quot;turba_LoginTasks_SystemTask_UpgradeFromTurba2&quot;;i:1;s:40:&quot;turba_LoginTasks_SystemTask_UpgradePrefs&quot;;i:2;s:40:&quot;turba_LoginTasks_SystemTask_UpgradeLists&quot;;i:3;s:45:&quot;horde_LoginTasks_SystemTask_UpgradeFromHorde3&quot;;i:4;s:41:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4&quot;;i:5;s:45:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4Auth&quot;;i:6;s:43:&quot;ingo_LoginTasks_SystemTask_UpgradeFromIngo1&quot;;}s:5:&quot;horde&quot;;i:1317633635;s:3:&quot;imp&quot;;i:1300633069;}
</description> 
   <pubDate>Mon, 03 Oct 2011 09:32:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67856</link> 
  </item> 
   
  <item> 
   <title>Possibly fixed by:
http://git.horde.org/horde-git/-/commit/</title> 
   <description>Possibly fixed by:
http://git.horde.org/horde-git/-/commit/e842ca9374d9c5c98fa3e8e2c21373303c00f76e</description> 
   <pubDate>Tue, 04 Oct 2011 06:27:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67901</link> 
  </item> 
   
  <item> 
   <title>&gt; Possibly fixed by:
&gt; http://git.horde.org/horde-git/-/com</title> 
   <description>&gt; Possibly fixed by:
&gt; http://git.horde.org/horde-git/-/commit/e842ca9374d9c5c98fa3e8e2c21373303c00f76e

Nope, I&#039;ve update this morning and IMP task are still not running after login. 

last_logintasks after login :

a:3:{s:5:&quot;_once&quot;;a:7:{i:0;s:45:&quot;turba_LoginTasks_SystemTask_UpgradeFromTurba2&quot;;i:1;s:40:&quot;turba_LoginTasks_SystemTask_UpgradePrefs&quot;;i:2;s:40:&quot;turba_LoginTasks_SystemTask_UpgradeLists&quot;;i:3;s:45:&quot;horde_LoginTasks_SystemTask_UpgradeFromHorde3&quot;;i:4;s:41:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4&quot;;i:5;s:45:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4Auth&quot;;i:6;s:43:&quot;ingo_LoginTasks_SystemTask_UpgradeFromIngo1&quot;;}s:5:&quot;horde&quot;;i:1317715832;s:3:&quot;imp&quot;;i:1300633069;}


Is there an other pref (or pref backend setting)  for IMP ?
</description> 
   <pubDate>Tue, 04 Oct 2011 08:29:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67924</link> 
  </item> 
   
  <item> 
   <title>Not for me either. But now I get this fatal error after logg</title> 
   <description>Not for me either. But now I get this fatal error after logging in (with login tasks set to run on each login):

Fatal error: require() [function.require]: Failed opening required &#039;HORDE_TEMPLATES/common-header.inc&#039; (include_path=&#039;/var/www/headhorde/libs:/home/jan/horde-git/horde/lib:.:/usr/share/php:/usr/share/pear&#039;) in /home/jan/horde-git/horde/services/portal/index.php on line 44

Actually the original error is:

PHP ERROR: Use of undefined constant HORDE_TEMPLATES - assumed &#039;HORDE_TEMPLATES&#039; [pid 5489 on line 44 of &quot;/home/jan/horde-git/horde/services/portal/index.php&quot;]</description> 
   <pubDate>Tue, 04 Oct 2011 08:37:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67926</link> 
  </item> 
   
  <item> 
   <title>&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - ass</title> 
   <description>&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - assumed 
&gt; &#039;HORDE_TEMPLATES&#039; [pid 5489 on line 44 of 
&gt; &quot;/home/jan/horde-git/horde/services/portal/index.php&quot;]

&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - assumed 
&gt; &#039;HORDE_TEMPLATES&#039; [pid 5489 on line 44 of 
&gt; &quot;/home/jan/horde-git/horde/services/portal/index.php&quot;]

Don&#039;t see this.

And I am (again) out of ideas.  Because this works fine for me.  Here&#039;s the code flow:

1. User login
2. Load initial application (for me it is imp)
3. On first application pushApp(), logintasks are called.
4. Horde_Core_LoginTasks::runTasks() checks to see if Horde logintasks have been performed yet.
5. In this case, horde logintasks have NOT been performed, so Horde_Core_LoginTasks::runTasks() are run for Horde.
6. (Assuming here that there are no user interactive Horde logintasks), #5 is completed and the remainder of #4 is performed - namely, performing IMP logintasks.
7. (Assuming here that there are no user interactive IMP logintasks), logintasks are complete and control is passed back to pushApp() to continue initializing imp.

Someone will have to figure out where this chain is broken.</description> 
   <pubDate>Wed, 05 Oct 2011 19:53:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67963</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve added the following prefs to imp/config/prefs.local.php</title> 
   <description>I&#039;ve added the following prefs to imp/config/prefs.local.php 
$_prefs[&#039;rename_sentmail_monthly&#039;][&#039;value&#039;] = 1;
$_prefs[&#039;rename_sentmail_monthly&#039;][&#039;locked&#039;] = true;

Now, rename_sentmail_monthly task is running every time I login and pref last_logintasks is always like this :

a:3:{s:5:&quot;_once&quot;;a:7:{i:0;s:45:&quot;turba_LoginTasks_SystemTask_UpgradeFromTurba2&quot;;i:1;s:40:&quot;turba_LoginTasks_SystemTask_UpgradePrefs&quot;;i:2;s:40:&quot;turba_LoginTasks_SystemTask_UpgradeLists&quot;;i:3;s:45:&quot;horde_LoginTasks_SystemTask_UpgradeFromHorde3&quot;;i:4;s:41:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4&quot;;i:5;s:45:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4Auth&quot;;i:6;s:43:&quot;ingo_LoginTasks_SystemTask_UpgradeFromIngo1&quot;;}s:5:&quot;horde&quot;;i:1317887081;s:3:&quot;imp&quot;;i:1300633069;}

What should be the value of last_logintasks after login ?
How IMP&#039;s logintasks know about tasks that ran previously ?





</description> 
   <pubDate>Thu, 06 Oct 2011 08:42:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67966</link> 
  </item> 
   
  <item> 
   <title>
imp/lib/LoginTasks/Task/RenameSentmailMonthly.php : protec</title> 
   <description>
imp/lib/LoginTasks/Task/RenameSentmailMonthly.php : protected function _renameSentmailMonthly
    protected function _renameSentmailMonthly($folder)
    {
        // @TODO
        $last_maint = $GLOBALS[&#039;prefs&#039;]-&gt;getValue(&#039;last_maintenance&#039;);



What is pref &quot;last_maintenance&quot; for ?</description> 
   <pubDate>Thu, 06 Oct 2011 08:47:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67967</link> 
  </item> 
   
  <item> 
   <title>&gt; Fatal error: require() [function.require]: Failed opening </title> 
   <description>&gt; Fatal error: require() [function.require]: Failed opening required 
&gt; &#039;HORDE_TEMPLATES/common-header.inc&#039; 
&gt; (include_path=&#039;/var/www/headhorde/libs:/home/jan/horde-git/horde/lib:.:/usr/share/php:/usr/share/pear&#039;) in /home/jan/horde-git/horde/services/portal/index.php on line 
&gt; 44

I don&#039;t see this over here.</description> 
   <pubDate>Thu, 06 Oct 2011 10:24:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67972</link> 
  </item> 
   
  <item> 
   <title>&gt; Someone will have to figure out where this chain is broken</title> 
   <description>&gt; Someone will have to figure out where this chain is broken.

with the following patch, I get logintasks running and pref last_logintasks looks better :

a:3:{s:5:&quot;_once&quot;;a:7:{i:0;s:45:&quot;turba_LoginTasks_SystemTask_UpgradeFromTurba2&quot;;i:1;s:40:&quot;turba_LoginTasks_SystemTask_UpgradePrefs&quot;;i:2;s:40:&quot;turba_LoginTasks_SystemTask_UpgradeLists&quot;;i:3;s:45:&quot;horde_LoginTasks_SystemTask_UpgradeFromHorde3&quot;;i:4;s:41:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4&quot;;i:5;s:45:&quot;imp_LoginTasks_SystemTask_UpgradeFromImp4Auth&quot;;i:6;s:43:&quot;ingo_LoginTasks_SystemTask_UpgradeFromIngo1&quot;;}s:5:&quot;horde&quot;;i:1317895501;s:3:&quot;imp&quot;;i:1317895608;}


--- ../../../../git/horde/framework/LoginTasks/lib/Horde/LoginTasks/Tasklist.php	2011-09-12 08:51:58.000000000 +0200
+++ Tasklist.php	2011-10-06 12:09:49.000000000 +0200
@@ -131,7 +131,7 @@
         while (list(, $v) = each($this-&gt;_tasks)) {
             if (!$v-&gt;needsDisplay() ||
                 (!is_null($previous) &amp;&amp; !$v-&gt;joinDisplayWith($previous))) {
-                break;
+                continue;
             }
             $tmp[] = $v;
             $previous = $v;



</description> 
   <pubDate>Thu, 06 Oct 2011 10:25:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67973</link> 
  </item> 
   
  <item> 
   <title>&gt; imp/lib/LoginTasks/Task/RenameSentmailMonthly.php : protec</title> 
   <description>&gt; imp/lib/LoginTasks/Task/RenameSentmailMonthly.php : protected 
&gt; function _renameSentmailMonthly
&gt;     protected function _renameSentmailMonthly($folder)
&gt;     {
&gt;         // @TODO
&gt;         $last_maint = $GLOBALS[&#039;prefs&#039;]-&gt;getValue(&#039;last_maintenance&#039;);

Looks like this was never updated for H4.  Going to move this to a new ticket because it doesn&#039;t have anything to do with this report.</description> 
   <pubDate>Thu, 06 Oct 2011 17:22:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67974</link> 
  </item> 
   
  <item> 
   <title>&gt; with the following patch, I get logintasks running and pre</title> 
   <description>&gt; with the following patch, I get logintasks running and pref 
&gt; last_logintasks looks better :

This isn&#039;t correct.  needDisplay() returns the list of tasks to display on this page.  Your change will cause all tasks to be performed at one time, which is not correct.  E.g. the TOS task might be the first task in the chain, and no other tasks can or should be run until that task is complete.</description> 
   <pubDate>Thu, 06 Oct 2011 17:24:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67975</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; with the following patch, I get logintasks running and pr</title> 
   <description>&gt;&gt; with the following patch, I get logintasks running and pref
&gt;&gt; last_logintasks looks better :
&gt;
&gt; This isn&#039;t correct.  needDisplay() returns the list of tasks to 
&gt; display on this page.  Your change will cause all tasks to be 
&gt; performed at one time, which is not correct.  E.g. the TOS task might 
&gt; be the first task in the chain, and no other tasks can or should be 
&gt; run until that task is complete.

Then, I don&#039;t understand.

After having updated now from git, I have added horde::debug($this-&gt;_tasks) to libs/Horde/LoginTasks/Tasklist.php:130 just before the &quot;while&quot; loop.

attached is the log file.
from what I can see, the first element of $this-&gt;_tasks always has display = DISPLAY_NONE, so a task like RenameSentmailMonthly never gets displayed.


Maybe you&#039;ll see something wrong from the debug log file ?

</description> 
   <pubDate>Fri, 07 Oct 2011 12:21:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67988</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - as</title> 
   <description>&gt;&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - assumed
&gt;&gt; &#039;HORDE_TEMPLATES&#039; [pid 5489 on line 44 of
&gt;&gt; &quot;/home/jan/horde-git/horde/services/portal/index.php&quot;]
&gt;
&gt;&gt; PHP ERROR: Use of undefined constant HORDE_TEMPLATES - assumed
&gt;&gt; &#039;HORDE_TEMPLATES&#039; [pid 5489 on line 44 of
&gt;&gt; &quot;/home/jan/horde-git/horde/services/portal/index.php&quot;]
&gt;
&gt; Don&#039;t see this.
&gt;
&gt; And I am (again) out of ideas.  Because this works fine for me.  
&gt; Here&#039;s the code flow:
&gt;
&gt; 1. User login
&gt; 2. Load initial application (for me it is imp)
&gt; 3. On first application pushApp(), logintasks are called.
&gt; 4. Horde_Core_LoginTasks::runTasks() checks to see if Horde 
&gt; logintasks have been performed yet.
&gt; 5. In this case, horde logintasks have NOT been performed, so 
&gt; Horde_Core_LoginTasks::runTasks() are run for Horde.
&gt; 6. (Assuming here that there are no user interactive Horde 
&gt; logintasks), #5 is completed and the remainder of #4 is performed - 
&gt; namely, performing IMP logintasks.
&gt; 7. (Assuming here that there are no user interactive IMP logintasks), 
&gt; logintasks are complete and control is passed back to pushApp() to 
&gt; continue initializing imp.
&gt;
&gt; Someone will have to figure out where this chain is broken.

After updating this morning, I don&#039;t see those errors anymore. But I tried to further track down why the login tasks are never run for me. And it turns out that the code to run the tasks at the bottom of pushApp() is never reached, because neither horde or imp are ever pushed with $checkPerms being true. My current authentication is setup is LDAP auth in Horde and hordeauth in IMP.</description> 
   <pubDate>Fri, 07 Oct 2011 14:07:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t67989</link> 
  </item> 
   
  <item> 
   <title>&gt; And it turns out that the code to run the tasks at the bot</title> 
   <description>&gt; And it turns out that the code to run the tasks at the bottom of 
&gt; pushApp() is never reached, because neither horde or imp are ever 
&gt; pushed with $checkPerms being true. My current authentication is 
&gt; setup is LDAP auth in Horde and hordeauth in IMP.

I definitely don&#039;t see this, and this is troubling because this means that the system tasks will never be run either.  So determining why this isn&#039;t happening on your system is a critical issue.</description> 
   <pubDate>Mon, 10 Oct 2011 04:34:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68035</link> 
  </item> 
   
  <item> 
   <title>&gt; After having updated now from git, I have added 
&gt; horde:</title> 
   <description>&gt; After having updated now from git, I have added 
&gt; horde::debug($this-&gt;_tasks) to libs/Horde/LoginTasks/Tasklist.php:130 
&gt; just before the &quot;while&quot; loop.
&gt;
&gt; attached is the log file.

Looks like you put the debug statement in the wrong location.  From your debug log:

6. Horde::debug() /var/www/html/hordetest/libs/Horde/LoginTasks/Tasklist.php:102

You put the debug statement on line 102, in the ready() method (not the needDisplay() method on line 130).

FWIW, your debug log looks exactly as expected.</description> 
   <pubDate>Mon, 10 Oct 2011 04:38:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68036</link> 
  </item> 
   
  <item> 
   <title>more debug attached with the following patch :

--- Regist</title> 
   <description>more debug attached with the following patch :

--- Registry.org.php	2011-10-07 13:46:34.000000000 +0200
+++ Registry.php	2011-10-10 09:26:13.000000000 +0200
@@ -1367,12 +1367,16 @@
             } catch (Exception $e) {}
         }
 
+        horde::debug($checkPerms);
+        horde::debug($options);
         /* Do login tasks. */
         if ($checkPerms &amp;&amp;
             ($tasks = $GLOBALS[&#039;injector&#039;]-&gt;getInstance(&#039;Horde_Core_Factory_LoginTasks&#039;)-&gt;create($app)) &amp;&amp;
             !empty($options[&#039;logintasks&#039;])) {
+            horde::debug($tasks);
             $tasks-&gt;runTasks();
         }
+        horde::debug($tasks);
 
         return true;
     }


looks like whenever $options[&#039;logintasks&#039;] is true, there are pretty much no task to be ran.

IMP prefs :
$_prefs[&#039;delete_attachments_monthly&#039;][&#039;value&#039;] = 0;
$_prefs[&#039;rename_sentmail_monthly&#039;][&#039;value&#039;] = 1;
$_prefs[&#039;delete_sentmail_monthly&#039;][&#039;value&#039;] = 1;
$_prefs[&#039;delete_sentmail_monthly_keep&#039;][&#039;value&#039;] = 12;


Horde config:
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;app&#039;] = &#039;imp&#039;;
$conf[&#039;auth&#039;][&#039;driver&#039;] = &#039;application&#039;;
$conf[&#039;auth&#039;][&#039;alternate_login&#039;] = false;
$conf[&#039;auth&#039;][&#039;redirect_on_logout&#039;] = false;
$conf[&#039;prefs&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
$conf[&#039;prefs&#039;][&#039;driver&#039;] = &#039;Sql&#039;;
$conf[&#039;sql&#039;][&#039;phptype&#039;] = &#039;mysql&#039;;

$_prefs[&#039;initial_application&#039;][&#039;value&#039;] = &#039;horde&#039;,
</description> 
   <pubDate>Mon, 10 Oct 2011 07:55:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68041</link> 
  </item> 
   
  <item> 
   <title>These are the scenarios where I see pushApp() being called d</title> 
   <description>These are the scenarios where I see pushApp() being called during the login/portal loading process (Horde tasks are run fine btw, only IMP tasks don&#039;t run):
- During the instantiation of the Notification system when calling back setupNotification(). This passes &#039;noperms&#039; =&gt; true to the callAppMethod(), &#039;check_perms&#039; =&gt; false to pushApp(), $checkPerms =&gt; false in pushApp().
- During portal block loading of the portal. This passes &#039;logintasks&#039; =&gt; false to pushApp().
</description> 
   <pubDate>Mon, 10 Oct 2011 10:24:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68048</link> 
  </item> 
   
  <item> 
   <title>&gt; - During the instantiation of the Notification system when</title> 
   <description>&gt; - During the instantiation of the Notification system when calling 
&gt; back setupNotification(). This passes &#039;noperms&#039; =&gt; true to the 
&gt; callAppMethod(), &#039;check_perms&#039; =&gt; false to pushApp(), $checkPerms =&gt; 
&gt; false in pushApp().

This doesn&#039;t seem correct.  If an application is not yet authenticated to, this should not be run.

&gt; - During portal block loading of the portal. This passes &#039;logintasks&#039; 
&gt; =&gt; false to pushApp().

At a minimum, this should still run the system tasks though.  Can you verify this is happening?

And at *some point*, logintasks need to be run (meaning the code at the bottom of pushApp()).  Since an appInit() will always call pushApp() without setting check_perms as false.</description> 
   <pubDate>Tue, 11 Oct 2011 04:30:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68083</link> 
  </item> 
   
  <item> 
   <title>This debug log looks fine.  (I am assuming you are concerned</title> 
   <description>This debug log looks fine.  (I am assuming you are concerned about IMP, since you gave me IMP configuration options).

The first time IMP is accessed via an API/Registry call and check_perms is true, the 1 IMP system task is run.  The remaining 4 login tasks are queued, as expected.  According to your debug log - you NEVER explicitly accessed IMP.  IMP login tasks will not be run until you explicitly access the application.  This is expected (this is what differentiates SystemTasks from regular Tasks).</description> 
   <pubDate>Tue, 11 Oct 2011 04:41:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68084</link> 
  </item> 
   
  <item> 
   <title>FWIW, the first time I&#039;ve seen maintenance tasks running in </title> 
   <description>FWIW, the first time I&#039;ve seen maintenance tasks running in H4 in ages (I didn&#039;t even know they are displayed in the login form now), was when the upgrade tasks for the mailbox prefs were triggered.</description> 
   <pubDate>Tue, 01 Nov 2011 09:26:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68478</link> 
  </item> 
   
  <item> 
   <title>&gt; FWIW, the first time I&#039;ve seen maintenance tasks running i</title> 
   <description>&gt; FWIW, the first time I&#039;ve seen maintenance tasks running in H4 in 
&gt; ages (I didn&#039;t even know they are displayed in the login form now), 
&gt; was when the upgrade tasks for the mailbox prefs were triggered.

That&#039;s a system task, not a regular task, so I&#039;m not sure what this means in the overall scheme of things (are things getting better?  worse?)

Here&#039;s a quick test script you can drop into imp/lib/LoginTasks/Task/Test.php that will output a notification if it is accessed on any given login:

&lt;?php
class IMP_LoginTasks_Task_Test extends Horde_LoginTasks_Task
{
    public $display = Horde_LoginTasks::DISPLAY_NONE;
    public $interval = Horde_LoginTasks::EVERY;

    public function execute()
    {
        $GLOBALS[&#039;notification&#039;]-&gt;push(&#039;Test task executed&#039;, &#039;horde.message&#039;);
    }
}</description> 
   <pubDate>Tue, 01 Nov 2011 18:40:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68484</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; FWIW, the first time I&#039;ve seen maintenance tasks running </title> 
   <description>&gt;&gt; FWIW, the first time I&#039;ve seen maintenance tasks running in H4 in
&gt;&gt; ages (I didn&#039;t even know they are displayed in the login form now),
&gt;&gt; was when the upgrade tasks for the mailbox prefs were triggered.
&gt;
&gt; That&#039;s a system task, not a regular task, so I&#039;m not sure what this 
&gt; means in the overall scheme of things (are things getting better?  
&gt; worse?)

Neither. But for some reason this system task seemed to have triggered the regular login tasks too. This was just a one time thing.

&gt; Here&#039;s a quick test script you can drop into 
&gt; imp/lib/LoginTasks/Task/Test.php that will output a notification if 
&gt; it is accessed on any given login:

I already have one login task configured to run on every login, but I&#039;ll try this one nonetheless.</description> 
   <pubDate>Tue, 01 Nov 2011 22:07:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68495</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Here&#039;s a quick test script you can drop into
&gt;&gt; imp/lib/</title> 
   <description>&gt;&gt; Here&#039;s a quick test script you can drop into
&gt;&gt; imp/lib/LoginTasks/Task/Test.php that will output a notification if
&gt;&gt; it is accessed on any given login:
&gt;
&gt; I already have one login task configured to run on every login, but 
&gt; I&#039;ll try this one nonetheless.

Yeah, it&#039;s not being run by either Horde or IMP doing authentication.</description> 
   <pubDate>Tue, 01 Nov 2011 22:12:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68496</link> 
  </item> 
   
  <item> 
   <title>Here&#039;s another few things I found.

If using Horde authent</title> 
   <description>Here&#039;s another few things I found.

If using Horde authentication, and executing IMP for the first time, the login tasks code is triggered. But the logic in Horde_LoginTasks_Tasklist#ready() (called from Horde_LoginTasks#runTasks()) is not correct. When it is executed, there is one system task and four login tasks in my case. Because of the system task $tmp&#039;s count is 1. While iterating over the standard tasks, the loop exits immediately because the first task (purge trash) return $v-&gt;needsDisplay() true. $advance is also true, so the first task (purge trash) is removed from the task list (line 111). Only the system task is returned.

At the bottom of runTasks() $this-&gt;_tasklist-&gt;needDisplay() is executed. It returns false (or array() really) because the next task in the list doesn&#039;t need a confirmation (it&#039;s the Test login task from your earlier comment). Thus runTasks() simply returns and so does pushApp(). I&#039;m not redirected to the confirmation screen again.

Side note: the system task is always executed because it&#039;s triggered on 5.0.15, so it&#039;s running on every login while the current version is 5.0.15. Not sure if this is intended.</description> 
   <pubDate>Tue, 01 Nov 2011 22:50:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68499</link> 
  </item> 
   
  <item> 
   <title>Fun note: the test task is then run on each and every ajax r</title> 
   <description>Fun note: the test task is then run on each and every ajax request. :)</description> 
   <pubDate>Tue, 01 Nov 2011 22:52:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68500</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9767: F</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9767: Fix setting pointer if system tasks are also run

 1 files changed, 5 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/4348780c76de42a285a70963c95a1275bf193a81</description> 
   <pubDate>Tue, 01 Nov 2011 23:21:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68504</link> 
  </item> 
   
  <item> 
   <title>&gt; Here&#039;s another few things I found.
&gt;
&gt; If using Horde au</title> 
   <description>&gt; Here&#039;s another few things I found.
&gt;
&gt; If using Horde authentication, and executing IMP for the first time, 
&gt; the login tasks code is triggered. But the logic in 
&gt; Horde_LoginTasks_Tasklist#ready() (called from 
&gt; Horde_LoginTasks#runTasks()) is not correct. When it is executed, 
&gt; there is one system task and four login tasks in my case. Because of 
&gt; the system task $tmp&#039;s count is 1. While iterating over the standard 
&gt; tasks, the loop exits immediately because the first task (purge 
&gt; trash) return $v-&gt;needsDisplay() true. $advance is also true, so the 
&gt; first task (purge trash) is removed from the task list (line 111). 
&gt; Only the system task is returned.

This should be fixed.

&gt; At the bottom of runTasks() $this-&gt;_tasklist-&gt;needDisplay() is 
&gt; executed. It returns false (or array() really) because the next task 
&gt; in the list doesn&#039;t need a confirmation (it&#039;s the Test login task 
&gt; from your earlier comment). Thus runTasks() simply returns and so 
&gt; does pushApp(). I&#039;m not redirected to the confirmation screen again.

The only thing on my system that is weird is that I have a &#039;last_logintasks&#039; cached prefs entry for *imp*, even though imp doesn&#039;t have a last_logintasks pref.  So not sure if this is part of the issue.

&gt; Side note: the system task is always executed because it&#039;s triggered 
&gt; on 5.0.15, so it&#039;s running on every login while the current version 
&gt; is 5.0.15. Not sure if this is intended.

It will trigger on every login if running git (since 5.0.15-git is determined to be less than 5.0.15).  Don&#039;t know how else to handle this - the problem would be if we add another upgrade task prior to releasing the version, git people would never run this task.</description> 
   <pubDate>Tue, 01 Nov 2011 23:21:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68505</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Here&#039;s another few things I found.
&gt;&gt;
&gt;&gt; If using Horde</title> 
   <description>&gt;&gt; Here&#039;s another few things I found.
&gt;&gt;
&gt;&gt; If using Horde authentication, and executing IMP for the first time,
&gt;&gt; the login tasks code is triggered. But the logic in
&gt;&gt; Horde_LoginTasks_Tasklist#ready() (called from
&gt;&gt; Horde_LoginTasks#runTasks()) is not correct. When it is executed,
&gt;&gt; there is one system task and four login tasks in my case. Because of
&gt;&gt; the system task $tmp&#039;s count is 1. While iterating over the standard
&gt;&gt; tasks, the loop exits immediately because the first task (purge
&gt;&gt; trash) return $v-&gt;needsDisplay() true. $advance is also true, so the
&gt;&gt; first task (purge trash) is removed from the task list (line 111).
&gt;&gt; Only the system task is returned.
&gt;
&gt; This should be fixed.

Awesome. I think I have maintenance tasks running correctly for the first time since using Horde in production. :-D I only wonder why I was the only one experiencing (or noticing) this.
Thanks for the patience!

&gt;&gt; At the bottom of runTasks() $this-&gt;_tasklist-&gt;needDisplay() is
&gt;&gt; executed. It returns false (or array() really) because the next task
&gt;&gt; in the list doesn&#039;t need a confirmation (it&#039;s the Test login task
&gt;&gt; from your earlier comment). Thus runTasks() simply returns and so
&gt;&gt; does pushApp(). I&#039;m not redirected to the confirmation screen again.
&gt;
&gt; The only thing on my system that is weird is that I have a 
&gt; &#039;last_logintasks&#039; cached prefs entry for *imp*, even though imp 
&gt; doesn&#039;t have a last_logintasks pref.  So not sure if this is part of 
&gt; the issue.

This seems to work just fine now too.

&gt;&gt; Side note: the system task is always executed because it&#039;s triggered
&gt;&gt; on 5.0.15, so it&#039;s running on every login while the current version
&gt;&gt; is 5.0.15. Not sure if this is intended.
&gt;
&gt; It will trigger on every login if running git (since 5.0.15-git is 
&gt; determined to be less than 5.0.15).  Don&#039;t know how else to handle 
&gt; this - the problem would be if we add another upgrade task prior to 
&gt; releasing the version, git people would never run this task.

Okay, so we &quot;only&quot; need to make sure the upgrade tasks can be run several times without damaging anything. This need to be documented anywhere. Probably in each individual task file, so you notice this when copy-and-pasting from existing tasks.</description> 
   <pubDate>Tue, 01 Nov 2011 23:37:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68511</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9767: F</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9767: Fix advancing tasks pointer if system tasks also exist for an application

 1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/99d2e2d65314ce6b66c047890e5ee6b32faf9c7b</description> 
   <pubDate>Wed, 02 Nov 2011 00:09:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68515</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9767: N</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9767: Note about upgrade tasks for git checkouts

 1 files changed, 4 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/b38e2197fcd39f69494590bcd9e195e016ccbaab</description> 
   <pubDate>Wed, 02 Nov 2011 00:09:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68516</link> 
  </item> 
   
  <item> 
   <title>&gt; Okay, so we &quot;only&quot; need to make sure the upgrade tasks can</title> 
   <description>&gt; Okay, so we &quot;only&quot; need to make sure the upgrade tasks can be run 
&gt; several times without damaging anything. This need to be documented 
&gt; anywhere. Probably in each individual task file, so you notice this 
&gt; when copy-and-pasting from existing tasks.

Added to the base upgrade file.</description> 
   <pubDate>Wed, 02 Nov 2011 00:09:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68517</link> 
  </item> 
   
  <item> 
   <title>using git, it worked like a charm this morning.

Thanks.
</title> 
   <description>using git, it worked like a charm this morning.

Thanks.
</description> 
   <pubDate>Wed, 02 Nov 2011 08:56:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9767#t68519</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
