cancel
Showing results for 
Search instead for 
Did you mean: 

Versioning issues - multiple versions for a single edit etc

caleban
Champ in-the-making
Champ in-the-making
I installed alfresco-community-3.4.b-installer-linux-x64.bin on debian lenny

I've enabled versioning for everything. I'm testing versioning by creating files and editing them. I need to make sure the versioning works well.

I added a file, changed it a few times, a few versions appeared, I edited the file one more time, afterward only one version remained in alfresco, the final version. Where did the original versions go? There should be many versions, not just one.

I added a series of files, changed them once, the add and all the changes show the same date and time, why?
Three versions appeared? Why?

Thanks in advance!
6 REPLIES 6

patil
Champ on-the-rise
Champ on-the-rise
Hi,

While creating the node you need to apply the versionable aspect.

FacesContext context = FacesContext.getCurrentInstance();
         RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context);
         RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
         {
            public Object execute() throws Throwable
            {
               // add the versionable aspect to the node
               getNodeService().addAspect(getDocument().getNodeRef(), ContentModel.ASPECT_VERSIONABLE, null);
               return null;
            }
         };
         txnHelper.doInTransaction(callback);


If done check in the nodeBrowser whether the versionable aspect is enabled or not.

Thanks,
Patil
Cignex Technologies
Bangalore

caleban
Champ in-the-making
Champ in-the-making
Patil,

Thanks for the reply.

I'm lost here.

I already enabled versioning for everything in the Alfresco web interface More Actions > Manage Content Rules…

Why do I need to edit configuration files?

You're talking about adding …ASPECT_VERSIONABLE… to a configuration file? Which file are you adding this to?

Why do I have to create a node? Where and how do I create a node? Can I not just install Alfresco, enable versioning as I did, create some users, and start adding files?

Thanks in advance.

patil
Champ on-the-rise
Champ on-the-rise
Versioning is the aspect in the alfresco.
You need to enable the vesrsion to the content (basically all content nodes)
You can achieve it throght running actions.

Thanks,
Patil
Cignex Technologies
Bangalore

caleban
Champ in-the-making
Champ in-the-making
I already enabled versioning for everything in the Alfresco web interface More Actions > Manage Content Rules…

Are you saying I need to do more than that?

Versioning is on and it's working but it's not working right.

Are you saying if I do something more than that, something special I haven't done, the versioning will stop working incorrectly as described above and it will start working correctly?

Thanks in advance!

patil
Champ on-the-rise
Champ on-the-rise
Hi,

Make sure your filtering criteria is correct.
The rule should be applicable to all the childs.
Uncheck the button Run rule in background.

Thanks,
Patil
Cignex Technologies
Bangalore

heiko_robert
Star Collaborator
Star Collaborator
I try to shed some light into the version lost issue.
Alfresco supports autoversioning in a transactional way on the file protocols like CIFS. This sounds nice but reveals undiscovered hacks and work around how some applications act on the filesystem: If you think most applications will just save one document in the filesystem when you use the save command you will discover that in many cases somthing else is going on when using Alfresco.
When opening a document some applications
  • create a temparary file and when saving or closing removes the original file and then renames the new temporary file to the orignal file

  • saves the doc several times with one save command (e.g. Office)
Keeping that in mind and trying to imagine what happens if alfresco handles files as distinct, unique nodes which just have a property of the file name with some more attached Infos like versions, metadata:
If the app creates a new doc instead of really saving into the existing doc (and then removes the original and renames the new doc) a new node is created in Alfresco having no metadate, no versions.
You can easyly check this by comparing the nodeRef-Link in the document details in the browswer before and after.

It is very hard to handle that. Maybe this will brake some use cases in accessing Alfresco using CIFS from some applications - maybe this brakes the fantastic idea just to direrctly connect your transactional ECM system thru standard file protocols from any application. It is not a bug rather a lack of concepts how applications should work on transactional systems. The only long term work around for theses kind of apps IMO is to work offline like you work in subversion or similar versioning tools or you use check-in/check-out.

hope that helps
Heiko