Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Form for Editors crashes in v.9.8.5

Form for Editors crashes in v.9.8.5

Daniel Hollmann
Reply

Hi

I recently upgraded a solution from 9.7.4 to 9.8.5.

It all seemed to work just fine, but I have some form that is made with the App Module “Forms for editors”.

When I navigated to a page that contained a form, I got the following error:

I then tried to go the admin interface, to see if I could edit the module, but also here I encountered an error.

I could properly manually delete the forms from the database, but I would prefer not to. It does not seem to be a known bug. What changes in versions between 9.7.4 and 9.8.5 could cause this?


Replies

 
Nicolai Pedersen
Reply

Hi Daniel

Seems like your update script did not execute as it should.

Between versions, Dynamicweb will apply database schema changes using an update script - if upgrade is not done following the update stesp (see https://doc.dynamicweb.com/get-started/introduction/installation/upgrading-dynamicweb#sideNavTitle1) this can happen. Also if the database user does not have the right database permissions, updates can also not be added between versions. See https://doc.dynamicweb.com/get-started/introduction/installation/installing-dynamicweb#4522

Also, sometimes the update scrip simply fails.

You can rerun the update script in 2 ways

  • From backend (see dump #1)
    • Go to settings, System, System Information node and scroll to the bottom (you have to be administrator)
    • Change the "updates.xml.aspx" field to 2000 - this means that all update scripts from that file/database version will be re-applied if not applied already
    • Click "Rerun updates"
    • Now the error in forms should have gone away.
    • If not, check the update log - in the above screen, click "Download update log" - scroll to the bottom and see what error is there. Your error is related to the missing column "formfieldinputpattern" - so you can search for that in the log file. Hint: rename the log file to html to view it better in a browser.
  • By changing the update file directly (see dump #2)
    • On the server, finde the folder /Files and the file Updates.xml or Updates.xml.aspx
    • Open it in a text editor
    • Change the version to 2000
    • Run a IISRESET (run it in a command prompt using administrative privileges - or use the UI

BR Nicolai

Capture.JPG Capture2.JPG
 
Daniel Hollmann
Reply

Hi Nicolai thanks for the quick reply and great guide.

Unfortunately reruning the script did not work :(

I downloaded the UpdatesLog, and it contains a lot of errors. (But I upgraded, downgraded and upgraded again)
 

The only error about the forms was this:

4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\BasicForms.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\DM_Form.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\eCom_CartV2.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\eCom_Catalog.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\eCom_CustomerCenter.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\UserManagementFrontend.xml already exists.
4/28/2020 9:03:53 AM   file D:\home\site\wwwroot\Dynamicweb\Solution\System\BulkDataEdit\UserManagementFrontendExtended.xml already exists.

I could not find anything with the "formfieldinputpattern". I have attached my UpdateLog.

 
Nicolai Pedersen
Reply

Hi Daniel

That indicates that you have updated the /bin but not your /admin to the right version.

BR Nicolai

 
Daniel Hollmann
Reply

I followed the guide here for custom solution:

 

https://doc.dynamicweb.com/get-started/introduction/installation/upgrading-dynamicweb#sideNavTitle1-3

 

I downloaded the new version of DW and pointed my virtual directory to the new folder, and after that I moved my custom dll's
The new folder in DW 9.8.5 contains both an /Admin and /bin folder - So I don't think that is the problem... :/ 

 
Peter Leleulya
Peter Leleulya
Reply

I'm having the same issue sad

 

An error occurred while attaching module (Dynamicweb.Frontend.Content)

System.IndexOutOfRangeException: FormFieldInputPattern
   at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
   at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
   at System.Data.SqlClient.SqlDataReader.get_Item(String name)
   at Dynamicweb.Forms.Field.Fill(IDataReader datareader)
   at Dynamicweb.Forms.Field.GetFieldsBySql(String sql)
   at Dynamicweb.Forms.Frontend.RenderForm()
   at Dynamicweb.Forms.Frontend.GetContent()
   at Dynamicweb.Frontend.Content.GetModuleOutp

Server Error in '/' Application.


FormFieldInputPattern

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: FormFieldInputPattern

Source Error:

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:
 

[IndexOutOfRangeException: FormFieldInputPattern]
   System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +2151215
   System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +141
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +21
   Dynamicweb.Forms.Field.Fill(IDataReader datareader) +2013
   Dynamicweb.Forms.Field.GetFieldsBySql(String sql) +180
   Dynamicweb.Admin.ListForms.Page_Load(Object sender, EventArgs e) in E:\Agent\_work\163\s\01 - Applications\Dynamicweb.Admin\DW98\Dynamicweb.Admin\Admin\Module\BasicForms\ListForms.aspx.vb:42
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1607

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0

 
Tomas Gomez
Reply

Same problem here.

Is there any other solution available?

 
Nicolai Pedersen
Reply

Hi All

Will look into this. Maybe we have released the 9.9 forms package by mistake with 9.8.5 or something.

You can downgrade the Dynamicweb.Forms package to 3.7.1

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply
This post has been marked as an answer

Hi all

Bugged as 79016 and will be fixed in 9.8.6

In the meantime running 

ALTER TABLE [FormField] ADD [FormFieldInputPattern] [nvarchar](255) NULL;

against your db should fix it

/Morten Buhl, DW

Votes for this answer: 1
 
Daniel Hollmann
Reply

Hi Morten I had to add this aswell

 

ALTER TABLE [FormField] ADD [FormFieldTitle] [nvarchar](255) NULL;

 

But after that my forms work agian!  :D :D 

Thanks a lot!

/ Daniel 

 
Tomas Gomez
Reply

We also solved it, thanks for the help!

BR Tomas

 

You must be logged in to post in the forum