- achap 🇦🇺
So I think this is actually a bug and not just with moderated entities. Initially I thought it was due to the referenced core bug (which is why marking revisions as outdated was hidden in the first place in core for moderated entities) but I was actually able to reproduce it for unmoderated entities too on a freshly installed site without any of my custom code.
Steps to reproduce:
- Setup a fresh ddev instance of Drupal https://ddev.readthedocs.io/en/latest/users/quickstart/#drupal
- Require tmgmt with composer and install via drush.
- Enable the tmgmt_test module via drush so the test translator is available.
- Enable German as a language.
- Enable Spanish as a language
- Make the default article bundle translatable along with all fields
- Setup a continuous job for the article in German using test translator
- Setup a continuous job for the article in Spanish using test translator
- Create an article and save it
- Run the following SQL and you should see two inactive continuous jobs
select tji.item_id, tji.tjiid, tj.target_language from tmgmt_job_item as tji join tmgmt_job as tj on tji.tjid = tj.tjid where tj.job_type = 'continuous' and tji.state = 'inactive';
- Run
ddev drush php-eval "tmgmt_cron();"
and then run the SQL above again and there should be no inactive job items. - Go to the article in the original language and click mark translation as outdated then save it.
- Now if you run the SQL again there should be two inactive items
- Now run
ddev drush php-eval "tmgmt_cron();"
again and when you run your SQL you will see one job item remaining.
Now matter how many times you run tmgmt_cron() via drush from there there is always one remaining inactive item and it alternates between de and es. It's like one is always marking the other as outdated.
Would appreciate if someone else can confirm my steps to reproduce. Would potentially think about marking this as major if it's confirmed as this can cause a huge amount of revisions/costs from re translation.
Versions: Drupal core 11.1.8, tmgmt 1.17.0