Reference:ContentTransfer: Difference between revisions

hw>Mlink-rodrigue
No edit summary
 
Redaktion (talk | contribs)
No edit summary
Tag: 2017 source edit
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{BSExtensionInfobox
{{BSExtensionInfobox
|removed=No
|desc=Copies new or existing wiki pages into a different wiki. (v3.2 and up)
|desc=Copies new or existing wiki pages into a different wiki. (v3.2 and up)
|status=stable
|status=stable
|developer=HalloWelt
|developer=HalloWelt
|type=BlueSpice
|type=BlueSpice
|edition=BlueSpice Farm (deactivated)
|edition=BlueSpice farm
|compatible=BlueSpice
|compatible=BlueSpice
|category=Quality Assurance
|category=Administration
|license=GPL v3
|license=GPL v3
|active=No
|features=Users with the appropriate authorization can copy up to 200 pages per transfer from a wiki to the same namespace of a target wiki. This extension usually requires BlueSpice farm.
}}
Users with the appropriate authorization can copy up to 200 pages per transfer from a wiki to the same namespace of a target wiki. This extension usually requires BlueSpice Farm.


Depending on the settings selected on the ContentTransfer special page, the following files are copied:
Depending on the settings selected on the ContentTransfer special page, the following files are copied:


*the selected wiki pages
* the selected wiki pages
*the related category pages
* the related category pages
*the book page associated with wiki pages
* the book page associated with wiki pages
*the templates associated with wiki pages
* the templates associated with wiki pages
*attached files
* attached files
 
==Technical information==
{{Box Note|boxtype=important|Note text=The extension is deactivated by default and must first be activated in 060-ContentTransfer under settings.d - or in the LocalSettings.custom.php in the installation folder (not just in a single farm instance):
 
 
wfLoadExtension ('ContentTransfer');}}


===<span class="mw-headline" id="Konfiguration" style="box-sizing: inherit;">Configuration</span>===
=== <span class="mw-headline" id="Konfiguration" style="box-sizing: inherit;">Configuration</span> ===
The following information is necessary to transfer content between two wiki instances:
The following information is necessary to transfer content between two wiki instances:


Line 50: Line 43:


'''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="2" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>'''
'''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="2" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>'''
[[File:Reference:contentTransfer-bot-settings.png|alt=Bot user settings|thumb|Bot user settings]]
 
A user name in the form of  <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><username>@<id></code>.  
A user name in the form of  <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><username>@<id></code>.  


The bot user has to be generated from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Special:BotPasswords</code>  in the target wiki. After you click "Create", a page for selecting the bot rights is shown. Activate the following settings:
The bot user has to be generated from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Special:BotPasswords</code>  in the target wiki. After you click "Create", a page for selecting the bot rights is shown. Activate the following settings:


*High-volume editing
* High-volume editing
*Edit existing pages
* Edit existing pages
*Edit protected pages
* Edit protected pages
*Create, edit and move pages,
* Create, edit and move pages,
*Upload new files
* Upload new files
*Upload, replace and move files
* Upload, replace and move files


'''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>'''
'''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>'''
Line 77: Line 70:
     <span class="s2" style="box-sizing: inherit;">"displayText"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<target-instance-label>"</span><span class="p" style="box-sizing: inherit;">,</span>
     <span class="s2" style="box-sizing: inherit;">"displayText"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<target-instance-label>"</span><span class="p" style="box-sizing: inherit;">,</span>
  <span class="p" style="box-sizing: inherit;">];</span>
  <span class="p" style="box-sizing: inherit;">];</span>
If ContentTransfer is used without the extension [[:de:Referenz:MergeArticles|MergeArticles]], the information about drafts has to be deactivated in the settings block:
If ContentTransfer is used without the extension [[:de:Referenz:MergeArticles{{!}}MergeArticles]], the information about drafts has to be deactivated in the settings block:
  # "draftNamespace" => "Draft",  
  # "draftNamespace" => "Draft",  
  "pushToDraft" => false,
  "pushToDraft" => false,
Line 89: Line 82:
     "displayText" => "Mein Wiki",
     "displayText" => "Mein Wiki",
  ];
  ];
{{Box Note|boxtype=note|Note text=To conclude the confguration, you need to run update.php}}
{{Messagebox{{!}}boxtype=note{{!}}Note text=To conclude the confguration, you need to run update.php}}


=== Additional settings: ===
=== Additional settings ===
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferIgnoreInsecureSSL</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Ignore invalid SSL certificates (for test systems)</span>
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferIgnoreInsecureSSL</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Ignore invalid SSL certificates (for test systems)</span>
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferPageLimit</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="mi" style="box-sizing: inherit;">200</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Max number of pages to be allowed at one</span>  
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferPageLimit</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="mi" style="box-sizing: inherit;">200</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Max number of pages to be allowed at one</span>  
Line 97: Line 90:
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferAllowTalkNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Allow talk namespaces to be selected in filters</span>
  <span class="nv" style="box-sizing: inherit;">$wgContentTransferAllowTalkNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Allow talk namespaces to be selected in filters</span>


===<span class="mw-headline" id="Anforderungen" style="box-sizing: inherit;">Anforderungen</span>===
=== <span class="mw-headline" id="Anforderungen" style="box-sizing: inherit;">Requirements</span> ===
ContentTransfer requires [[:de:Referenz:BlueSpiceFoundation|BlueSpiceFoundation]]. Pages that already exist in the target wiki, can be merged using the extension [[:de:Referenz:MergeArticles|MergeArticles]].
ContentTransfer requires [[:de:Referenz:BlueSpiceFoundation{{!}}BlueSpiceFoundation]]. Pages that already exist in the target wiki, can be merged using the extension [[:de:Referenz:MergeArticles{{!}}MergeArticles]].
 
