Install

Works with Drupal: ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 212.78 KB
MD5: 15758857daf1a08a47d5f9adb3584e8e
SHA-1: 806479160ce851657bbc46a6726a0788120a994c
SHA-256: 8a951e5c0b11f0522878fc98da8339aaf1c8f99f5c3d6ee6bfb859069cd6991f
Download zip 258.42 KB
MD5: 97f47ea6b9e599ab0c018299878e9f37
SHA-1: 535dad04795e1b25dc9a383bafc3565ed621ece8
SHA-256: d34ab7e3b1c99aff5302607be2b095d1510c1b1fc19d13a1f90f2d4d994dfc0e

Release notes

Phases 32-33: AutoSave duplicate processing, error logging completion, and statistics accuracy

Fixed AutoSave module running during bulk processing, completed error logging for all conversion rules, and corrected statistics counting logic.

Major Changes:

Phase 32: AutoSave Duplicate Processing Fix
- AutoSave module was running during bulk processing, causing duplicate processing
- Every entity saved by bulk processor triggered AutoSave hook (2x processing)
- Implemented state flag system to disable AutoSave during bulk operations
- State flag: entity_links_bulk_processor.processing
- Set at start of batch/Drush, cleared when complete (try/finally pattern)
- AutoSave checks flag and exits early if bulk processing active
- 50% performance improvement, eliminated file lock conflicts
- More stable entity saves, cleaner CSV logs

Phase 33: Error Logging Completion and Statistics Accuracy

Error Logging Enhancements:
- Added error logging to File to Media conversion rule
- File to Media now reports when file entities or media entities are not found
- All 10 conversion rules now have proper error logging with [Rule Name] prefix format
- Error CSV "Failed Rule" column now properly populated for all rule types

Rules with Error Logging (Complete):
1. Entity Link Conversion
2. Email Validation (mailto:)
3. Phone Validation (tel:)
4. SMS Validation (sms:)
5. Fax Validation (fax:)
6. Title Attribute Mismatches
7. Image to Drupal Media
8. Video to Drupal Media
9. D7 Media Token Conversion
10. File to Media (NEW)

Rules without Error Logging (By Design):
- Anchor Link Normalization (simple normalization, always succeeds)
- CSS Class Mapping (logs warnings for config issues, not processing errors)
- Style Removal (no failure cases)
- External to Internal (simple transformation, always succeeds)

Statistics Counting Fix:
- Fixed "Total Entities Processed" count in stats summary
- Was counting only entities with changes (lower than bundle totals)
- Now counts ALL entities checked, matching "By Bundle - Entities Processed"
- Fixed in both batch processing (Form) and Drush command execution
- Bundle statistics now show accurate entity counts

File to Media Error Messages:
- "File entity not found for href=\"...\""
- "File exists but no media entity references it for href=\"...\""
- "Media entity found but UUID lookup failed for href=\"...\""
- "Database error: ..." (for exceptions)

Files Changed:

Phase 32:
- src/Form/EntityLinksBulkProcessorForm.php
- Line 2321: Set processing flag at batch start
- Line 2966: Clear processing flag when batch finishes

- src/Drush/Commands/EntityLinksBulkProcessorCommands.php
- Lines 188-189, 1736-1739: try/finally pattern to set/clear flag

- modules/entity_links_autosave/entity_links_autosave.module
- Lines 17-20: Check processing flag before running AutoSave

Phase 33:
- entity_links_bulk_processor.module
- Lines 1701-1747: Modified _entity_links_bulk_processor_convert_file_to_media() to return error details
- Lines 594-596: Added error handling for file not found, media not found, UUID lookup failures
- Updated calling code to log errors with [File to Media] prefix

- src/Form/EntityLinksBulkProcessorForm.php
- Line 2682: Moved $context['results']['processed']++ to count ALL entities checked
- Line 2700: Removed from inside if ($updated) block where it only counted entities with changes

- src/Drush/Commands/EntityLinksBulkProcessorCommands.php
- Lines 650-660: Added bundle entity tracking and $processed_count++ for ALL entities
- Lines 1049-1050: Removed duplicate tracking from inside if ($updated) block

Documentation:
- CSV-LOGGING-DISCREPANCY.md: Added Phase 32 & 33 fixes to resolved issues
- DEVELOPMENT_LOG.md: Added Phase 32 & 33 complete technical documentation

Bug Fixes:

Phase 32:
- AutoSave module running during bulk processing (duplicate processing)
- Potential file lock conflicts from concurrent CSV writes
- Entity save race conditions and transaction conflicts
- 2x slower processing due to duplicate processing

Phase 33:
- File to Media conversion failures were silent (no error logging)
- Total Entities Processed stat was undercounting (only entities with changes)
- Bundle entity totals didn't match summary total (now they do)
- Error CSV missing rule names for File to Media errors

Impact:

Phase 32:
- ✅ 50% performance improvement (no duplicate processing)
- ✅ Eliminated file lock conflicts during CSV writes
- ✅ Cleaner CSV logs (no duplicate entries)
- ✅ More stable entity saves (no transaction conflicts)

Phase 33:
- ✅ Error CSV captures all File to Media conversion failures with details
- ✅ Stats summary "Total Entities Processed" now accurate and matches bundle totals
- ✅ Users can identify which file paths are failing to convert and why
- ✅ All statistics reports now consistent and accurate
- ✅ All 10 conversion rules have comprehensive error logging

Created by: whthat
Created on: 20 Jan 2026 at 08:40 UTC
Last updated: 20 Jan 2026 at 08:40 UTC
Bug fixes

Other releases