Upgrading¶
From 1.0.1 to 1.1.0¶
Run the database updates after updating the code:
drush updb
Changes that affect existing sites:
- Drupal 10.3 or later. Drupal 8 and 9 are no longer supported. Sites on them stay on 1.0.1.
- New permissions. The forms no longer use Administer site configuration. Search and Replace uses Replace field text directly in the database; Safe Search and Replace uses Replace field text through new revisions. A post-update function grants them to every role that had Administer site configuration. Review those roles afterwards.
- Confirmation step. Replace now shows the targets and a backup warning, and runs only after Confirm replace with the backup box checked.
- Case-sensitive search. Search matched without regard to case on MySQL,
while
REPLACE()was case-sensitive. Both are case-sensitive now, so search counts match what a replace changes. - Fewer columns. The direct form no longer lists IDs, language codes, text formats, numbers, serialized columns or password hashes.
- Working options. The "Case-Sensitive", "Whole Word" and "Use Regex" checkboxes had no effect. They are replaced by Match case, Whole words only and Regular expression under Matching, which work in both modules.
- Values kept after Search. The form keeps the search text, replace text, options and selection for the next search or replace.
- Drafts. Safe Search and Replace changes a newer Content Moderation draft as well as the default revision.
- Exact counts. Safe Search and Replace counts entities whose text matches, not every entity the database query returned.
- No CDN script. The field table filter no longer loads List.js from cdnjs.cloudflare.com.
- Unused table dropped. Update 8101 drops the
snr_hsitorytable, which was created on install and never used. - Safe Search and Replace on Drupal 10 and 11. The submodule declared only Drupal 8 and 9 and could not be installed on later versions. It now matches the main module, and its replace no longer stops with a fatal error.
- Deprecated methods.
SNRController::getColumnMap()andSNRController::getFieldTypes()are no longer used and will be removed in 2.0.0. Text columns come from the field storage schema.