===Certificates===
If self-signed certificates are being used (and if no outbound connections are allowed) one must set
<syntaxhighlight lang="text">
$GLOBALS['wgWikiFarmConfig_internalServer'] = 'http://wiki-web:9090';
</syntaxhighlight>
in <code>data/bluespice/pre-init-settings.php</code>.
 
=== Permissions ===
To transfer pages from a source to other target wikis, users need the permission ''content-transfer''. By default, it is contained in the ''admin'' role.
[[Category:Extension]]
[[Category:Extension]]
}}
{{wcagCheck
|wcagStatus=2-testing complete
|wcagCheckedfor=Authoring tool
|wcagTestdate=2022-08-10
|wcagLevel=AA
|wcagSupport=partially supports
|wcagWorkaround=No
|wcagComments=Small keyboard issue: Transfer button is difficult to focus. Could use shortcut like VE Save button (Shift+alt+S)
Screenreader accessibility: multiple issues
[[erm:29524]]
|extensionType=extended
|extensionFocus=organizer
}}

Latest revision as of 07:41, 23 April 2025

Extension: ContentTransfer

all extensions


Overview
Description: Copies new or existing wiki pages into a different wiki. (v3.2 and up)
State: stable Dependency: BlueSpice
Developer: HalloWelt License: GPL v3
Type: BlueSpice Category: Administration
Edition: BlueSpice farm Version: 4.1+

Features

Users with the appropriate authorization can copy up to 200 pages per transfer from a wiki to the same namespace of a target wiki. This extension usually requires BlueSpice farm.

Depending on the settings selected on the ContentTransfer special page, the following files are copied:

  • the selected wiki pages
  • the related category pages
  • the book page associated with wiki pages
  • the templates associated with wiki pages
  • attached files

Configuration

The following information is necessary to transfer content between two wiki instances:

<source-instance-name>

Name of the source wiki. This is the directory name from /opt/mediawiki/w/_sf_instances/ .

<target-instance-descriptive-name>

Descriptive name of the target wiki. This is usually the same as <target-instance-name>, but can be chosen freely to better describe the instance. Does not allow spaces.

<target-instance-name>

Name of the target wiki. This is the directory name from /opt/mediawiki/w/_sf_instances/ . It can be extracted from the url of the wiki instance.

<target-instance-label>

The display name for the target wiki. It can contain empty spaces. This information is optional and can be commented out.

<servername>

Server-url

<bot-username-provided>

A user name in the form of <username>@<id>.

The bot user has to be generated from Special:BotPasswords in the target wiki. After you click "Create", a page for selecting the bot rights is shown. Activate the following settings:

  • High-volume editing
  • Edit existing pages
  • Edit protected pages
  • Create, edit and move pages,
  • Upload new files
  • Upload, replace and move files

<bot-password-provided>

The password is created in the wiki and needs to be used in the settings below.

With all this info, open /opt/mediawiki/w/_sf_instances/<source-instance-name>/LocalSettings.custom.php .

Add the following info:

$wgContentTransferTargets['<target-instance-descriptive-name>'] = [
    "url" => "https://<servername>/<target-instance-name>/api.php",
    "user" => "<bot-username-provided>",
    "password" => "<bot-password-provided>",
    "draftNamespace" => "Draft",
    "pushToDraft" => true,
    "displayText" => "<target-instance-label>",
];

If ContentTransfer is used without the extension MergeArticles, the information about drafts has to be deactivated in the settings block:

# "draftNamespace" => "Draft", 
"pushToDraft" => false,

Example:

$wgContentTransferTargets['MeinWiki'] = [
    "url" => "http://172.16.200.23/MeinWikiName/api.php",
    "user" => "Snow@Schneewittchen",
    "password" => "uuicqdv9mubfrepbpqu1bvsl5957cpa9",
 #  "draftNamespace" => "Draft",
    "pushToDraft" => false,
    "displayText" => "Mein Wiki",
];

{{Messagebox|boxtype=note|Note text=To conclude the confguration, you need to run update.php}}

Additional settings

$wgContentTransferIgnoreInsecureSSL = false; // Ignore invalid SSL certificates (for test systems)
$wgContentTransferPageLimit = 200; // Max number of pages to be allowed at one 
$wgContentTransferOnlyContentNamespaces = true; // Only allow content namespaces to be selected in filters
$wgContentTransferAllowTalkNamespaces = false; // Allow talk namespaces to be selected in filters

Requirements

ContentTransfer requires BlueSpiceFoundation. Pages that already exist in the target wiki, can be merged using the extension MergeArticles.

Certificates

If self-signed certificates are being used (and if no outbound connections are allowed) one must set

$GLOBALS['wgWikiFarmConfig_internalServer'] = 'http://wiki-web:9090';

in data/bluespice/pre-init-settings.php.

Permissions

To transfer pages from a source to other target wikis, users need the permission content-transfer. By default, it is contained in the admin role.



Accessibility

Test status: 2-testing complete
Checked for: Authoring tool
Last test date: 2022-08-10
WCAG level: AA
WCAG support: partially supports (workaround: No)
Comments:

Small keyboard issue: Transfer button is difficult to focus. Could use shortcut like VE Save button (Shift+alt+S)

Screenreader accessibility: multiple issues

erm:29524

Extension type: extended
Extension focus: organizer



To submit feedback about this documentation, visit our community forum.