The indexBy function on EventQuery does not seem to actually return Events by the requested index.
FeedMe uses this to fetch Events on propagation to other sites. (services/Elements.php - _saveElementInternal())
This causes FeedMe to not find or use the wrong Event and propagate the Event with the wrong data to the wrong site.
Steps to reproduce
Setup a multi site Craft install
Create a calendar
Create a translatable field
Setup FeedMe
a. One for the first site
b. One for the second site
Sync different data to the field in each of the two FeedMe feeds
Expected behavior
The translated field contains the correct data according to the coupled feed.
Craft & Plugin Info (please complete the following information):
Craft Version: 4.8.9
Calendar Version: 5.0.3
Calendar Edition: Pro
Fresh Install or Upgrade: Upgrade
Additional context
Adding the following snippet to the all() method on EventQuery just before return $this->events; fixes the issue for FeedMe.
Describe the bug or issue you're experiencing
The
indexBy
function onEventQuery
does not seem to actually return Events by the requested index.FeedMe uses this to fetch Events on propagation to other sites. (
services/Elements.php - _saveElementInternal()
) This causes FeedMe to not find or use the wrong Event and propagate the Event with the wrong data to the wrong site.Steps to reproduce
Expected behavior The translated field contains the correct data according to the coupled feed.
Craft & Plugin Info (please complete the following information):
Additional context Adding the following snippet to the
all()
method onEventQuery
just beforereturn $this->events;
fixes the issue for FeedMe.Lacking proper validation of course