6.0.0-git
2021-01-18

[#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 2014-11-01 (2270 days ago)
Due
Updated 2014-11-09 (2262 days ago)
Assigned 2014-11-07 (2264 days ago)
Resolved 2014-11-09 (2262 days ago)
Milestone
Patch No

History
2014-11-09 19:19:54 software-horde (at) interfasys (dot) ch Comment #18 Reply to this comment
Horde 5.2.3
Thank you!
2014-11-09 19:05:16 Michael Rubinsky Comment #17
State ⇒ Resolved
Reply to this comment
Horde 5.2.3
2014-11-09 19:02:01 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
2014-11-09 18:58:53 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
2014-11-07 15:55:56 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.
2014-11-07 15:54:37 Michael Rubinsky Comment #13
Assigned to Michael Rubinsky
State ⇒ Assigned
Version ⇒ 5.2.2
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.
2014-11-07 15:25:02 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.
2014-11-07 15:08:03 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?
2014-11-07 08:27:31 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
2014-11-07 01:35:16 Michael Rubinsky Comment #9 Reply to this comment
You don't have a activesync_device_modify hook set, do you?
2014-11-07 01:30:35 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.
2014-11-06 23:30:15 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.
2014-11-06 23:28:26 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
2014-11-06 23:25:50 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.





2014-11-06 22:43:03 Michael Rubinsky Comment #4 Reply to this comment
The JS specific to the activesync stuff is in horde/js/activesyncprefs.js
2014-11-06 21:06:22 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?
2014-11-03 15:14:34 Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Cannot reproduce. Try updating Chrome.
2014-11-02 23:50:45 Michael Slusarz Version ⇒ Git master
Queue ⇒ Horde Base
 
2014-11-01 13:52:08 software-horde (at) interfasys (dot) ch Comment #1
Type ⇒ Bug
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Can't remove activesync device: JS error
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
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