3

Running ExpressionEngine 2.6.1 and Matrix 2.5.5

If I import/update multiple entries at once using the channel entries API, all the matrix rows inside exp_matrix_data have the same entry_id applied as the first entry that was inserted/updated.

After digging through, it's stemming from the _save method inside ft.matrix.php, the conditional in line 2376

if (empty($this->entry_id))
{
    $this->entry_id = $this->settings['entry_id'];
}

On subsequent requests, $this->entry_id is not empty, so $this->entry_id contains the previous entry_id.

I've resolved for now by updating the above code to:

if (!empty($this->settings['entry_id']))
{
    $this->entry_id = $this->settings['entry_id'];
}

That seems to have fixed the issue.

0
1

This appears to be fixed in Matrix 2.5.6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.