6.0.0-beta1
7/18/25

[#6770] Nag task lists over WebDAV don't work
Summary Nag task lists over WebDAV don't work
Queue Nag
Queue Version 2.2
Type Bug
State Resolved
Priority 2. Medium
Owners bklang (at) horde (dot) org, jan (at) horde (dot) org
Requester bb (at) apc (dot) ag
Created 05/28/2008 (6260 days ago)
Due
Updated 07/09/2008 (6218 days ago)
Assigned 05/29/2008 (6259 days ago)
Resolved 07/09/2008 (6218 days ago)
Github Issue Link
Github Pull Request
Milestone 2.2.1
Patch No

History
07/09/2008 09:59:32 PM Jan Schneider Comment #20
State ⇒ Resolved
Reply to this comment
Really nice work guys! Correct analysis, correct fix, working patch. A 
bug report for the hall of fame.
07/09/2008 09:56:51 PM CVS Commit Comment #19 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/nag/lib/api.php?r1=1.188&r2=1.189&ty=u
06/27/2008 10:35:41 AM bb (at) apc (dot) ag Comment #18 Reply to this comment
After doing that, you can remove the patch from line 605, setting ''
to existing->parent, am i right - it works fine here without.
yes, I removed that.



There's also an iCal import function that uses ->parent instead of 
parent_id, too. I assume that function must also be changed.
06/27/2008 10:31:41 AM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #17
New Attachment: api.php.patch Download
Reply to this comment
Here a patchfile.
06/27/2008 10:23:26 AM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #16 Reply to this comment
_modify and _add needs this $task->parent_id fix.

After doing that, you can remove the patch from line 605, setting '' 
to existing->parent, am i right - it works fine here without.




06/27/2008 10:16:44 AM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #15 Reply to this comment
lol - nice ;-) i wanted to write the same, that driver.php uses 
"parent_id" and api.php "parent" - should have known that, i may have 
used my time to track down this annoying VALARM problem ^^.
06/27/2008 10:07:42 AM bb (at) apc (dot) ag Comment #14 Reply to this comment
I finally tracked the subtask problem and solved it.



In Driver.php, fromiCalendar($vTodo) reads the parent_id from the 
vTodo file and returns that in parent_id. However, line 619 of api.php 
uses the parent property for saving, not parent_id. Modifying that 
line in this way:



                         isset($task->parent_id) ? $task->parent_id : 
$existing->parent_id,



solves saving subtasks from Kontact.



I tested all cases (creating new task in Horde and in Kontact, editing 
existing ones) without error messages or the tasks getting out of 
sync. So I propose this change to be made in CVS.
06/27/2008 09:57:36 AM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #13 Reply to this comment
Looked at the ics contact uploads and it looks fine - is does have 
RELATED-TO fields pointing to the parent.

Looked at the sql queries done and there is no parent set where 
subtasks are added. I guess on the way from parsing (the parent is set 
in the parser, did some logging) to persisting it, the parent gets 
lost, but i don't know where yet.
06/27/2008 08:58:19 AM bb (at) apc (dot) ag Comment #12 Reply to this comment
OK, I have a new solution for the subtask problem.



Inserted on line 605 of nag/lib/api.php:



                     //apc: avoid NOT NULL constraint of the database

                     if (! $existing->parent) $existing->parent = '';



and reverted the old change.



Creating tasks and subtasks works; they are displayed correctly (with 
hierarchy) in Kontact but when I change something there, the hierarchy 
is broken. I suspect that the problem is with Kontact because it 
didn't work in -RC3, either. I'll try to track this down further.
06/26/2008 03:25:37 PM Jan Schneider Comment #11 Reply to this comment
Whats missing: Nag still displays the wrong abonnent url, the "user"
part is missing - you have to add this by hand for now.
This had been fixed in CVS already.
06/26/2008 03:10:04 PM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #10 Reply to this comment
To clarify things:



Used your patch and now i can subsribe to the tasklist.

Adding tasks and subtasks works fine with webinterface.

Adding them via webdav is broken with some the null-constraint message 
below, the workaround provided by bb@apc.ag can not be used, subtasks 
are broken than.
06/26/2008 02:54:07 PM Ben Klang Comment #9 Reply to this comment
Apllied the patch, but now i got:

