Skip to content

RemoteForm Profile not working with File uploads #49

@shaneonabike

Description

@shaneonabike

Thanks for your awesome work on this extension. I came across a strange little issue pertaining to File Custom Fields causing the data object to return NULL.

Setup

  • Custom Fields containing: Text field, File upload field
  • Profile matching the above

Steps to reproduce

  1. Create the profile and custom fields
  2. Setup RemoteForm and add the RemoteForm to a page (in my situation it's a Drupal page)
  3. Add the text information, and choose an image file
  4. Click Submit
  5. Receive the error message That entity is not allowed: .

Issue

Digging deeper it would seem that the issue happens in CRM/Remoteform/Page/RemoteForm.php when the data object is being parsed in json_decode. The data object returns NULL and then explodes in the sanitizeInput call. Ironically, I can use the same Profile Form and exclude the uploaded file and the data is being processed properly.

Note: For what it's worth this is injecting into a CiviCase but I don't think that would effect things

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions