Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, when I try to use this tool it gives me an exception. Am I missing a step? What I did was install Umbraco Forms, then install the migration tool. Then I gave it the connection string to a database of an Umbraco 4 installation that I am upgrading to 7.2 but then the following text appears:
UMBRACO EXCEPTION (DATALAYER): SQL HELPER EXCEPTION IN EXECUTEREADER
at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter parameters) at Umbraco.Forms.Migration.Data.Storage.FieldConditionStorage.GetFieldCondition(Field field) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\FieldConditionStorage.cs:line 72 at Umbraco.Forms.Migration.Data.Storage.FieldStorage.GetAllFields(FieldSet fieldset) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\FieldStorage.cs:line 108 at Umbraco.Forms.Migration.Data.Storage.FieldSetStorage.GetAllFieldSets(Page page) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\FieldSetStorage.cs:line 44 at Umbraco.Forms.Migration.Data.Storage.PageStorage.GetAllPages(Form form) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\PageStorage.cs:line 41 at Umbraco.Forms.Migration.Data.Storage.FormStorage.GetAllForms(Boolean archived) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\FormStorage.cs:line 51 at Umbraco.Forms.Migration.MigrationService.Migrate(String connString) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\MigrationService.cs:line 26 at Umbraco.Forms.Migration.ContourToForms.Button1_Click(Object sender, EventArgs e) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\ContourToForms.ascx.cs:line 23
Any help would be greatly appreciated :-)
I am getting a similar error:
Oops something whent wrong
UMBRACO EXCEPTION (DATALAYER): SQL HELPER EXCEPTION IN EXECUTEREADER
at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter parameters) at Umbraco.Forms.Migration.Data.Storage.FormStorage.GetAllForms(Boolean archived) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\Contour\Data\FormStorage\FormStorage.cs:line 45 at Umbraco.Forms.Migration.MigrationService.Migrate(String connString) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\MigrationService.cs:line 26 at Umbraco.Forms.Migration.ContourToForms.Button1_Click(Object sender, EventArgs e) in c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration\Umbraco.Forms.Migration\ContourToForms.ascx.cs:line 23
Any help will be appreciated as well!
NB: My old site has an Umbraco.Forms.Core.dll with Version 1.1.0
I'm trying to migrate a number of Contour forms from an Umbraco 126.96.36.199 site to Umbraco Forms in a 7.2.4 installation. And I'm getting exactly the same exception as Sunnefa and Murray above.
I'm able to migrate an "empty" test form but as soon as I add one single field, the exception is thrown. Both sites are running on Full trust and .NET framework 4.0. There are no custom workflow types involved.
Since this seems to be a rather common error in a really useful tool, it would be nice if someone responsible could take a look at it.
PS By the way, why is it that we can we see paths like the one below in the error message?
"c:\Users\timgeyssens\Documents\Visual Studio 2013\Projects\Umbraco.Forms.Migration..."
Now I got some more information on this.
When reading the Umbraco log, we saw that the migration package looked for a database table that did not exist in our version of Contour (1.1.12). So we upgraded Contour. And then the migration worked - sort of... It was at least possible to migrate one form at a time (an error was generated when trying to migrate all in one go).
If anyone else would like to try this, here's a tip: Be careful when choosing the update file on the Contour project page. We wanted to use one for Umbraco 4.7 but couldn't find any. So we went for the latest update zip. This got the migration working (one by one) but when running the web site there were xslt errors all over the place...So we had to degrade to our original version of Contour.
However since we got our forms succesfully migrated, we can live with that.
I am facing with the same error, I have posted question here, have you manged to make it work?
The actual error thrown is "Invalid object name 'UFforms'", when executing the sql string "SELECT * FROM UFforms where archived = @archived order by name ASC;" (where @archived is set to false).
It appears that the SQLHelper is actually connecting to the current site database not to the one it has been passed a connection string for - although in the debugger it does show the correct connection string - I can connect to any table that still exists in Umbraco Forms, but not to any that exists in Courier (and so only in the old database).
Okay, the problem appears to be this commit in umbraco.DataLayer:
It forces SQLHelpers to always use the current system DB connection regardless of the query string passed in. I'm guessing this was to force it to always reuse existing open connections instead of opening multiple connections (i.e. it was a a performance fix), but it completely broke the ability to connect to any database other than the system one via SQLHelpers. I don't know how commonly that was done, but I doubt Umbraco Forms Migrator was the only thing broken by that change. The change was released with Umbraco 7.6.
More worrying is that 14 months after this change Umbraco Forms Migrator hasn't been updated to deal with this (or a fix put in place in SQLHelper to check whether the connection requested actually matches the system one). I'm aware that Migrator was created by Tim not Umbraco HQ to solve a problem a lot of paying Contour/Forms customers were facing (so it's kind of unfair to expect updates), but this really shouldn't be the case - it's the only realistic upgrade path from Contour to Umbraco Forms, and it really should be maintained by the Forms team in support of those (paid for) products. The package has never been updated (even though fixes and enhancements PRs have been accepted on the repository), and it hasn't worked on any version of Umbraco from 7.6.0.
It's not going to be trivial to get this working, as the code is all written to work with the umbraco.DataLayer classes. It'll either have to be rewritten to use framework classes (change much of the login in Migrator, plus either implement it's own database type switching or give up the ability to use anything but a single type of source database (it currently supports SQL Server, SQLCE and MySQL, which all used to be supported by Umbraco so are likely to have older system running on them), or some fudge cooked up with replications of the old DataLayer classes.
Okay, I have fixed this for my own purposes by cloning the old version of umbraco.DataLayer into the Umbraco Forms Migrator.
I've been able to successfully import forms in the following environment:
SQL Server 2014 Express with Contour 3.0.31 data
Umbraco 7.7.4 on SQL Server 2014 Express
Umbraco Forms 6.0.5
I also failed to import records (it managed 12 of them before stopping - whether that was a timeout or an error I'm not sure, as I just cleared the forms and started again without the records). So I may have broken that...
In theory it should work on other versions of Umbraco and other databases (it'll still break with sufficiently old versions of Contour - I haven't attempted to fix that), but I haven't tested this.
This is in essence a bit of a nasty cludge (fixing SQLHelper in the main Umbraco codebase would be the right thing to do, but I'm not sure there'll be the willing - it's deprecated and any fix would have an effect on performance, though probably not a large one if checking for a mismatch between the system database and the supplied connection string was done only when the string was set.
So - given this is a bit nasty, and inadequately tested, I'm not sure Tim is necessarily going to want to accept it as a pull request (happy to create one if you do think it's the way forward Tim). However, if anyone wants a copy of the solution let me know.
PS - post above edited because I realised I was implying Tim was a member of the HQ team and should be expected to support this. Whereas I actually think this is something Umbraco HQ should have provided in the first place and then maintained...
Jut come up against this very issue. Trying to migrate contour 3.0.27 to umbraco forms and getting the UFForms error. Do you still have your "hotwired" converter code availble? Thanks.
I'll have a look.
Here you go:
I'm afraid you're on your own if it doesn't work!
That's great Geoff thanks very much. Appreciate your response.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted