cancel
Showing results for 
Search instead for 
Did you mean: 

Manually fix 'user can't change start location' problem

rosemeyer2
Champ in-the-making
Champ in-the-making
Hi,

there is a bug in 3.2r so that a user can't change his start location in the profile. It switches back to My Alfresco even if you have choosen something different. I learned from JIRA, that this is fixed in 3.3. nightly. I would like to give my 3.2r a fix, so does anyone know, what file to update?

Regards,
Rudolf
11 REPLIES 11

mikeh
Star Contributor
Star Contributor
What's the JIRA reference?

Thanks,
Mike

rosemeyer2
Champ in-the-making
Champ in-the-making

mikeh
Star Contributor
Star Contributor
Here's the diff:
Index: projects/web-client/source/java/org/alfresco/web/bean/repository/Preferences.java
===================================================================
— projects/web-client/source/java/org/alfresco/web/bean/repository/Preferences.java   (revision 17316)
+++ projects/web-client/source/java/org/alfresco/web/bean/repository/Preferences.java   (revision 17317)
@@ -96,7 +96,7 @@
       try
       {
          FacesContext context = FacesContext.getCurrentInstance();
-         tx = Repository.getUserTransaction(context, true);
+         tx = Repository.getUserTransaction(context);
          tx.begin();
         
          getNodeService().setProperty(this.preferencesRef, qname, value);

Thanks,
Mike

rosemeyer2
Champ in-the-making
Champ in-the-making
Well, Community 3.2r2 is cl 17458, so this fix is already included in r2, but it's still not working. Do I get something wrong here? Regards, Rudolf

mikeh
Star Contributor
Star Contributor
Well, Community 3.2r2 is cl 17458, so this fix is already included in r2, but it's still not working. Do I get something wrong here? Regards, Rudolf
The fix is on a different branch and hasn't been merged across to HEAD yet.

Thanks,
Mike

rosemeyer2
Champ in-the-making
Champ in-the-making
Ah, ok, so there is a community branch and a enterprise branch, now I understand the "copy 3.2 to HEAD" changelist, these are bugfixes for the mainline. I successfully compiled the web-client jar and now changing start location works. Thanks a lot.

kyriakos
Champ in-the-making
Champ in-the-making
how did you fix it manually i have the same problem…

rosemeyer2
Champ in-the-making
Champ in-the-making
I fixed that manually, send me your e-Mail address and I will sent you the fixed jar.

kyriakos
Champ in-the-making
Champ in-the-making
i made the change that is written above and i have this error when i enter alfresco

java.lang.ClassFormatError: Incompatible magic value 791617604 in class file org/alfresco/web/bean/repository/Preferences

i changed the Preferences.class that i found at C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib in the alfresco-web-client-3.2r2.jar file

to this

public void setValue(String name, Serializable value)
    {
        QName qname = QName.createQName("http://www.alfresco.org/model/application/1.0", name);
        UserTransaction tx = null;
        try
        {
            FacesContext context = FacesContext.getCurrentInstance();
            tx = Repository.getUserTransaction(context);
            tx.begin();
            getNodeService().setProperty(this.preferencesRef, qname, value);
            tx.commit();
            cache.put(name, value);
        }
        catch(Throwable err)
        {

.
.
.