cancel
Showing results for 
Search instead for 
Did you mean: 

Document preview does not show latest version

mike54
Champ in-the-making
Champ in-the-making
Hi,

I don't if there is any regularity in there, but quite often document preview does not reflect latest version of uploaded content.
(If preview shows version 1.0, after uploading 1.1 it still shows 1.0…)

At the same time other document uploaded refreshes right away…

What could cause this problem?

Thanks,
Mike
5 REPLIES 5

mike54
Champ in-the-making
Champ in-the-making
I have users asking "why my preview does not show the latest version"… any clues? Smiley Happy

mikeh
Star Contributor
Star Contributor
I think we fixed this in a newer version. The browser was caching the old version's .swf file and wasn't getting the "nocache" value due to a bug in the way YUI encodes the parameters when generating the mark-up for the preview.

The fix was to patch the SWFObject code in the onComponentsLoaded() function in web-preview.js. This was applied to Community on 11 August 2009, so if you've got a version older than that, you'll either need to upgrade or manually apply the fix.
         /**
          * SWFObject patch
          * Ensures all flashvars are URI encoded
          */
         YAHOO.deconcept.SWFObject.prototype.getVariablePairs = function()
         {
             var variablePairs = [],
                key,
                variables = this.getVariables();
            
             for (key in variables)
             {
                if (variables.hasOwnProperty(key))
                {
                   variablePairs[variablePairs.length] = key + "=" + encodeURIComponent(variables[key]);
                }
             }
             return variablePairs;
          };

Thanks,
Mike

livcg
Champ in-the-making
Champ in-the-making
I'm seeing the problem on other file types, such as .doc, on v3.2.  Does the fix you mentioned affect other file types?


Thanks

tomd
Champ in-the-making
Champ in-the-making
I am getting a similar problem with a .doc file in 3.4.d – the log shows this:

java.lang.NullPointerException
            at org.alfresco.repo.action.CreateThumbnailActionFilter.compare(CreateThumbnailActionFilter.java:38)
….

Any fix for that?

Thanks,
Tom

mikeh
Star Contributor
Star Contributor
I am getting a similar problem with a .doc file in 3.4.d – the log shows this:

java.lang.NullPointerException
            at org.alfresco.repo.action.CreateThumbnailActionFilter.compare(CreateThumbnailActionFilter.java:38)
….

Any fix for that?

Thanks,
Tom
Pretty sure that's a different issue, so please create a new topic. Also it's generally a bad idea to truncate exception traces, as it is no longer possible to see the root cause.

Thanks,
Mike