The method "browse" is not defined in the API for nag. [pid 4870 on
line 361 of "/var/www/test1/horde/lib/Horde/RPC/webdav.php"]
Sometimes I have seen this if I change the file in the middle of a 
session.  I would suggest you log out and start a new session.  It 
also would not hurt to check the filesystem permissions as sometimes 
patching or CVS updating can "adjust" them for you.
06/26/2008 02:53:52 PM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #8 Reply to this comment
Forget my last comment, solved by correcting file ownership after patching ;).



Whats missing: Nag still displays the wrong abonnent url, the "user" 
part is missing - you have to add this by hand for now.



And the patch with "existing->parent" is needed to create new "Root" 
tasks, but it breaks creation of subtasks, so this is not solved yet.
06/26/2008 02:36:59 PM bb (at) apc (dot) ag Comment #7 Reply to this comment
Thanks! This fixes loading the .ics file in Kontact for me, and also 
saving new entries onto the server. Editing existing entries and 
publishing that to the server doesn't work, I get "Access denied when 
uploading .....ics".



This is in the horde log:



DB Error: null value violates not-null constraint: UPDATE nag_tasks 
SET task_creator = 'bb',  task_assignee = 'MAILTO:bb',  task_name = 
'Teste Nag@baby',  task_desc = 'Mehrzeilige



Beschreibung



mit neuem Text',  task_start = 1214431200,  task_due = 0,   
task_priority = 5,  task_estimate = '0.00',  task_completed = 0,   
task_completed_date = 0,  task_category = '',  task_alarm = 0,   
task_parent = NULL,  task_private = 0 WHERE task_owner = 'bb' AND 
task_id = 'fe4b7e6e2d4e367ea68f036b72c1bfc0' [nativecode=ERROR:  null 
value in column "task_parent" violates not-null constraint] [pid 5176 
on line 280 of 
"/home/bb/src/groupware/horde/horde-webmail-1.1.1/nag/lib/Driver/sql.php"]



All the other entries in the DB have task_parent = '' but not NULL.



So I changed line 619 of nag/lib/api.php from



                         isset($task->parent) ? $task->parent : 
$existing->parent,

to:

                         isset($task->parent) ? $task->parent : '',



and now it seems to work.



Thank you for fixing this!
06/26/2008 02:33:49 PM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #6 Reply to this comment
Apllied the patch, but now i got:



The method "browse" is not defined in the API for nag. [pid 4870 on 
line 361 of "/var/www/test1/horde/lib/Horde/RPC/webdav.php"]


06/26/2008 01:45:02 PM Ben Klang Comment #5 Reply to this comment
Whoops, there I go updating the wrong bug again...



Please try what I just committed to CVS.  Two features have been

fixed:  the ability to download .ics files and the ability to browse

within tasklists.



http://cvs.horde.org/diff.php/nag/lib/api.php?r1=1.183&r2=1.184&ty=u
06/26/2008 09:28:03 AM tkrah (at) fachschaft (dot) imn (dot) htwk-leipzig (dot) de Comment #4 Reply to this comment
I can confirm this bug.

The mentioned workaround wont work correct when it comes to uploading 
and does not confirm to the url nag tolds to use.

Any progress here to get it working?
06/25/2008 04:49:21 PM jesus (dot) couto (at) gmail (dot) com Comment #3 Reply to this comment

[Show Quoted Text - 10 lines]
I can confirm that it doesnt work under 2.2. Temporal fix? I changed 
nag/lib/api.php to the 2.2_RC2 versions and now it "works"...


06/25/2008 09:35:49 AM Jan Schneider Milestone ⇒ 2.2.1
 
06/25/2008 09:35:30 AM Jan Schneider Comment #2 Reply to this comment
Bug #6947 has some additional information.
05/29/2008 10:59:59 PM Chuck Hagenbuch Assigned to Ben Klang
Assigned to Jan Schneider
State ⇒ Assigned
 
05/28/2008 02:17:53 PM bb (at) apc (dot) ag Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Nag task lists over WebDAV don't work
Type ⇒ Bug
Queue ⇒ Nag
Reply to this comment
Somewhere between 2.2 RC3 and 2.2 final this feature stopped working.



I made a clean 2.2 installation on a test server and tried to access 
the /nag/user/user.ics (and /nag/user.ics) files using Kontact and 
curl. In both cases, no content is given back; the right URL gives 200 
and 'HORDE [error] [horde] Invalid tasklist requested. [pid 28497 on 
line 361 of 
"/home/bb/src/groupware/horde/horde-webmail-1.1/lib/Horde/RPC/webdav.php"]' in 
the log; the wrong one gives 404.


Saved Queries