Uploaded image for project: 'Links directory'
  1. Links directory
  2. LINKS-151

AmetysHelperLinkDirectory.saveUserPrefs fails to save order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.6.0
    • 2.6.0
    • None
    • 4.2 RC2

      When AmetysHelperLinkDirectory.saveUserPrefs is called, the java code does 2 things :

      Map<String, String> values = new HashMap<>();
      values.put("checked-links", linksPosition);
      _userPrefManager.setUserPreferences(user, storageContext, contextVars, values);

      Then

      Map<String, String> values = new HashMap<>();
      values.put("hidden-links", hiddenLinks);
      _userPrefManager.setUserPreferences(user, storageContext, contextVars, values);

      The code that save the hidden links override the checked-links preferences, which are now lost.

      setUserPreferences should only be done once with both values.

       

            Unassigned Unassigned
            pgros Pierre Gros (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: