Search And Replace icon
Module Id
search-and-replace
Group Id
org.jahia.se.modules
Updated
Requires Jahia
8.2.0.0
Author
smonier@jahia.com
Category
Tools and Utilities
Status
COMMUNITY info

Search And Replace group_work

search and replace search replace utils bulk administration content

Search And Replace is a Jahia v8.2+ module designed for controlled, large-scale editorial text remediation across site content. It provides a Moonstone-based back-office interface and GraphQL operations to search, preview, and replace text in a multilingual content model, with safeguards for scope control, input validation, and operational reliability.

The module is intended for enterprise content operations such as:

  1. Regulatory wording updates across many pages/components.
  2. Brand or terminology migrations.
  3. Multilingual content harmonization.
  4. Bulk text correction with controlled review and execution.

Dependencies & Dependants

Dependencies
  • NONE
Dependants
  • NONE

FAQ

  1. What does this module do?
    It lets editors/admins search and replace text across Jahia site content, with filters, preview, and controlled execution.

  2. Where do I access it?
    In JContent, under Content Tools (admin route registered by the module).

  3. Does it work on all sites automatically?
    No. The module must be installed/active and available on the target site.

  4. Which workspace is used for search/replace?
    default (EDIT) workspace, not LIVE directly.

  5. Does search support multilingual content?
    Yes. You choose a language, and matching uses translation nodes (j:translation_<lang>) when present.

  6. Can it find text inside richtext HTML?
    Yes. It normalizes HTML content and searches the textual value.

  7. Is accent-sensitive search supported (e.g., French accents)?
    Search is accent-tolerant/case-insensitive in matching logic.

  8. Which property types are scanned/replaced?
    STRING and multi-valued STRING[] properties.

  9. Why are some matched properties not replaceable?
    Protected/read-only properties are shown but not updated.

  1. Can I restrict replacement to specific properties?
    Yes. In the replace modal, you can select properties to update.

  2. How is replacement mode chosen?
    EXACT_MATCH, CASE_INSENSITIVE, or REGEX.

  3. Why do I get Field 'searchAndReplace' in type 'Mutation' is undefined?
    Usually deployment/schema mismatch. Redeploy the jar, ensure module is started, refresh/restart Jahia if needed.

  4. Why do I get Unknown type 'SearchFiltersInput'?
    Use InputSearchFiltersInput in GraphQL requests (generated input type name).

  5. Why do date filters seem inconsistent?
    Use valid date inputs and apply filters. Supported formats include yyyy-MM-dd, dd/MM/yyyy, dd-MM-yyyy, MM/dd/yyyy, and ISO datetime.

  6. Is there a hard result limit?
    UI does not send a limit by default. API supports optional limit. Backend still has scan guardrails for performance/safety.

  7. How do I know if all results were scanned?
    Check truncated in searchNodes response. true means the scan hit guardrails or stopped early.

  8. Can it replace outside the selected site?
    No. Replacement is restricted to /sites/{siteKey}/.

  9. How do I build/install it?
    Run mvn clean install, then install target/search-and-replace-1.0.0-SNAPSHOT.jar via Jahia Module Manager.

  10. Why does local yarn build:production sometimes fail?
    Local Yarn version mismatch can happen. Prefer Maven build, which uses the module’s pinned Node/Yarn toolchain.

  11. Can I preview before executing replacement?
    Yes. Preview is built-in and should be used for validation before large operations.

 

How To Install

  1. Build the module jar from the project root:

mvn clean install

  1. Confirm the artifact exists:

ls -l target/search-and-replace-1.0.0-SNAPSHOT.jar

  1. Install it in Jahia:
    • Open Jahia Administration > Modules.
    • Upload/install target/search-and-replace-1.0.0-SNAPSHOT.jar.
    • Start the module if not auto-started.
  2. Verify module activation:
    • Check module status is Started in Module Manager.
    • Optionally check logs for GraphQL extension/provider activation.
  3. Use it on a site:
    • Open JContent for a site where the module is installed.
    • Go to Content tools and open Search and Replace.
  4. If not visible:
    • Ensure the module is installed for that site (search-and-replace).
    • Clear browser cache and refresh JContent.
    • Restart Jahia if GraphQL schema cache didn’t refresh.

Images

License

MIT License

Copyright (c) 2026 Stephane Monier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.