[MAGNOLIA-5734] Restoring previous page versions not working Created: 01/Apr/14 Updated: 06/May/14 Resolved: 16/Apr/14 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.2.2 |
| Fix Version/s: | 5.2.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Ben Price | Assignee: | Milan Divilek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Description |
|
In versions 5.2.2 and newer is not possible to restore older versions of content due to change of serial version uid in Rule. See attached screenshot error regarding restoring page versions. |
| Comments |
| Comment by Milan Divilek [ 02/Apr/14 ] |
|
Restore/Preview version which was created in version 4.5.x doesn't work. It's caused by changes in metadata. Action for restoring to any version was reintroduced in M5.2.2 |
| Comment by Jan Haderka [ 02/Apr/14 ] |
|
In which case I guess we do not cause any more harm if we just settle on using new serialVersionUID that was generated after removal of it, but put it back in the class to make sure we don't have such incompatibilities in the future again. |
| Comment by Magnolia International [ 02/Apr/14 ] |
|
Is a "manual" import/export also not working ? Could we perhaps consider adding an import filter ? (we've done it in the past albeit for simple type changes) |
| Comment by Milan Divilek [ 02/Apr/14 ] |
|
Manual export/import works. It's handled with info.magnolia.importexport.postprocessors.MetaDataImportPostProcessor which is used after import info.magnolia.importexport.DataTransporter#postProcessAfterImport. We can probably used this also during restore/preview/compare versions. btw. see http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html
Why we go against of recommendation of oracle? http://wiki.magnolia-cms.com/display/DEV/Code+Style#CodeStyle-serialVersionUIDs |
| Comment by Magnolia International [ 03/Apr/14 ] |
|
Would be cool if we could use that filter on restore of versions, then. CodeStyle-serialVersionUID - we had it in many places were it was unnecessary (thanks, default code template of Eclipse), but it should never have been removed from Rule indeed. Having our own readObject() - or implement java.io.Externalizable which I tend to think is more elegant but have never used before, would let restore content from all version (pre-removal of serialVersionUID, post-removal, and post-readdition). As a longer term solution I'd tend to think we should not binary-serialize the object instance anyway, but that's a much broader topic. |
| Comment by Christoph Meier [ 17/Apr/14 ] |
|
I replaced deprecated Assert.$someMethod() by static imports on info.magnolia.cms.util.RuleTest |