Loading
fix: #3636927 Fix the entity definitions and validate schedule rules
Closes https://www.drupal.org/project/earkiv/issues/3636927
One commit per item.
Commits
- Let the author fields reference users.
uidon archives and schedules gets the target typeuser.earkiv_post_update_author_references_users()updates the installed field storage definitions; the stored user IDs do not change and the column type is the same. - Give archives a label. The file name, "Archive job @id" before the archive exists, and "New archive job" for an unsaved entity. The delete form asked to delete "the Archive " before.
- Remove the storage schema handler that pointed to a missing class.
earkiv_post_update_remove_storage_schema_handler()updates the installed entity type definitions. - Depend on the File module.
- Give the schedule delete page its own title.
- Validate schedule rules. The schedule form validates the RRULE with
RRule::createFromRfcString(), and the schedule list shows "Invalid rule: …" for a rule that is already saved and invalid instead of failing.
Testing
- After
drush updatedb, the installeduiddefinitions of both entity types have the target typeuser, thestorage_schemahandler is gone, andentityDefinitionUpdateManager()->needsUpdates()is FALSE. The author of an existing archive loads as a user. - The delete form of an archive asks to delete
earkiv_67_….tar.gz. FREQ=WEEKLY;BYDAY=SU;BYHOUR=2is accepted;FREQ=SOMETIMESandhejare refused with the message from the library. With an invalid rule saved directly, the schedule list loads and shows "Invalid rule: FREQ=SOMETIMES".- phpcs (Drupal, DrupalPractice) reports no new findings caused by the changes.
AI-Generated: Yes (Used Claude Code to write the fixes, test them and write this merge request.)