Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    May 17, 2019 @ 12:49
    Matt Brailsford
    0

    Allowed file types not loading

    Hi,

    I was wondering if anyone had seen an issue with the forms editor not loading the allowed file types list in the back office for the upload control?

    This is a pretty old system mind in Umbraco 7.3.1 though not quite sure what version Perplex Forms is.

    There is a PerplexUmbracoFrms.config file in App_Plugins and it does have a list of allowed extensions, however they just don't appear to be loading in the back office. This then in turn prevents any file type from being allowed on the front end so the upload control just won't work.

    Has anyone seen this in any legacy versions? (They do have a site which is on a newer version of Umbraco that doesn't have this issue so it's entirely possible it's been fixed at some point).

    Matt

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 17, 2019 @ 13:24
    Daniël Knippers
    0

    Hi Matt,

    I see on the package page that there have been known issues with the File Upload:

    Version 1.55 and below do not work properly with Umbraco Forms 4.4, in particular the File Upload file types. Please use version 1.6 and up. Similarly, version 1.6 and higher may not work well with Umbraco Forms < 4.4, so use 1.55 or earlier for those versions.

    So it's possible you are currently using a "wrong" version (e.g. the site is on Forms 4.4+ and is using 1.55 or below of our package, which is described as "not working properly" with File Upload fields).

    Now I do not believe this package sets the Assembly(Informational)Version properly (sorry about that), so the DLL will not show the right version but you should be able to just check the Installed Packages section in Umbraco to get it.

    In addition to the above, I have changed some stuff related to the Allowed File Types setting to fix an exception some time ago for newer versions, see here. I do not remember all details but if I recall the checkboxes were indeed not showing up at all in the field configuration, which that commit fixed.

    Not sure to what extent you are able to debug this, but when you open the settings of a field type the allowed extensions are retrieved with a call to /umbraco/backoffice/api/PerplexUmbracoForm/GetFileUploadAllowedExtensions. It might error out for your case there.

    If so you could also try to install the latest version, but since you mention this is some old installation I assume they also do not have the latest Forms version in which case it might not be compatible..

    Good luck!

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    May 17, 2019 @ 13:41
    Matt Brailsford
    0

    Hey Daniël

    Some really useful starting points so thank you. I've just checked in the umbraco packages section and the version are:

    • Umbraco Forms = 4.4.0
    • Perfplex Forms = 1.6

    In theory, based on your comments, this should be valid config (I think).

    I did do a bit of debugging and I'm not seeing any API call for GetFileUploadAllowedExtensions rather it appears the dialog just looks in the models passed in config so maybe something isn't quite right here.

    I'll have a look into the code snippet you linked to and see if that sheds any light, but do let me know if anything above sparks any other thoughts.

    We are due to perform a large upgrade for this client so fingers crossed that resoles it permanently, but that's not for a few weeks and they are keen to get the form out there in the interim so fingers crossed I can find some kind of solution.

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 17, 2019 @ 14:14
    Daniël Knippers
    0

    Yeah the versions seem fine.

    Strange that there's no API call going out. The allowed file types is a simple checkboxlist which retrieves its values that way. This happens here so perhaps you can figure out why this does not happen.

    The HTML of the Allowed File Types setting should look roughly like the attached image. checkboxlist html

    For completeness I have added a screenshot of how it looks in one of our projects (Forms 4.4.2, 1.6 of our package as well). So the HTML I posted above should appear below the "Allowed file types" label.

    file upload config

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    May 20, 2019 @ 07:32
    Matt Brailsford
    101

    Ok, so I think I've found a solution.

    It appears that my PerplexcheckboxConttroller isn't passed $scope.model, rather it is opened in a dialog so is passed $scope.dialogOptions.

    It may be that I have a messed up upgrade, but I managed to solve it be adding the following line:

    enter image description here

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 20, 2019 @ 08:41
    Daniël Knippers
    0

    Oh, that's strange. Looks like some Umbraco or Umbraco Forms version mismatch somewhere indeed... Well, if that adjustment fixes it for you then great :)!

  • Heather Floyd 604 posts 1002 karma points MVP 5x c-trib
    Jun 13, 2019 @ 18:38
    Heather Floyd
    0

    I had the same issue as Matt, and his fix worked for me.

    • Umbraco Cloud site version 7.14.0
    • Umbraco Forms version 7.1.1
    • Umbraco Forms on Perplex Steroids package version 1.8.3
Please Sign in or register to post replies

Write your reply to:

Draft