6.0.0-beta1
7/10/25

[#13657] Can't remove activesync device: JS error
Summary Can't remove activesync device: JS error
Queue Horde Base
Queue Version 5.2.2
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester software-horde (at) interfasys (dot) ch
Created 11/01/2014 (3904 days ago)
Due
Updated 11/09/2014 (3896 days ago)
Assigned 11/07/2014 (3898 days ago)
Resolved 11/09/2014 (3896 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/09/2014 07:19:54 PM software-horde (at) interfasys (dot) ch Comment #18 Reply to this comment
Horde 5.2.3
Thank you!
11/09/2014 07:05:16 PM Michael Rubinsky Comment #17
State ⇒ Resolved
Reply to this comment
Horde 5.2.3
11/09/2014 07:02:01 PM Git Commit Comment #16 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 6b54414787e96f6028bf36eb5d40d2d941fa640c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sun Nov 9 13:57:51 2014 -0500

     Bug: 13657  Fix user activesync client actions.

     Conflicts:
             horde/lib/Prefs/Special/Activesync.php

  horde/lib/Prefs/Special/Activesync.php |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/6b54414787e96f6028bf36eb5d40d2d941fa640c
11/09/2014 06:58:53 PM Git Commit Comment #15 Reply to this comment
Changes have been made in Git (master):

commit e3c6d57fb64bba712e60b964462e6786cbe67c67
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sun Nov 9 13:57:51 2014 -0500

     Bug: 13657  Fix user activesync client actions.

  horde/lib/Prefs/Special/Activesync.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/e3c6d57fb64bba712e60b964462e6786cbe67c67
11/07/2014 03:55:56 PM Michael Rubinsky Comment #14 Reply to this comment
My apologies, it looks like it was changed to master by Michael S. 
when he reassigned the ticket to the correct queue.

Anyway, I'll take a look again when I have time.
11/07/2014 03:54:37 PM Michael Rubinsky Comment #13
Version ⇒ 5.2.2
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment
There is a drop down when you create the ticket to indicate the 
application version.

I'll take a look again when I have time now that I know what version 
to look at.
11/07/2014 03:25:02 PM software-horde (at) interfasys (dot) ch Comment #12 Reply to this comment
Well, if you are not using master, then why did you select Git 
master as the version in use?

Are you using GIt master, FW_5_2, or pear?
I'm not sure I did according to the ticket log, but if I did I've made 
a mistake.

I'm using PEAR.
11/07/2014 03:08:03 PM Michael Rubinsky Comment #11 Reply to this comment
Well, if you are not using master, then why did you select Git master 
as the version in use?

Are you using GIt master, FW_5_2, or pear?
11/07/2014 08:27:31 AM software-horde (at) interfasys (dot) ch Comment #10 Reply to this comment
horde/templates/activesync/device_table.html.php - where you can 
clearly see it is using only the device name.
Only in master.

In the 5.2 branch, the user is appended.
https://github.com/horde/horde/blob/FRAMEWORK_5_2/horde/templates/activesync/device_table.html.php

<input class="horde-delete" type="button" value="<?php echo 
_("Remove") ?>" id="remove_<?php echo $d->id . ':' . $d->user ?>" 
/><br />

That was to fix bug 13336, so that the delete button would delete the 
proper device+account association
https://github.com/horde/horde/commit/01b26397a1668fa25e2849f6b3b4710678544bf8
11/07/2014 01:35:16 AM Michael Rubinsky Comment #9 Reply to this comment
You don't have a activesync_device_modify hook set, do you?
11/07/2014 01:30:35 AM Michael Rubinsky Comment #8 Reply to this comment
Still can't reproduce this. I don't have the username appended to the 
device id as you do. I have no idea where that is coming from.  Does 
the device list show the username as part of the device id also?  The 
html for the device list and the buttons is built in 
horde/templates/activesync/device_table.html.php - where you can 
clearly see it is using only the device name.
11/06/2014 11:30:15 PM software-horde (at) interfasys (dot) ch Comment #7 Reply to this comment
And I should have started with that... This is on the user side, not 
the admin side.
11/06/2014 11:28:26 PM software-horde (at) interfasys (dot) ch Comment #6 Reply to this comment
Reformatting
id = "remove_ABCD1234:my.user@domain.tld"
id.substr(7) = "ABCD1234:my.user@domain.tld"
devices {
     ABCD1234 {
         id: ABCD1234
         user:my.user@domain.tld
     }
}

"ABCD1234:my.user@domain.tld" does not exist in devices
11/06/2014 11:25:50 PM software-horde (at) interfasys (dot) ch Comment #5 Reply to this comment
The JS specific to the activesync stuff is in horde/js/activesyncprefs.js
Thanks.

I've checked the javascript and it can't work.

$('removedevice').setValue(this.devices[id.substr(7)].id);

id: remove_ABCD1234:my.user@domain.tld
[id.substr(7): ABCD1234:my.user@domain.tld
devices {ABCD1234}

ABCD1234:my.user@domain.tld does not exist in devices

It used to work, so some recent changes must have added the user after 
the id in the HTML code for the button.





11/06/2014 10:43:03 PM Michael Rubinsky Comment #4 Reply to this comment
The JS specific to the activesync stuff is in horde/js/activesyncprefs.js
11/06/2014 09:06:22 PM software-horde (at) interfasys (dot) ch Comment #3 Reply to this comment
Cannot reproduce. Try updating Chrome.
Just tried on Firefox. Same problem.

I've cleared all caches and deleted all static files and still nothing...

Which files is responsible for the JS on that page?
11/03/2014 03:14:34 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Cannot reproduce. Try updating Chrome.
11/02/2014 11:50:45 PM Michael Slusarz Version ⇒ Git master
Queue ⇒ Horde Base
 
11/01/2014 01:52:08 PM software-horde (at) interfasys (dot) ch Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Can't remove activesync device: JS error
Type ⇒ Bug
Queue ⇒ IMP
Reply to this comment
services/prefs.php?app=horde&group=activesync
On Chromium 33

It's impossible to remove a device.

The JS log says
Uncaught TypeError: Cannot read property 'id' of undefined
Uncaught TypeError: Cannot call method 'startsWith' of null

The HTML seems correct, so there must be a JS error somewhere
<input class="horde-delete" type="button" value="Remove" 
id="remove_BBALPHA:user@domain.tld">


Saved Queries