Important bug in 1.x

Topics: Announcements, General
Mar 27, 2014 at 4:52 AM
Edited Mar 28, 2014 at 4:51 PM
While preparing the 1.8 release and testing everything, I found an important bug. I have fixed it but here are the details.

For shifted parts which are versionable, like BodyPart, when the content was saved it was not going on the ContentItemVersionRecord but the ContentItemRecord. No test was applied on the related Record. The result was that anytime you would Save your content as a Draft, it would be saved on the Published version.

This is now fixed but I still need to ensure I have gone through all the shifted parts and ensure there isn't a completely shifted part that should use version by default. So this will delay the release by a day or two.

If you are using 1.x, well it seems you haven't noticed this issue, meaning you are not really using the Draft feature. But it's still impactful as migrating to a fix codebase would load the ContentItemVersionRecord content and thus would return an empty content. To prevent this I will create a script, the method is still to be defined, which will copy your Content to the Version record. A few of you are impacted, for some on production websites.

I am not pushing the fix right now for several reasons:
  • it could have unexpected results to users who are upgrading from it
  • these users need a patch I haven't yet done
  • I want to ensure I am not missing any Content Part requiring special care
I will provide more information tomorrow. If you have any question or want to help, please speak up.



Even if you haven't used the Draft feature, you data is corrupted and you need to apply the patch mentioned in this thread. It's corrupted but because you were not using Draft you never saw it directly.
Mar 27, 2014 at 5:41 AM
Edited Mar 27, 2014 at 5:42 AM
For those as me with part of their code relying on Nwazet commerce, or other already migrated modules, before any attempt to migrate it would be interesting to know if these modules will suffer from the same bug you detected and if they need a fix in their infoset code?
Mar 27, 2014 at 12:29 PM
I think this is related: a bug in Custom Forms, which has been fixed.
Mar 27, 2014 at 4:46 PM
Isn't this closed bug related?
Mar 27, 2014 at 8:02 PM
@CSADNT, the bug is definitely in 1.x branch, so if you are not using it there shouldn't be a risk.
Mar 28, 2014 at 12:42 AM
The patch is ready. Here is the procedure.

This patch only applies to users who are already using the 1.x branch before the commit # 14674a9908272db4f7557608604d317f008b135e (3/26/2014 6:38:20 PM).

To apply the patch:
  • backup your database
  • backup your website
  • update the files to the latest revision on the 1.x branch
  • enable the upgrade module
  • go on the upgrade 1.8 -> infoset page
  • add "?1.x" at the end of the url to show a custom mode
  • click on the last button of the list: FIXING 1.x VERSIONS
You are done. Go on your pages and ensure everything is fine.

If something seems wrong revert you website and communicate the issue so I can advise you or fix the issue.
Apr 2, 2014 at 11:01 PM
Upgraded a site I was developing on the 1.x branch to 1.8 today. Ran all upgrades in the Upgrade module and also the bug fix. Everything worked well. Nice work to the Orchard team on this and anyone else involved.
Apr 7, 2014 at 8:21 AM
In two of my Records I am inheriting the ContentItemVersionRecord.
Is there anything I need to do in order for the fix to be applied to these aswell?
Apr 20, 2014 at 11:08 PM
Hi Sebastien,

Is there any negative impact to running the patch if we are not sure if we are affected by this issue? I'd like to run it just in case although I've never seen the issue.

Apr 21, 2014 at 4:38 PM
There could be a risk of data loss. To be sure, look at your ContentItemVersionREcord table for the Data field. If they are all NULL then you should certainly apply it.
Jun 16, 2014 at 7:43 PM
Edited Jun 16, 2014 at 7:45 PM
In case anyone is planning on using the infoset migration fix and not sure about it, we've tested it with a few different sites (one of them with thousands of content items) and it all worked well, though like Sébastien said, a DB backup is recommended. Just saying, because no one gave any feedback about it so far. :)