SOGo | BTS

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001509SOGoWeb Preferencespublic2011-11-23 03:342012-01-30 14:59
Reporterfels 
Assigned Tofrancis 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.3.9 
Target VersionFixed in Version1.3.12 
Summary0001509: UIxPreferences.js, unable to save prefs
DescriptionWith version 1.3.9, I was unable to save prefs for some users,
I adjusted UIxPreferences.js as follows, and everything was fine:


# diff UIxPreferences.js.orig UIxPreferences.js
77,79c77,81
< newFilter.actions = $([]);
< for (var j = 0; j < filter.actions.length; j++) {
< newFilter.actions.push($(filter.actions[j]));
---
> if (filter.actions) {
> newFilter.actions = $([]);
> for (var j = 0; j < filter.actions.length; j++) {
> newFilter.actions.push($(filter.actions[j]));
> }
Additional Informationrpm -qa | grep sogo
...
sogo-1.3.9-2.centos6.x86_64
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0003053)
ludovic (administrator)
2011-11-24 14:24

Which web browser were you using when getting the error? We can't reproduce the issue.
(0003180)
fe (reporter)
2011-12-16 09:56

This was definitely not a browser problem (Firefox, Chrome, IE, Safari, all the same), but a user-specific problem: They could simply not save.
We had migrated the filter rules using sogo-tool so the entries should
be syntactically correct in the Sogo database.

I am not quite sure, but this was a candidate as far as I remember:

---
require ["fileinto"];
if anyof (header :contains "subject" "/SPAM!/") {
    fileinto "INBOX.Trash";
}
---


--- working, with my additions ---
function prototypeIfyFilters() {
    var newFilters = $([]);
    for (var i = 0; i < filters.length; i++) {
        var filter = filters[i];
        var newFilter = $({});
        newFilter.name = filter.name;
        newFilter.match = filter.match;
        newFilter.active = filter.active;

        if (filter.rules) {
            newFilter.rules = $([]);
            for (var j = 0; j < filter.rules.length; j++) {
                newFilter.rules.push($(filter.rules[j]));
            }
        }

        if (filter.actions) {
           newFilter.actions = $([]);
           for (var j = 0; j < filter.actions.length; j++) {
              newFilter.actions.push($(filter.actions[j]));
           }
        }
        newFilters.push(newFilter);
    }

    return newFilters;
}
---- buggy ----

function prototypeIfyFilters() {
    var newFilters = $([]);
    for (var i = 0; i < filters.length; i++) {
        var filter = filters[i];
        var newFilter = $({});
        newFilter.name = filter.name;
        newFilter.match = filter.match;
        newFilter.active = filter.active;

        if (filter.rules) {
            newFilter.rules = $([]);
            for (var j = 0; j < filter.rules.length; j++) {
                newFilter.rules.push($(filter.rules[j]));
            }
        }

        newFilter.actions = $([]);
        for (var j = 0; j < filter.actions.length; j++) {
            newFilter.actions.push($(filter.actions[j]));
        }
        newFilters.push(newFilter);
    }

    return newFilters;
}
---
(0003309)
fe (reporter)
2012-01-24 04:07

Sogo 1.3.11 on Scientific Linux 6.1:

The problem occured again with Firefox. The user was not able to save vacation message and forwarding.

I patched UIxPreferences.js as given above, and the user COULD save her preferences.
User avatar (0003344)
francis (administrator)
2012-01-30 14:59

Fixed in revision 870459b5cd89f38f2c5d579fccb19dba58515f8b.

- Issue History
Date Modified Username Field Change
2011-11-23 03:34 fels New Issue
2011-11-24 14:24 ludovic Note Added: 0003053
2011-12-16 09:56 fe Note Added: 0003180
2012-01-24 04:07 fe Note Added: 0003309
2012-01-30 14:59 francis Note Added: 0003344
2012-01-30 14:59 francis Status new => resolved
2012-01-30 14:59 francis Fixed in Version => 1.3.12
2012-01-30 14:59 francis Resolution open => fixed
2012-01-30 14:59 francis Assigned To => francis


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker