Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading forms records in dashboard #525

Closed
bjarnef opened this issue Apr 6, 2021 · 5 comments
Closed

Error loading forms records in dashboard #525

bjarnef opened this issue Apr 6, 2021 · 5 comments

Comments

@bjarnef
Copy link

bjarnef commented Apr 6, 2021

I have a clean Umbraco v8.12.2 with default starter kit and Umbraco Forms v8.7.0-RC

However after I upgraded to v8.7.0 release I noticed this error loading the forms records in dashboard in /umbraco/backoffice/UmbracoForms/Record/PostRetriveRecordsCount.

image

It seems to be an issue with SQL CE related to the ORDER BY clause.

@AndyButland
Copy link

And it was all going so well... :-(. OK, thanks for this @bjarnef, unfortunately something I introduced between the RC and release to fix a separate issue that was raised, that has had an unexpected effect here. I've found and resolved the issue so will see about getting it fixed in a patch release shortly.

@ronaldbarendse
Copy link

This issue wasn't present in the 8.7RC release indeed and I can conform it also happens on upgraded sites on the following URL: /umbraco/backoffice/UmbracoForms/Form/GetAllFieldTypesWithSettings:

Column "UFRecords.Created" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.

I've also recieved the following exception when trying to edit a form in the back-office:

Exception: System.Reflection.CustomAttributeFormatException
Message: 'Description' field specified was not found.
InnerException: System.NullReferenceException
StackTrace:
  at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
  at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
  at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
  at Umbraco.Forms.Core.FieldType.Settings()
  at Umbraco.Forms.Web.Editors.FormController.GetAllFieldTypesWithSettings()

This might be because this specific form uses custom field types though (and this exception was thrown before the SQL query was done), but after downgrading to 8.6.1 it's all working again...

@ronaldbarendse
Copy link

FYI: downgrading using NuGet can be done using:

PM> Install-Package UmbracoForms -Version 8.6.1

Be sure to overwrite any files in App_Plugins\UmbracoForms (except changes in the UmbracoForms.config) - I've done this by removing the existing folder before running the above command.

After the downgrade you'll get a BootException when starting the site (because it can't revert the database migrations), but that's 'fixed' by running the following SQL query:

UPDATE [umbracoKeyValue] SET [value] = '1d084819-84ba-4ac7-b152-2c3d167d22bc' WHERE [key] = 'Umbraco.Core.Upgrader.State+UmbracoForms' AND [value] = '01945165-447e-4106-92d2-df734050b8c6'

Disclaimer: downgrading and manually altering the migration state isn't supported, but this worked for me 😉

@AndyButland
Copy link

@ronaldbarendse - think the second issue you've noted is a different one, but it looks like it could be a concern. I've done some code clean-up between 8.6 and 8.7 and I've realised here one change I've made might be causing this. In 8.6 Description was a public field, and in 8.7 I've made it a property.

That's probably what it should be, but am realising now you've rasied this that would be breaking for any custom field types compiled against a lower version of forms.

Is your custom field type one you control, and could you try compiling it against 8.7 to verify that this resolves the issue?

In any case though, seems like this should be a change I revert - as if there are third party packages similarly affected it'll not be feasible to expect them to update.

@AndyButland
Copy link

I've got an 8.7.1 release prepared to resolve the two issues raised here. It'll go out on NuGet and our on Tuesday.

In the meantime if anyone is blocked by this and wants to patch their 8.7. installation, the dll files are here: https://drive.google.com/file/d/1x6wZRVeaZWMsZBCOQiekojU1LTDq5nWR/view?usp=sharing. If you just copy them over the ones installed from the 8.7 release that should be all that's needed.

If anyone does use these, would appreciate if you could also let me know that it resolves the issue too - thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants