EE 2.6.1, Matrix 2.5.10, Structure 3.3.13, Wygwam 3.2.2

Matrix field data outputs on the frontend, but matrix rows disappear when editing a specific entry.

The matrix data still appears on the front-end even after clearing all caches but when editing the entry it appears the Matrix rows and data are gone but it still exists in the exp_matrix_data table.

Found that our matrix field_id_x with the missing rows contained the value YTowOnt9 which base64 decodes to a:0:{}. Any ideas if an older version of Matrix once stored a serialized array? If we delete the string YTowOnt9 the matrix rows for that field reappear.

Each row there are a total of 7 columns. In each row there are 2 file upload fields, and 5 text fields.

When we save an entry now with Matrix 2.5.10 and the value YTowOnt9 exists in field_id_x, the matrix data is removed from the exp_matrix_data table. If the channel_data field_id_x column is blank or has a value of 1 that matrix data is retained.

Was wondering if anyone had any idea on where YTowOnt9 was coming from? A previous version of Matrix? Another add-on that is modifying the value of field_id data?


Issue was with DataGrab 1.8.0

If a matrix field has a value and DataGrab has the field option "Action to take when an entry is updated" is set to, "Delete all existing rows" even though there are no selected columns to import from. DataGrab will populate that field with 'YTowOnt9' which is base64 that decodes to a:0:{} breaking the connection with the Matrix table data for that entry. The client was re-editing these entries and the matrix data was being erased because of the broken relationship between exp_channel_data and exp_matrix_data.

Older versions of the Matrix fieldtype I believe stored it's data serialized.

This was fixed by running a query on all matrix field types which had the value YTowOnt9 and clearing it. Matrix will find all the existing data by itself if done in the correct order.

  1. Change DataGrab settings

Changed DataGrab setting for Matrix fieldtypes: "Action to take when an entry is updated" to "Keep existing rows and append new"

  1. Run SQL fix on all field_ids affected
  2. Run DataGrab import again
| improve this answer | |

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.