Adding additional parts to a ContentPartRecord does not work as expected until mappings.bin is deleted


As in discussion 403777:

Steps to reproduce:

1) Create a clean default installation of Orchard
2) Install the attached module. This will make a Scheduled Games Container widget available
3) Add the Scheduled Games Container to a page. Note that the Number of Games To Show property is displayed on the editor screen for the widget. Set this property to a valid integer
4) Check that the value of the property has saved, and that it is displayed on the front end page that you added the widget to.
5) Look at the source for the module, and make the following changes:
- Uncomment line 12 of the Record
- Uncomment lines 20-24 of the Part
- Uncomment line 4 of the View
- Uncomment lines 8 & 9 of the Editor Template
- Uncomment the method UpdateFrom1() in the Migration
- Uncomment line 31 of the Driver (you may need to move the comma onto the previous line as well)
6) Go back to the editor screen for the widget you added in step 3. Note that a new property (Skin) has been added
7) Check the migration record in the database, and that the new column for Skin has been added to the table MigrationTest_ScheduledGamesContainerRecord

== Up to now, Orchard has behaved as expected ==

7) Set the Skin property to any string value, and save the changes.
8) Go back into the editor screen for the widget- the new Skin property has not been persisted
9) Check the database and the value for the new property will be null

file attachments

Closed May 20, 2013 at 10:50 PM by sebastienros
This is an awesome repro and I enjoyed applying it locally step by step, thanks, but the repro didn't work on my machine, on 1.x branch, so I have to assume that the problem is fixed. Unless you can repro on 1.x.


paynecrl97 wrote Nov 27, 2012 at 10:47 AM

Additionally- deleting the mappings.bin file in App_Data will cause Orchard to re-create this file, and then both properties will be working as expected.

paynecrl97 wrote Dec 4, 2012 at 11:56 AM

Has anyone had a go at reproducing this using the instruction above yet?

AimOrchard wrote Dec 4, 2012 at 3:08 PM

Cannot reproduce but I also ran into a similar issue (removed the bin and tada: data got saved)

paynecrl97 wrote Dec 7, 2012 at 3:28 PM

jhandel wrote Apr 12, 2013 at 4:04 PM

I wonder if this is another symptom of an issue I am having and submitted today