ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Gzipped history of wiki pages is garbeled during an update of an older version to 2.0 (Bug #523)


Added by Holger Just at 2011-07-14 03:59 pm. Updated at 2011-07-29 08:20 am.


Status:Closed Start date:2011-07-14
Priority:High Due date:
Assignee:Felix Schäfer % Done:

0%

Category:Wikis
Target version:2.1.0
Remote issue URL: Affected version:2.0.0

Description

It seems the migration of the wiki history towards aaj doesn't properly deal with gziped history.

I think its related to string encoding in MySQL vs. in the serialized yaml that is used in aaj. But I might be wrong here. I still need to build a test setup for that as I couldn't reproduce this yet.

The issues was observed by at least Z-95 and Skaag (who uses MySQL) on IRC.


Associated revisions

Revision 894911f5
Added by Felix Schäfer at 2011-07-29 10:19 am

Correct deflation of gzipped wiki text. #523

History

Updated by Felix Schäfer at 2011-07-28 10:05 am

Not a problem of MySQL, but an oversight while updating the wiki code for aaj. Here's the fix:

 1diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb
 2index 9533a8a..5f62d24 100644
 3--- a/app/models/wiki_content.rb
 4+++ b/app/models/wiki_content.rb
 5@@ -101,9 +101,9 @@ class WikiContent < ActiveRecord::Base
 6     end
 7
 8     def text
 9-      @text ||= case changes[:compression]
10+      @text ||= case changes["compression"]
11       when 'gzip'
12-         Zlib::Inflate.inflate(data)
13+         Zlib::Inflate.inflate(changes["data"])
14       else
15         # uncompressed data
16         changes["data"]
  • Target version set to 2.1.0
  • Assignee changed from Holger Just to Felix Schäfer
  • Status changed from Open to Ready for review

Updated by Felix Schäfer at 2011-07-29 08:20 am

  • Status changed from Ready for review to Closed

Also available in: Atom PDF