Compare Versions No Longer Working

Permalink
Hi, folks.

I've run into an issue where my Compare Versions functionality - which WAS working just fine - has stopped working correctly. I am running c5 on a WAMP setup (though we are about to move to a LAMP setup) and I ran through the necessary steps contained in this thread (http://www.concrete5.org/community/forums/installation/compare-versions-feature-under-windows/#26697) to get the Compare Versions feature working in Windows. For quite some time, everything worked well, and I was seeing the red/green highlights to mark changes in pages.

Now, however, when I try to use the Compare Versions feature, the only thing that displays in the results window is the earlier version. No colors, no markup... just the earlier of the selected versions. Does this problem sound familiar to anyone?

campbell
 
frz replied on at Permalink Reply
frz
Is python installed and working correctly?

Best wishes
Pecked out on an iPhone
campbell replied on at Permalink Reply
campbell
Yes, it is. I have Python 2.7.2 installed and it seems to be working fine. I haven't made any changes to Python or anything that would touch the Compare Versions feature, I don't think.
campbell replied on at Permalink Reply
campbell
Just to update, I now have c5 running in a Linux environment, and I've made sure to configure the system to use the htmldiff.py file (rather than the htmldiff.exe file I had to create so the feature would work in Windows).

I have made sure that the file is executable, and the Linux environment has Python 2.4.3 installed.

Again, when I try to compare two clearly different versions of a page, only the earlier version is displayed, and there is no highlighting to indicate new content.
frz replied on at Permalink Reply
frz
that's super odd. I've never heard of something like this.

Are you sure you're just not expecting this feature to be more awesome
than it is? All its supposed to do is diff the copy inside the Content
Block. With the complexity of HTML it's not always 100% at that
either.. sometimes it gets a little confused/off sync if there are new
lines or too many markup tags..etc.

Perhaps try a clean test on our instant setup (top of this page) make
sure you can reproduce it there or not..

best wishes

Franz Maruna
CEO - concrete5.org
http://about.me/frz
campbell replied on at Permalink Reply
campbell
Hi, Franz.

Thanks for the replies.

I had seen the Compare Differences feature before, and it had worked well for me, so I don't think I'm off on the amount of awesome I'm expecting.

I tested it in a demo site just now, and it seems to work fine there.

The problem I am currently running into seems to be that the system is storing the same content (i.e., the same version) into the two HTML files it's comparing (even though it stores the correct version number in the filename), so every time I run it, I get zero difference. At least, that's what I think is happening.

I'm honestly not sure what I might have done to change from the standard setup. Maybe I'll just download a fresh install locally and copy the relevant files into the correct locations in the new environment.
campbell replied on at Permalink Reply
campbell
Okay, I downloaded version 5.4.2 and extracted the files into a new folder. From that folder, I copied the following files from my local download into the Linux environment:

concrete/concrete/config/base.php
concrete/concrete/libraries/3rdparty/htmldiff.py

I cleared the browser and concrete caches, logged out, logged in, and tested the compare feature again and still got the same result - it's only returning the older version, even with these two completely unmodified files in place.

Just to clarify that I'm not expecting any unrealistic fireworks, I'll explain what I'm seeing. I have two versions of a page, version 19 and version 20. In the Main section of the page in version 19, the word "summary" is included. In version 20, that word has been changed to "elephant." When I compare version 19 and version 20, the Compare Versions display shows the word "summary," and there is no background highlight or strikethrough of any sort. No elephants anywhere.

Is there another file somewhere that I've neglected? I'm getting pretty frazzled with this one, so I appreciate any help anyone can provide.

Thanks.
GregJoyce replied on at Permalink Reply
GregJoyce
I tried this in 5.4.1.1 and 5.4.2.2 and could confirm that the version compare does not work in 5.4.2.2, even though the tools/versions.php for each c5 version is virtually identical. So the problem is not obvious.
GregJoyce replied on at Permalink Reply 1 Attachment
GregJoyce
I submitted a bug report on this, it looks to be something up with how the View is called in concrete/tools/versions.php

This is a file I used to test what the bugs are. It appears to bring back a better version compare. However, I am not so sure this is the best solution to the actual problem at hand. If you absolutely need to compare some versions, give it a shot. You can create an override by placing it at [site root]/tools/versions.php and your site will use this file instead.
campbell replied on at Permalink Reply
campbell
Thanks, Greg.

I was able to see the red and green formatting show up in a couple of parts of the document using your file, but I can't tell if it's even using the correct versions because it's pushing all of the page content into a small box at the top of the Compare Versions screen. The scrollbars on this box don't function, so I can't see if anything is working in that box. We did download a fresh install of 5.4.2.2, and the Compare Versions functionality seems to be working there. I think I may just have to rebuild the site in the fresh install. Luckily, my site is still in user acceptance testing mode and isn't chock full of content yet. Should be a quick fix to rebuild the templates and load the add-ons.

Thanks for the responses, though.