This is an account of the breaking changes I have come accross when migrating the Polyglot package from Umbraco v4 to v6.
I have not found anything significant but I am mentioning the details here, in case they're useful.
Please note that, in some cases, I am accessing the database directly. At the time I was first developing the package, I had found no other way to retrieve certain pieces of information.
So, without further ado:
- The field TabId of the cmsPropertyType table does not exist any more in the database. I didn't know where it has gone, since I have realised that I did not really need it, so I have just stopped retrieving it.
- The database field masterContentType of the cmsContentType has also disappeared. In order to find the parent of a document type one needs to access the cmsContentType2ContentType table now
- As is mentioned in the release notes, when setting a document's property via the API, the document needs to be saved, in order for the change to propagate to the database. It does not happen automatically any more.
- Macros pointing to .ascx user controls have to have the path of the user control starting with ~/ . For example ~/packageFolder/MyUserControl.ascx . Writing something like packageFolder/MyUserControl.ascx does not work any more.
- Razor scripts seem to be a bit more sensitive when rendering fields with the @ sign. This used to work:
var class = " class='niceList';
<ul@class></ul>
Now it crashes and needs to be
var class = "class='niceList';
<ul @class></ul> (space needed between ul and @)
- This is a bit silly but, by mistake, I had this command somewhere in my razor scripts:
var a = @Model.AncestorOrSelf(level);
I should have written
var a = Model.AncestorOrSelf(level);
but, anyway, it used to work and now it doesn't. I consider this to be an improvement though :)
- In web.config, umbracoDbDsn has been moved from AppSettings to ConnectionStrings
That's all. In general I think that v6 is doing very well with backwards compatibility. It wasn't too much trouble to fix these things and I will have a new version of the package published soon.
Thanks so much for writing all these up, all of them have been covered in the list of breaking changes now. The ascx user control macro thing was fixed Friday, so the tilde will just be prepended for you now if it's not there.
I am sorry I could not find this yesterday, but I think I have just discovered a bug. It has nothing to do with the above. I have created an issue in the issue tracker:
Breaking changes in v6 for package developers
Hi everyone,
This is an account of the breaking changes I have come accross when migrating the Polyglot package from Umbraco v4 to v6.
I have not found anything significant but I am mentioning the details here, in case they're useful.
Please note that, in some cases, I am accessing the database directly. At the time I was first developing the package, I had found no other way to retrieve certain pieces of information.
So, without further ado:
- The field TabId of the cmsPropertyType table does not exist any more in the database. I didn't know where it has gone, since I have realised that I did not really need it, so I have just stopped retrieving it.
- The database field masterContentType of the cmsContentType has also disappeared. In order to find the parent of a document type one needs to access the cmsContentType2ContentType table now
(both of the above have already been mentioned here by Sebastiaan: http://issues.umbraco.org/issue/U4-1353 )
- As is mentioned in the release notes, when setting a document's property via the API, the document needs to be saved, in order for the change to propagate to the database. It does not happen automatically any more.
- Macros pointing to .ascx user controls have to have the path of the user control starting with ~/ . For example ~/packageFolder/MyUserControl.ascx . Writing something like packageFolder/MyUserControl.ascx does not work any more.
- Razor scripts seem to be a bit more sensitive when rendering fields with the @ sign. This used to work:
var class = " class='niceList';
<ul@class></ul>
Now it crashes and needs to be
var class = "class='niceList';
<ul @class></ul> (space needed between ul and @)
- This is a bit silly but, by mistake, I had this command somewhere in my razor scripts:
var a = @Model.AncestorOrSelf(level);
I should have written
var a = Model.AncestorOrSelf(level);
but, anyway, it used to work and now it doesn't. I consider this to be an improvement though :)
- In web.config, umbracoDbDsn has been moved from AppSettings to ConnectionStrings
That's all. In general I think that v6 is doing very well with backwards compatibility. It wasn't too much trouble to fix these things and I will have a new version of the package published soon.
Cheers,
Dimitri
Thanks so much for writing all these up, all of them have been covered in the list of breaking changes now. The ascx user control macro thing was fixed Friday, so the tilde will just be prepended for you now if it's not there.
Thanks again!
You're welcome! Maybe next time I'll catch "bigger fish" :)
Thanks for letting me know about the tilde by the way!
Cheers,
Dimitri
Hi again Sebastiaan,
I am sorry I could not find this yesterday, but I think I have just discovered a bug. It has nothing to do with the above. I have created an issue in the issue tracker:
http://issues.umbraco.org/issue/U4-1512
I hope that it helps, and that it's not hard to reproduce.
Best regards,
Dimitri
is working on a reply...