EthanGaming7640 (talk | contribs) m user name → username, using find and replace, mediawiki → MediaWiki Tag: 2017 wikitext editor |
|||
(51 intermediate revisions by 29 users not shown) | |||
Line 1: | Line 1: | ||
{{Update|documentation|type=Wikipedia Help page}} |
|||
⚫ | |||
{{Linking and page manipulation|linking and diffs}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
On Wikimedia wikis upload import is disabled; moreover, on many Wikimedia wikis transwiki import is disabled too, it gives {{msg|importnosources}}: "No transwiki import sources have been defined and direct history uploads are disabled." However, pages from [[foundation:]], [[w:]] and [[:cs:]] can currently be imported to Meta, and pages from Meta can be imported to [[mw:]]. The act of importing is added to the page history and to [[Special:Log/import]]. |
|||
⚫ | |||
⚫ | |||
'''Others''' apply [[Wikipedia:Requests for page importation]]. |
|||
How to export, and the format of exported pages, is described at [[Help:export]]. Normally any user can export wiki pages to a file, but to import pages into a wiki from a file, you must have 'Sysop' privileges on that wiki. So if you have your own MediaWiki installation, then you should be able to see the 'Special:Import' page there. |
|||
⚫ | After importing, you would be able to see any new pages that were in the file. Where pages had the same name as existing pages in the wiki, the pages will be overwritten by the content from the file if the timestamp of the article is newer. If an error occurred during the import, e.g. due to badly formatted XML in the file, then you may find the import is partially complete (some pages imported, but not all). Since pages are overwritten, attempting the import again should not be a problem. |
||
To import wiki pages from your file, simply click browse to locate the file on your local file system. |
|||
⚫ | After importing, you |
||
If you included history information when you performed the export, then you should also see information about the edits in the 'history' of the imported pages, and in the user contributions. The edits will not show up in 'recent changes' (neither positioned at the time of the original edit, nor at the time of importing). |
If you included history information when you performed the export, then you should also see information about the edits in the 'history' of the imported pages, and in the user contributions. The edits will not show up in 'recent changes' (neither positioned at the time of the original edit, nor at the time of importing). |
||
=== Editing the import file === |
|||
Composer Fred Onovwerosuoke’s diverse background has given rise to a varied compositional style. Born in Ghana to Nigerian parents, Onovwerosuoke grew up in both countries and eventually naturalized in the United States. "FredO", as friends call him, has traveled in more than thirty African countries doing field work and analyzing some of Africa’s abundant music traditions. "I see hidden across Africa a gold-mine of unlimited musical scales and modes, melodic and harmonic traditions, and, yes, rhythms - abundant yet largely untapped," says Onovwerosuoke of his dominant influences, and also maintains that "my compositions are informed by my travels around the world, and each piece is harnessed and nurtured by an African sensibility that is unmistakable and genuine." FredO has also traveled extensively in the American Deep South, the Caribbean and South America for comparative research in what he likes to call "traceable musical Africanisms." His influences are wide and varied, and is much at home discussing Handel and Mozart as he is talking about the gonje, mbira, kora, kontingu and balafon riffs, or foremost exponents of African traditional music. In 1994 he founded the St. Louis African Chorus to help nurture African choral music as a mainstream repertoire for performance and education. Today, the organization's mission has broadened to include other art music by composers of African-descent and renamed African Musical Arts Inc. |
|||
In the case of upload import, because of the simple readable file format the XML file can easily be edited between exporting and importing. This should be done with caution and integrity, one can make antedated edits and use false usernames, and in combination with deletion, one can "[[w:en:historical revisionism|change history]]". Applications of this editing include: |
|||
*adding a note to the edit summary about the importing |
|||
Onovwerosuoke's works have been featured in audio recordings, films, documentaries and radio, including Robert De Niro's film, The Good Shepherd, William-Chapman Nyaho's CD, ASA and Hymes/Hollister's CD African Art Music for Flute and his demo CD, Landscapes of Africa: Music for Orchestra is a much-demanded item for orchestral conductors shopping for classical music by non-European descent composers. His numerous awards include the ASCAPLUS Award, as well as Honorable Mention by the Minnesota Orchestra Composer Institute. His new book, Songs of Africa: 22 Pieces for Mixed Choirs published by Oxford University Press has quickly become a favorite among choral directors across the United States and globally. The first volume of Fred Onovwerosuoke's Twenty-four Studies in African Rhythms also rose the charts and is one of the most-demanded African-rhythm influenced piano studies known. His other significant publications are distributed by the African Music Publishers and on Amazon. Fred Onovwerosuoke serves on several boards and is a voting member of The Recording Academy and other professional bodies. He has been Editor of the Voice of African Music newsletter (ISSN: 1938-2332) since 1993 and a founding trustee of the International Consortium for Music of African & its Diaspora (ICMAD) in 2000. Onovwerosuoke maintains an active schedule as conductor, lecturer, cross-cultural educator, and composer-in-residence. |
|||
*changing usernames and/or page names to avoid name conflicts (just between the title tags and between the username tags or also in links and signatures) |
|||
*changing namespace names into the generic or the applicable ones (ditto) |
|||
Note that if two versions of the page have the same timestamp (because one was uploaded with the same timestamp as a preexisting version), the later (imported) version will show up in the edit history but not in the article itself. |
|||
=== Merging histories and other complications === |
=== Merging histories and other complications === |
||
If the import includes history information, and the edits involved a |
If the import includes history information, and the edits involved a username that in the importing project is used by somebody else, then upload import should be applied, and the occurrences of the username in the XML file should first be replaced by another name, to avoid ambiguity. If the username was not used yet in the importing project then the user contributions are available anyway, although an account is not automatically created. |
||
Just like when a page is referred to in a link, and/or put in a URL, generic namespace names are automatically converted, and if a prefix is not a namespace name the page will arrive in the main namespace. However, e.g. "Meta:" may be ignored (dropped) on a project that uses that prefix for interwiki linking. It may be desirable to change it in the XML file to "Project:" before importing. |
Just like when a page is referred to in a link, and/or put in a URL, generic namespace names are automatically converted, and if a prefix is not a namespace name the page will arrive in the main namespace. However, e.g. "Meta:" may be ignored (dropped) on a project that uses that prefix for interwiki linking. It may be desirable to change it in the XML file to "Project:" before importing. |
||
Line 28: | Line 30: | ||
An edit summary may refer to, and possibly link to, another page. This may be confusing when the page has been imported but the target page has not. |
An edit summary may refer to, and possibly link to, another page. This may be confusing when the page has been imported but the target page has not. |
||
The edit summary does not automatically show that the page has been imported, but in the case of upload import that can be added to the edit summaries in the XML file before importing. That can avoid some potential sources of ambiguity and/or confusion. When editing the XML file with find/replace, note that adding a text to the edit summaries requires distinguishing between edits |
The edit summary does not automatically show that the page has been imported, but in the case of upload import that can be added to the edit summaries in the XML file before importing. That can avoid some potential sources of ambiguity and/or confusion. When editing the XML file with find/replace, note that adding a text to the edit summaries requires distinguishing between edits that already have an edit summary, hence comment tags in the XML file, and those without these tags. If there are multiple pairs of comment tags, only the last one is effective. |
||
=== Large-scale transfer === |
=== Large-scale transfer === |
||
Line 34: | Line 36: | ||
Large files may be rejected for two reasons. The PHP upload limit, found in PHP configuration file php.ini |
Large files may be rejected for two reasons. The PHP upload limit, found in PHP configuration file php.ini |
||
<syntaxhighlight lang="ini"> |
|||
<pre> |
|||
; Maximum allowed size for uploaded files. |
; Maximum allowed size for uploaded files. |
||
upload_max_filesize = 20M |
upload_max_filesize = 20M |
||
</syntaxhighlight> |
|||
</pre> |
|||
And also the hidden variable limiting the size in the input form. Found in the |
And also the hidden variable limiting the size in the input form. Found in the MediaWiki source code, ''includes/specials/SpecialImport.php'' |
||
< |
<syntaxhighlight lang="xml"><input type='hidden' name='MAX_FILE_SIZE' value='20000000' /></syntaxhighlight> |
||
Maybe you should change following four derectives in php.ini |
Maybe you should change following four derectives in php.ini |
||
<syntaxhighlight lang="ini"> |
|||
; Maximum size of POST data that PHP will accept. |
|||
post_max_size = 20M |
|||
max_execution_time = 1000 ; Maximum execution time of each script, in seconds |
|||
max_input_time = 2000 ; Maximum amount of time each script may spend parsing request data |
|||
; Default timeout for socket based streams (seconds) |
|||
default_socket_timeout = 2000 |
|||
</syntaxhighlight> |
|||
==See also== |
==See also== |
||
* |
* [[Wikipedia:Copying within Wikipedia|''Copying within Wikipedia'']]: editing guideline for inter-Wikipedia copying. |
||
* [[Help:Export]]: how to export pages |
|||
⚫ | |||
* [[Wikipedia:How to import articles]]: may need updating |
|||
* [[Wikipedia:Requests for page importation]] |
|||
[[ar:مساعدة:استيراد]] |
|||
⚫ | |||
[[de:Hilfe:Artikel importieren]] |
|||
* [[meta:Help:Import]] |
|||
{{Wikipedia technical help|collapsed}} |
|||
[[Category:Wikipedia administrator help]] |
[[Category:Wikipedia administrator help]] |
Latest revision as of 18:06, 12 November 2021
Linking and page manipulation |
---|
Importers, transwiki importers, and administrators can apply two types of import using the Special:Import page:
- Transwiki import or interwiki import: import pages directly from another WMF wiki; the settings of the destination wiki determine which source wikis are enabled; message with id 'import-interwiki-text' (talk) appears. Transwiki imports can be performed by administrators and transwiki importers.
- Importupload: import a file in a special XML format produced by exporting pages from another wiki; message with id 'importtext' (talk) appears. This type of import is restricted to importers and stewards.
Others apply Wikipedia:Requests for page importation.
After importing, you would be able to see any new pages that were in the file. Where pages had the same name as existing pages in the wiki, the pages will be overwritten by the content from the file if the timestamp of the article is newer. If an error occurred during the import, e.g. due to badly formatted XML in the file, then you may find the import is partially complete (some pages imported, but not all). Since pages are overwritten, attempting the import again should not be a problem.
If you included history information when you performed the export, then you should also see information about the edits in the 'history' of the imported pages, and in the user contributions. The edits will not show up in 'recent changes' (neither positioned at the time of the original edit, nor at the time of importing).
Editing the import file
In the case of upload import, because of the simple readable file format the XML file can easily be edited between exporting and importing. This should be done with caution and integrity, one can make antedated edits and use false usernames, and in combination with deletion, one can "change history". Applications of this editing include:
- adding a note to the edit summary about the importing
- changing usernames and/or page names to avoid name conflicts (just between the title tags and between the username tags or also in links and signatures)
- changing namespace names into the generic or the applicable ones (ditto)
Note that if two versions of the page have the same timestamp (because one was uploaded with the same timestamp as a preexisting version), the later (imported) version will show up in the edit history but not in the article itself.
Merging histories and other complications
If the import includes history information, and the edits involved a username that in the importing project is used by somebody else, then upload import should be applied, and the occurrences of the username in the XML file should first be replaced by another name, to avoid ambiguity. If the username was not used yet in the importing project then the user contributions are available anyway, although an account is not automatically created.
Just like when a page is referred to in a link, and/or put in a URL, generic namespace names are automatically converted, and if a prefix is not a namespace name the page will arrive in the main namespace. However, e.g. "Meta:" may be ignored (dropped) on a project that uses that prefix for interwiki linking. It may be desirable to change it in the XML file to "Project:" before importing.
If a page name exists already, importing revisions of a page with that name causes the page histories to be merged. Note that after inserting a revision between two existing revisions in the page history, the change made by the user who made the next edit seems different from what it actually has been: to see the actual change made by the user one has to take the diff between the two already existing revisions, not the diff with respect to the inserted one. Therefore this should not be done except to reconstruct the true page history.
A revision is not imported if a revision of the same date, and exactly the same time up to the second, exists already. In practice this occurs only when the revision has already been imported before, or when the revision one attempts to import was imported the other way around, or both were imported from a third site.
An edit summary may refer to, and possibly link to, another page. This may be confusing when the page has been imported but the target page has not.
The edit summary does not automatically show that the page has been imported, but in the case of upload import that can be added to the edit summaries in the XML file before importing. That can avoid some potential sources of ambiguity and/or confusion. When editing the XML file with find/replace, note that adding a text to the edit summaries requires distinguishing between edits that already have an edit summary, hence comment tags in the XML file, and those without these tags. If there are multiple pairs of comment tags, only the last one is effective.
Large-scale transfer
For a large-scale transfer, somebody with sufficient system privileges can move data within the server, which is more practical than sending large XML files from the server to a user's local computer and then back to the server.
Large files may be rejected for two reasons. The PHP upload limit, found in PHP configuration file php.ini
; Maximum allowed size for uploaded files.
upload_max_filesize = 20M
And also the hidden variable limiting the size in the input form. Found in the MediaWiki source code, includes/specials/SpecialImport.php
<input type='hidden' name='MAX_FILE_SIZE' value='20000000' />
Maybe you should change following four derectives in php.ini
; Maximum size of POST data that PHP will accept.
post_max_size = 20M
max_execution_time = 1000 ; Maximum execution time of each script, in seconds
max_input_time = 2000 ; Maximum amount of time each script may spend parsing request data
; Default timeout for socket based streams (seconds)
default_socket_timeout = 2000
See also
- Copying within Wikipedia: editing guideline for inter-Wikipedia copying.
- Help:Export: how to export pages
- Wikipedia:How to import articles: may need updating
- Wikipedia:Requests for page importation
- meta:Data dumps describes the maintenance script maintenance/importDump.php, which provides an alternative import mechanism, but hasn't always remained in working order with recent MediaWiki releases
- meta:Help:Import