- 🇬🇧United Kingdom lexsoft London
Updating the module gives me a:
Entity/field definitions Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Recently read
The Status field needs to be installed. - 🇺🇦Ukraine Vadym.Tseiko
Hello guys, I have a similar problem here after the module update.
- 🇺🇦Ukraine Vadym.Tseiko
I seek further and found that if try to create view with filter on some of fields that connected to recently read module error appears that no such database table. This problem appears after update of the module.
- 🇺🇦Ukraine Vadym.Tseiko
Tried: drush updb -y, re-install the module, check updates, caches cleared. I think there need to be added some hook_entity_update or base_field_definition.
There is a missing update hook, that adds the status field to the database table. Here's the patch file.
- Status changed to Needs review
over 1 year ago 8:46am 11 August 2023 - First commit to issue fork.
- @codebymikey opened merge request.
Added a patch updating #10 which avoids the following exception being thrown if there are already some Recently Read entities in the database:
Exception thrown while performing a schema update. SQLSTATE[01000]: Warning: 1265 Data truncated for column 'status' at row 1: ALTER TABLE "recently_read" CHANGE `status` `status` TINYINT NOT NULL;
It was missing the initial value, causing the default status value to be
NULL
during the initial database update. This update ensures the default value is always populated.I also added some missing interface methods for the entity.
- First commit to issue fork.
- 🇸🇮Slovenia deaom
It's important to note, that the issues occurs with older version where the status field was introduced (1.2 I think). So if you get the latest version, you should not have the issue (this is what was probably happening with the not managing to reproduce comments). The update hook runs with no errors, I added some CS correction to the added function in the interface and also in the service (to match the interface), so leaving this to needs review but in my POV can be merged. The failing tests already have their own issue 📌 Drupal 10 Fix deprecations in tests Needs review , but if necessary the MR can be merged after the tests are passing, so test can be a blocker.
- 🇺🇦Ukraine Vadym.Tseiko
Applied local patch made from interdiff #14 - worked fine for me. Thanks guys.
- Status changed to RTBC
about 1 year ago 12:51pm 9 October 2023 From what I can see locally this works, so I'm setting the status to RTBC.
- 🇺🇦Ukraine Taran2L Lviv
Attaching a static patch from the latest changes in the MR (for composer patching purposes)