Skip to content

Webhook form doesn't pass in system.params #5512

@G-OD

Description

@G-OD

When setting the action URL for a webhook form that contains a system.params binding it doesn't get passed through

Here's an example action in the expression editor:
Image

After doing some digging in the exported code of the project it appears it doesn't actually set the system params at all in the action function and just initialises it to an empty object as shown below:

export const action = async ({
  request,
  context,
}: ActionFunctionArgs): Promise<
  { success: true } | { success: false; errors: string[] }
> => {
  try {
    const url = new URL(request.url);
    url.host = getRequestHost(request);

    const formData = await request.formData();

    const system = {
      params: {},
      search: {},
      origin: url.origin,
    };

As someone who has no idea how this works I imagine the getRemixParams function should be used instead to populate this property. The search params will also end up being an empty object also with only the origin being populated.

Is this intended behaviour or is it maybe just missing? Any help is much appreciated.

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