Page MenuHomePhabricator

replaceAll.php --rename flag does not work
Closed, ResolvedPublic

Description

Hello.
I want to replace text in title of pages.
I use replaceText.php script for it with parameter --rename. But pages don't rename, text replacing in content of pages.

Additional, I use --help, but --rename in help is disappearing:

Usage: php replaceAll.php [--conf|--dbpass|--dbuser|--debug|--dry-run|--globals|--help|--listns|--memory-limit|--mwdebug|--no-announce|--ns|--nsall|--profiler|--quiet|--regex|--replacements|--server|--show-file-format|--summary|--user|--wiki|--yes] [target] [replace]

Generic maintenance parameters:
  --help (-h): Display this help message
  --quiet (-q): Whether to supress non-error output
  --conf: Location of LocalSettings.php, if not default
  --wiki: For specifying the wiki ID
  --globals: Output globals at the end of processing for debugging
  --memory-limit: Set a specific memory limit for the script, "max"
      for no limit or "default" to avoid changing it
  --server: The protocol and server name to use in URLs, e.g.
      http://en.wikipedia.org. This is sometimes necessary because server name        detection may fail in command line scripts.
  --profiler: Profiler output format (usually "text")
  --mwdebug: Enable built-in MediaWiki development settings

Script dependant parameters:
  --dbuser: The DB user to use for this script
  --dbpass: The password to use for this script

Script specific parameters:
  --debug: Display replacements being made.
  --dry-run (-n): Only find the texts, don't replace.
  --listns: List out the namespaces on this wiki.
  --no-announce (-m): Do not announce edits on Special:RecentChanges
      or watchlists.
  --ns: Comma separated namespaces to search in (Main) .
  --nsall (-a): Search all canonical namespaces (false). If true, this
      option overrides the ns option.
  --regex (-r): This is a regex (false).
  --replacements (-f): File containing the list of replacements to be
      made.  Fields in the file are tab-separated. See --show-file-format for
      more information.
  --show-file-format: Show a description of the file format to use
      with --replacements.
  --summary (-s): Alternate edit summary. (%r is where to  place the
      replacement text, %f the text to look for.)
  --user (-u): The user to attribute this to (uid 1).
  --yes (-y): Skip all prompts with an assumed 'yes'.

Arguments:
  [target]: Target text to find.
  [replace]: Text to replace.

MediaWiki 1.31.3
PHP 7.3.27-1~deb10u1 (apache2handler)
MariaDB 10.3.27-MariaDB-0+deb10u1
ReplaceText 1.4.1 (e59e331)

Event Timeline

Antohabio updated the task description. (Show Details)
Aklapper renamed this task from Rename function don't work to Renaming page names doesn't work.May 18 2021, 9:27 AM
Yaron_Koren renamed this task from Renaming page names doesn't work to replaceAll.php --rename flag does not work.Jun 5 2023, 3:21 PM
Yaron_Koren claimed this task.
Yaron_Koren subscribed.

Sorry for the long delay. I tried using --rename, and it worked correctly for me; so I'm guessing that this problem was fixed at some point.