Mediawiki problems: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "http://errerrors.blogspot.com" to "https://errerrors.blogspot.com")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<< [[MediaWikiInstallRecord]]
<< [[MediaWikiInstallRecord]]
問題解決協助
* 強迫網站更新某頁面的資料庫快取: 在頁面網址後加上 &action=purge (參考[http://zh.wikipedia.org/wiki/Wikipedia:%E7%B6%AD%E5%9F%BA%E7%99%BE%E7%A7%91%E5%B7%A5%E5%85%B7/%E5%BC%B7%E8%BF%AB%E6%9B%B4%E6%96%B0 Wikipedia])
* [http://wiki.planetoid.info/index.php/MediaWiki_toolbox#MediaWiki.E6.8A.80.E8.A1.93.E6.94.AF.E6.8F.B4 MediaWiki技術支援]




== 已解決的問題 ==
== 已解決的問題 ==
=== 備份 ===
* [[MediaWiki backup]]
* [[MediaWiki backup]]


* 預設版面的字太小
=== 預設版面的字太小 ===
** 暴力更改預設的字級(字體大小):{MediaWiki}/stylesheets/monobook/main.css 將body的font由x-small改成small或9pt [http://zh.wikipedia.org/wiki/Wikipedia:%E8%81%8A%E5%A4%A9#The_fonts_are_too_small][http://zh-wikipedia.go.nease.net/2004/05/blog-post_29.html][http://conch.blogbus.com/diary.php?diaryid=200440]
** 暴力更改預設的字級(字體大小):{MediaWiki}/stylesheets/monobook/main.css 將body的font由x-small改成small或9pt [http://zh.wikipedia.org/wiki/Wikipedia:%E8%81%8A%E5%A4%A9#The_fonts_are_too_small][http://zh-wikipedia.go.nease.net/2004/05/blog-post_29.html][http://conch.blogbus.com/diary.php?diaryid=200440]


=== 輔助說明連結失連 ===
* ''' 安裝後有些輔助說明連結,連到英文的Wikipedia,卻出現Error '''
* ''' 安裝後有些輔助說明連結,連到英文的Wikipedia,卻出現Error '''
: Wiki安裝後的導覽選單(導航條)的"[http://www.wikipedia.org/wiki/%E5%B9%AB%E5%8A%A9 幫助]",會轉址到英文的Wikipedia的[http://en.wikipedia.org/wiki/%e5%b9%ab%e5%8a%a9 頁面],而發生錯誤,合適的中文說明連結是http://zh.wikipedia.org/wiki/Wikipedia:%E5%B8%AE%E5%8A%A9 或 http://zh.wikipedia.org/wiki/Help:%E5%B8%AE%E5%8A%A9 ,使用資料庫管理程式[http://www.phpmyadmin.net/home_page/ phpMyAdmin],然後到資料庫MediaWiki中的資料表[http://meta.wikipedia.org/wiki/Interwiki_links interwiki][http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide:_Interwiki_linking]
: Wiki安裝後的導覽選單(導航條)的"[http://www.wikipedia.org/wiki/%E5%B9%AB%E5%8A%A9 幫助]",會轉址到英文的Wikipedia的[http://en.wikipedia.org/wiki/%e5%b9%ab%e5%8a%a9 頁面],而發生錯誤,合適的中文說明連結是http://zh.wikipedia.org/wiki/Wikipedia:%E5%B8%AE%E5%8A%A9 或 http://zh.wikipedia.org/wiki/Help:%E5%B8%AE%E5%8A%A9 ,使用資料庫管理程式[http://www.phpmyadmin.net/home_page/ phpMyAdmin],然後到資料庫MediaWiki中的資料表[http://meta.wikipedia.org/wiki/Interwiki_links interwiki][http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide:_Interwiki_linking]
Line 18: Line 24:
  欄位 iw_url = <nowiki>http://zh.wikipedia.org/wiki/Wikipedia:$1</nowiki>
  欄位 iw_url = <nowiki>http://zh.wikipedia.org/wiki/Wikipedia:$1</nowiki>


附註:還是有些問題,例如頁面下方的「關於Wikipedia」,雖然可以正確轉到繁體,但是簡體的Wikipedia才有Wikipedia的[http://zh.wikipedia.org/wiki/Wikipedia:%E5%85%B3%E4%BA%8E 說明文字],所以也許使用英文的使用者介面也不錯(UI)。
附註:還是有些問題,例如頁面下方的「關於Wikipedia」,雖然可以正確轉到繁體,但是簡體的Wikipedia才有Wikipedia的[http://zh.wikipedia.org/wiki/Wikipedia:%E5%85%B3%E4%BA%8E 說明文字],所以也許使用英文的使用者介面也不錯(UI)。 (相關說明: 如何修改MediaWiki的[[MediaWiki_localization|提示資訊]] ex:下方頁尾 或 側邊的導航選單)


* '''同一表格不同欄的間距太小,造成識別問題。'''
=== 同一表格不同欄的間距太小 ===
: {MediaWiki}/stylesheets/monobook/main.css 在table那一項目,加上 border-spacing: 15px;
: {MediaWiki}/stylesheets/monobook/main.css 在table那一項目,加上 border-spacing: 15px;
: 或者加上表格的邊界
: 或者加上表格的邊界


=== 想移掉側邊欄的贊助網站連結 ===
* '''調整瀏覽選單(configure sidebar)'''
* '''調整瀏覽選單(configure sidebar)'''
升級到mediawiki 1.5+,瀏覽選單多出Donations。以管理者權限修改[[MediaWiki:Sidebar]]
升級到mediawiki 1.5+,瀏覽選單多出Donations。以管理者權限修改[[MediaWiki:Sidebar]]
Line 38: Line 45:
移除 sitesupport-url|sitesupport 那一行
移除 sitesupport-url|sitesupport 那一行


=== 禁止未註冊帳號者,不能編修頁面 ===
方法詳見[[Setting user rights in MediaWiki]]
=== 搜索時,輸入Dict Online找不到OnlineDict頁面 ===
* 搜索時,輸入''Dict Online''找不到[[OnlineDict]]頁面,即MediaWiki會將OnlineDict看作一個字的頁面題目
: 替代方式:(1)設定[[Online_Dict]]自動轉頁,然後轉向到[[OnlineDict]]。或者(2)搜尋關鍵字輸入Online* 或dict* (3)使用搜尋引擎[[Site Search]]
=== 美化網址 ===
詳見[[Beautifying URLs of MediaWiki]]
=== 註腳沒掛起來 ===
*  安裝[[MediaWiki footnotes|註腳]]擴充套件  (2007-07-09 solved)
=== 在安裝設定時的SiteName(網站名稱) 無法使用中文 ===
* 直接修改資料庫的方法,請看[[維基百科:幫助]],或者
* 修改 LocalSettings.php 中的$wgSitename變數,然後將檔案儲存為UTF-8無BOM的格式
=== 網頁標題想改成 SiteTitle: 頁面名稱 ===
修改[[MediaWiki:pagetitle]] (瀏覽器上方的)網頁標題
<pre>
可從預設值: $1 - {{SITENAME}} 
改成 {{SITENAME}} : $1
</pre>
: 相關頁面: [[MediaWiki localization|本地化設置]]
=== 406 Not Acceptable ===
* Error message: When I tried to preview or save a wikipage, a error message: "406 Not Acceptable: An appropriate representation of the requested resource /index.php could not be found on this server." occurred.
* Solution: reduce the complex of page content (ex: remove the long codes)
* case:
I checked the content of this webpage:
<pre>
... ...
* Author: [URL Description]
</pre>
I insert a space after ''Author''. ''Author: [URL Description]'' became ''Author : [URL Description]'' The problem was solved.
<pre>
... ...
* Author : [URL Description]
</pre>
Environment: MediaWiki: 1.5.4; PHP: 4.4.1 (apache); MySQL: 4.0.25-standard
=== MySQL error: Table ... is marked as crashed and should be repaired (MediaWiki 1.6.10) ===
<pre>
    (SQL query hidden)
來自於函數 "MediaWikiBagOStuff::_doquery"。 MySQL返回錯誤 "1194: Table 'objectcache' is marked as crashed and should be repaired (localhost)"。
</pre>
Solution:
Using the phpMyAdmin to do the following steps
# (optional) TRUNCATE `objectcache`  (清空objectcache資料表)
# repair the objectcache table
further reading
* [http://dev.mysql.com/doc/refman/5.0/en/table-maintenance.html MySQL AB :: MySQL 5.0 Reference Manual :: 5.6.4 Table Maintenance and Crash Recovery]
=== not safe to rely on the system's timezone settings. Please use the date.timezone setting  (MediaWiki 1.11.0) ===
check [https://errerrors.blogspot.com/2008/01/not-safe-to-rely-on-systems-timezone.html Err: not safe to rely on the system's timezone settings. Please use the date.timezone setting]


=== 頁面有超鏈連結(網頁、圖片…),點選後希望是另開視窗,而不是在當前視窗打開 ===
[[Open a link in mediawiki to a new window]]
=== Raw pages must be accessed through the primary script entry point (MediaWiki v1.12) ===
click the [https://errerrors.blogspot.com/2008/06/raw-pages-must-be-accessed-through.html Raw pages must be accessed through the primary script entry point (MediaWiki v1.12)]


== 待解決問題 ==
== 待解決問題 ==
Line 45: Line 125:
# 自訂Namespace
# 自訂Namespace
# 查封IP/User網址後的訊息畫面連到[http://wiki.planetoid.info/index.php/%E7%89%B9%E6%AE%8A:%E8%A2%AB%E5%B0%81%E7%B6%B2%E5%9D%80%E5%88%97%E8%A1%A8],但是正確的應該是[http://wiki.planetoid.info/index.php/%E7%89%B9%E6%AE%8A:Ipblocklist]。
# 查封IP/User網址後的訊息畫面連到[http://wiki.planetoid.info/index.php/%E7%89%B9%E6%AE%8A:%E8%A2%AB%E5%B0%81%E7%B6%B2%E5%9D%80%E5%88%97%E8%A1%A8],但是正確的應該是[http://wiki.planetoid.info/index.php/%E7%89%B9%E6%AE%8A:Ipblocklist]。
 
# 如何點選圖形時,直接進入特定網站連結,而非描述圖形(metadata)的頁面。 (效果: [http://zh-classical.wikipedia.org/wiki/Template:Sprotected2 Template:Sprotected2] 參考樣版:[http://zh-classical.wikipedia.org/w/index.php?title=Template:Sprotected2&action=edit Template:Sprotected2][http://zh-classical.wikipedia.org/w/index.php?title=Template:Click&action=edit Template:Click])
=== 其他問題 ===
* 在安裝設定時的SiteName(網站名稱)<strike>無法</strike>使用中文。 >> 請看[[維基百科:幫助]]
 
* BabelFish[http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=zt_en&trurl=http%3a%2f%2fwiki.planetoid.info/index.php/%E5%85%B1%E7%AD%86%E9%A6%96%E9%A0%81 翻譯] <strike>時,遇到問題 /*<![CDATA[[*/ @import "/stylesheets/monobook/main.css"; /*]]>*/ </strike> MediaWiki 1.4.8 OK
 
* 禁止未註冊帳號者,不能編修頁面。 >> 方法詳見[[Setting user rights in MediaWiki]]
 
* 搜索時,輸入''Dict Online''均找不到OnlineDict[[OnlineDict]]頁面,即MediaWiki會將OnlineDict看作一個字的頁面題目
: 替代方式:(1)設定[[Online_Dict]]自動轉頁,然後轉向到[[OnlineDict]]。或者(2)搜尋關鍵字輸入Online* 或dict* (3)使用搜尋引擎[[Site Search]]
 
* 美化網址: 詳見[[Beautifying URLs of MediaWiki]]


== To-do ==
== To-do ==

Latest revision as of 13:42, 19 January 2019

<< MediaWikiInstallRecord

問題解決協助


已解決的問題[edit]

備份[edit]

預設版面的字太小[edit]

    • 暴力更改預設的字級(字體大小):{MediaWiki}/stylesheets/monobook/main.css 將body的font由x-small改成small或9pt [1][2][3]

輔助說明連結失連[edit]

  • 安裝後有些輔助說明連結,連到英文的Wikipedia,卻出現Error
Wiki安裝後的導覽選單(導航條)的"幫助",會轉址到英文的Wikipedia的頁面,而發生錯誤,合適的中文說明連結是http://zh.wikipedia.org/wiki/Wikipedia:%E5%B8%AE%E5%8A%A9 或 http://zh.wikipedia.org/wiki/Help:%E5%B8%AE%E5%8A%A9 ,使用資料庫管理程式phpMyAdmin,然後到資料庫MediaWiki中的資料表interwiki[4]
欄位 iw_prefix = WikiPedia
欄位 iw_url = http://www.wikipedia.org/wiki/$1
修改為
欄位 iw_url = http://zh.wikipedia.org/wiki/Wikipedia:$1

附註:還是有些問題,例如頁面下方的「關於Wikipedia」,雖然可以正確轉到繁體,但是簡體的Wikipedia才有Wikipedia的說明文字,所以也許使用英文的使用者介面也不錯(UI)。 (相關說明: 如何修改MediaWiki的提示資訊 ex:下方頁尾 或 側邊的導航選單)

同一表格不同欄的間距太小[edit]

{MediaWiki}/stylesheets/monobook/main.css 在table那一項目,加上 border-spacing: 15px;
或者加上表格的邊界

想移掉側邊欄的贊助網站連結[edit]

  • 調整瀏覽選單(configure sidebar)

升級到mediawiki 1.5+,瀏覽選單多出Donations。以管理者權限修改MediaWiki:Sidebar

  • navigation
    • mainpage|mainpage
    • portal-url|portal /**link to LemonWiki:Community_Portal
    • currentevents-url|currentevents
    • recentchanges-url|recentchanges /**link to Special:Recentchanges
    • randompage-url|randompage /**link to Special:Random
    • helppage|help
    • sitesupport-url|sitesupport /**link to LemonWiki:Site_support

移除 sitesupport-url|sitesupport 那一行

禁止未註冊帳號者,不能編修頁面[edit]

方法詳見Setting user rights in MediaWiki

搜索時,輸入Dict Online找不到OnlineDict頁面[edit]

  • 搜索時,輸入Dict Online找不到OnlineDict頁面,即MediaWiki會將OnlineDict看作一個字的頁面題目
替代方式:(1)設定Online_Dict自動轉頁,然後轉向到OnlineDict。或者(2)搜尋關鍵字輸入Online* 或dict* (3)使用搜尋引擎Site Search

美化網址[edit]

詳見Beautifying URLs of MediaWiki


註腳沒掛起來[edit]

  • 安裝註腳擴充套件 (2007-07-09 solved)

在安裝設定時的SiteName(網站名稱) 無法使用中文[edit]

  • 直接修改資料庫的方法,請看維基百科:幫助,或者
  • 修改 LocalSettings.php 中的$wgSitename變數,然後將檔案儲存為UTF-8無BOM的格式


網頁標題想改成 SiteTitle: 頁面名稱[edit]

修改MediaWiki:pagetitle (瀏覽器上方的)網頁標題

可從預設值: $1 - {{SITENAME}}  
改成 {{SITENAME}} : $1
相關頁面: 本地化設置


406 Not Acceptable[edit]

  • Error message: When I tried to preview or save a wikipage, a error message: "406 Not Acceptable: An appropriate representation of the requested resource /index.php could not be found on this server." occurred.
  • Solution: reduce the complex of page content (ex: remove the long codes)
  • case:

I checked the content of this webpage:

 ... ...
 * Author: [URL Description]

I insert a space after Author. Author: [URL Description] became Author : [URL Description] The problem was solved.

 ... ...
 * Author : [URL Description]

Environment: MediaWiki: 1.5.4; PHP: 4.4.1 (apache); MySQL: 4.0.25-standard

MySQL error: Table ... is marked as crashed and should be repaired (MediaWiki 1.6.10)[edit]

    (SQL query hidden)

來自於函數 "MediaWikiBagOStuff::_doquery"。 MySQL返回錯誤 "1194: Table 'objectcache' is marked as crashed and should be repaired (localhost)"。

Solution: Using the phpMyAdmin to do the following steps

  1. (optional) TRUNCATE `objectcache` (清空objectcache資料表)
  2. repair the objectcache table

further reading


not safe to rely on the system's timezone settings. Please use the date.timezone setting (MediaWiki 1.11.0)[edit]

check Err: not safe to rely on the system's timezone settings. Please use the date.timezone setting


頁面有超鏈連結(網頁、圖片…),點選後希望是另開視窗,而不是在當前視窗打開[edit]

Open a link in mediawiki to a new window

Raw pages must be accessed through the primary script entry point (MediaWiki v1.12)[edit]

click the Raw pages must be accessed through the primary script entry point (MediaWiki v1.12)

待解決問題[edit]

  1. table oddmuse's text formatting 與 MediaWiki 可以相容
  2. 英語介面的WikiFarm, see also Multilingualism
  3. 自訂Namespace
  4. 查封IP/User網址後的訊息畫面連到[5],但是正確的應該是[6]
  5. 如何點選圖形時,直接進入特定網站連結,而非描述圖形(metadata)的頁面。 (效果: Template:Sprotected2 參考樣版:Template:Sprotected2Template:Click)。

To-do[edit]

是問題,但還不想解決[edit]

## aaa
## bbb
    1. aaa
    2. bbb

處理方式

# aa
## aaa
## bbb
  1. aa
    1. aaa
    2. bbb