Skip to content

Wrong siteId value applied when using site query param in direct feed url #1703

@bliswebagency

Description

@bliswebagency

Description

When using the Direct feed url of an import, the 'site' param does not seem to allow overriding of the current site. However other params such feedId, url, etc do work.

For example if we have defaultSite (id 1) and childSite (id 2), the two feed urls below both set the siteId to 1 and target the same site, regardless of the site param's value:

# curl https://example.com/index.php?p=actions/feed-me/feeds/run-task&direct=1&feedId=1&passkey=<passkey>&site=defaultSite

# curl https://example.com/index.php?p=actions/feed-me/feeds/run-task&direct=1&feedId=1&passkey=<passkey>&site=childSite

As a temporary fix we updated FeedController.php locally to accept a 'siteId' param so that the site id is stored with the queued task.

As we are importing a dozen languages per entry it would be ideal if we could make this work so that the imports do not have to be repeated for each site.

Steps to reproduce

  1. Get the direct feed url from feed-me

  2. Change the value of the 'site' param to a different site

  3. Check queue log for siteId value

  4. Run queue, but entries imported into the wrong site

Additional info

  • Craft version: 5.8.19
  • PHP version: 8.3
  • Database driver & version: Mariadb 10.11.13
  • Plugins & versions: Feed-me 6.11.0, Element API 4.2.0, CKEditor 4.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions