Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Zac 223 posts 575 karma points
    Apr 10, 2015 @ 02:18
    Zac
    0

    "An error has occured" whilst trying to retrieve the entries (Umbraco Forms)

    Hi there,

    Umbraco 7.2.1, with Umbraco Forms. It seems umbraco/backoffice/UmbracoForms/Record/PostRetriveRecords is giving a 500 error when trying to retrieve the entries. I can see them in the database and it seems to work on the stage site and our local machines, which are in debug mode. I don't appear to have much of a clue as to the issue from the logs.

    I've done the usual:

    1. Run the usual batch script to give permissions for Umbraco
    2. Checked clientdependency.config has the appropriate settings, and it does since it contains bundleDomains=".livedomain.com,.livedomain.co.uk" and we experience the issues on our livedomain
    3. Deleted the App_Data/TEMP folder and recycled the app pool

    I didn't actually increment the clientDependency version, do I need to if I'm forcing the deletion of the TEMP folder?

    What am I missing here?

  • Comment author was deleted

    Apr 10, 2015 @ 10:04

    Any further details on the 500 error, using chrome dev tools or similar in a different browser you should be able to get some more info

  • Zac 223 posts 575 karma points
    Apr 11, 2015 @ 17:06
    Zac
    0

    There's not really any more info to give. It's the usual

    )]}',
    {"Message":"An error has occurred."}
    

    response which in the past for other packages has usually been a problem with the ClientDependency bundledomains, but I can't see anything wrong in our setup. But I have a hunch it's to do with it being Release rather than Debug since it works locally and on our stage.

  • Zac 223 posts 575 karma points
    Apr 12, 2015 @ 01:23
    Zac
    0

    Okay Tim I've managed to get more to the bottom of this, I believe. It's nothing to do with ClientDependency.

    I switched over and started debugging using the live database, since I couldn't reproduce the error - believing it must be something to do with the records.

    Low and behold, RecordController.cs is throwing an exception:

    {"After parsing a value an unexpected character was encountered: v. Path 'f5fdc823-ab6f-48fa-9f71-560ad7f5312c', line 1, position 207."}

    I manually went through some records in the database and it pretty quickly became obvious something is going wrong:

    {
      '5da4353b-67d8-4b4d-9143-73ccaf59f4af': 'stephen redacted',
      'f7255e71-62fd-4ca8-8795-f2acc30c2bca': '[email protected]',
      '24b765d9-3434-4a2b-b1a2-0a9c6fba42af': 'Other',
      'f5fdc823-ab6f-48fa-9f71-560ad7f5312c': 'I would like lorem ipsum lorem ipsum redacted ',
      'a43cdae1-707f-4d29-b6b9-660ec8f54432': '',
      '604f7ed3-92f0-4104-8139-fb8a544b6959': 'Yes'
    }
    

    Great, looks good. How about:

    {
      '5da4353b-67d8-4b4d-9143-73ccaf59f4af': 'Redacted redacted',
      'f7255e71-62fd-4ca8-8795-f2acc30c2bca': '[email protected]',
      '24b765d9-3434-4a2b-b1a2-0a9c6fba42af': 'Redacted enquiry',
      'f5fdc823-ab6f-48fa-9f71-560ad7f5312c': 'Hi  I redacted redacted lorem ipsum lorem ipsum I'mnotsureandloremipsumloremipsumloremipsum.','a43cdae1-707f-4d29-b6b9-660ec8f54432':'','604f7ed3-92f0-4104-8139-fb8a544b6959':'No'}
    

    Oh dear. Unescaped apostrophe in the data is killing the system.

    Stacktrace in the response:

    )]}',
    {"Message":"An error has occurred.","ExceptionMessage":"After parsing a value an unexpected character was encountered: v. Path 'f5fdc823-ab6f-48fa-9f71-560ad7f5312c', line 1, position 207.","ExceptionType":"Newtonsoft.Json.JsonReaderException","StackTrace":"   at Newtonsoft.Json.JsonTextReader.ParsePostValue()\r\n   at Newtonsoft.Json.JsonTextReader.ReadInternal()\r\n   at Newtonsoft.Json.JsonTextReader.Read()\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)\r\n   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)\r\n   at Umbraco.Forms.Web.BusinessLogic.FormRecordSearcher.QueryDataBase(RecordFilter model, DatabaseContext databaseContext) in f:\\TeamCity\\buildAgent\\work\\133677a4e37ceece\\Umbraco.Forms.Mvc\\BusinessLogic\\FormRecordSearcher.cs:line 80\r\n   at Umbraco.Forms.Web.Editors.RecordController.PostRetriveRecords(RecordFilter model) in f:\\TeamCity\\buildAgent\\work\\133677a4e37ceece\\Umbraco.Forms.Mvc\\Editors\\RecordController.cs:line 51\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}
    
  • Comment author was deleted

    Apr 13, 2015 @ 10:49

    Thanks for the details Zac, could you also tell me wich version of Forms you are running, you can find the version number in the file \App_Plugins\UmbracoForms\version

    Regards,
    Tim 

     

  • Zac 223 posts 575 karma points
    Apr 13, 2015 @ 19:03
    Zac
    0

    Version 4.0.2 - I realise now that 4.0.3 was released to nuget on April the 3rd. Will updating address this issue? Obviously, I'll update regardless as I have been noticing a few bugs (broken form logic, backend display issues)

    Cheers, Zac

  • Zac 223 posts 575 karma points
    Apr 14, 2015 @ 02:33
    Zac
    100

    Updating appears to have fixed the issue.

    I have had to sift through 170 records and manually replace all instances of ' with \'. Over, and over, and over. >:(

    Also it appears that Nuget completely botched the installation, and even though I had installed Umbraco Forms nuget package 4.0.2 just a few weeks ago it seemed to have installed Umbraco Forms Binaries 4.0.0 so god knows what issues that caused.

  • Comment author was deleted

    Apr 14, 2015 @ 09:54

    Ah yes that must haven caused the issue, since you where running the 4.0 core, looks like the dependencies on our nuget package wasn't setup correctly for 4.0.2 resulting in the install of the older core. I do have a little package to fix the malformed json https://www.dropbox.com/s/za3jnf5wulkrtt6/Umbraco_Forms_Json_Fixer_1.0.zip?dl=0 (this will install a new dashboard control in the dev section) so no need to do it manually

  • Zac 223 posts 575 karma points
    Apr 14, 2015 @ 10:42
    Zac
    0

    Hah, oh Tim why did you have to tell me now! About 12 hours too late from saving me from apostrophe hell :'(

    We still seem to have issues with the conditional logic in our forms. Could the botched dependencies cause any issues with the contour migration?

    We decompiled prior to updating the forms to 4.0.3 and found issues with these lines:

    Form form = this.GetForm(formId);
     model = new FormViewModel();
     model.Build(form);
    
  • Comment author was deleted

    Apr 14, 2015 @ 11:27

    Sorry first needed to know which version you where running, what are the issues with those lines, mind sending a stack trace? Or what is exactly going wrong with conditional logic?

  • Zac 223 posts 575 karma points
    Apr 14, 2015 @ 14:58
    Zac
    0

    We believe we have found the source of the conditionals problem.

    Our form names contain square brackets, a notation we use to separate out different country sites, e.g. [US] Contact Form or [GB] Enquiry. Removing them seems to fix that particular problem.

  • Comment author was deleted

    Apr 14, 2015 @ 15:01

    Ok that is a workaround then for now, but in the upcoming 4.1 the issue will be fixed so your form name won't make a difference

  • Nurhak Kaya 53 posts 147 karma points MVP 3x c-trib
    Nov 23, 2016 @ 11:14
    Nurhak Kaya
    0

    Hello Tim,

    I am experiencing a similar problem, I wonder if you can recommend me any fix about this please?

    Please see my problem details in this link.

    Thanks in advance!

  • Nurhak Kaya 53 posts 147 karma points MVP 3x c-trib
    Feb 01, 2017 @ 15:38
    Nurhak Kaya
    0

    For my case; when MemberKey value is no null in UFRecords table, it was causing this problem. I simply updated all the MemberKey values to null and it has fixed the problem for the current records - I am afraid I might see the same problem again as my fix can be only a temporary fix. Still this might be helpful.

    update [DBName].[dbo].[UFRecords] set MemberKey=null

    Umbraco Forms: "4.3.3" Umbraco version 7.4.3 assembly: 1.0.5948.18141

  • Zac 223 posts 575 karma points
    Apr 19, 2015 @ 15:47
    Zac
    0

    Hi again Tim.

    It appears that the server-side validation rendering isn't quite working right.

    We have a mandatory field that is conditionally shown if another field matches an option. But when posting the form without a value for this field, we aren't getting the "mandatory" validation error after posting back. The field itself does appear to have the required data attributes, it's just not registering as being invalid.

    I tried updating Forms to 4.1.0 hoping that this was addressed. But that has broken all forms, which now won't render.

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\ce4e605d\541219e2\App_Web_script.cshtml.b66a646f.olfsa_ac.0.cs(172): error CS0012: The type 'System.Net.Http.Formatting.FormDataCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    

    I checked System.Net.Http.Formatting was referenced (it was), and I tried adding this to web.config:

    <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
    </dependentAssembly>
    

    Error occurs here on line 140 of Forms.cshtml: http://prntscr.com/6vml84

Please Sign in or register to post replies

Write your reply to:

Draft