缺少WikiEditor工具栏 [英] WikiEditor toolbar is missing

查看:252
本文介绍了缺少WikiEditor工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Chrome 下的自定义外观运行 MediaWiki 1.23 .我已经按照 MediaWiki页面上有关WikiEditor(Extension:WikiEditor)的指示进行操作... >

下面,我提供了LocalSettings.php中默认配置结束后添加的行:

# End of automatically generated settings.
# Add more configuration options below.

require_once( "$IP/skins/Fresh/Fresh.php" );
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );

$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
$wgDefaultUserOptions['wikieditor-preview'] = 1;

然后,我通过检查Special:Version验证了 WikiEditor 已经安装.它返回一个正数,在已安装的扩展列表中显示WikiEditor.

我尝试使用用户首选项"进行播放,但是设置显示我的帐户默认情况下启用了WikiEditor.

我还更改了外观,以检查 set default是否存在任何问题.当我使用MediaWiki开箱即用的默认外观时,会显示该编辑器,但不适用于我正在使用的自定义外观.

在控制台上未发现错误或日志.

要添加,我已经在正常的Chrome(清除缓存)和隐身模式下访问了该网站.

解决方案

这是mediawiki中的错误.我在所有浏览器中的v1.24.2上都能找到它.

如果在工具栏上单击,则所有可单击的点都在那里,仅不显示它们的图形.这些按钮是使用Sprite(一个带有所有按钮的图形,左右移动以在正确的位置显示正确的按钮)完成的.如果使用允许您检查CSS的浏览器,请右键单击一个不可见的按钮,然后选择检查元素",您会看到背景图像CSS指令被覆盖,因此按钮图形都没出现.

希望mediawiki小组很快会对此进行修补.但是与此同时,这是一个有效的解决方法:

以具有管理员权限的人(WikiSysop或其他)身份登录到Wiki.

然后转到Wiki的/MediaWiki%3ACommon.css页面,您可以在其中添加自定义样式以应用于站点中的所有页面.并添加到该Wiki页面并将其保存:

/***** Overcome mediawiki bug whereby the WikiEdit sprite is a no-show *****/
.wikiEditor-toolbar-spritedButton {
  background-image: linear-gradient(transparent, transparent), url("/extensions/WikiEditor/modules/images/toolbar/button-sprite.svg?v=001") !important;
  background-position: 0px 0px; /* This gets over-ridden with inline style to move sprite into view of relevant part */
  background-repeat: no-repeat !important;
}

这会强制显示按钮图像精灵,一切都很好.

I am running MediaWiki 1.23 with a custom skin under Chrome. I have done as instructed in the MediaWiki page about WikiEditor(Extension:WikiEditor).

Below, I provided the lines I've added after the end of the default configuration in LocalSettings.php:

# End of automatically generated settings.
# Add more configuration options below.

require_once( "$IP/skins/Fresh/Fresh.php" );
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );

$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
$wgDefaultUserOptions['wikieditor-preview'] = 1;

Afterwards, I verified that WikiEditor is already installed by checking Special:Version. It returned a positive, showing WikiEditor in its list of installed Extensions.

I tried playing with User Preferences, however the settings shows that my account enables the WikiEditor by default.

I also changed skins to check if the set default has any issues. The editor shows up when I use the default skins provided out-of-the-box by MediaWiki, however not with the custom skin I am using.

No error or log has been found with the console.

To add, I have accessed the site on both normal Chrome (cleared cache) and Incognito.

解决方案

This is a bug in mediawiki. I am getting it on v1.24.2, in all browsers.

If you click around on the tool bar, the clickable spots are all there, just the graphics for them are not showing. The buttons are done with a sprite (one graphic with all the buttons on it, shifted around to show the correct button at the right place). If you're using a browser that allows you to inspect CSS, right-click one of the invisible buttons and choose to 'inspect element', and you'll see that the background-image CSS instruction is getting overridden, so the button graphics are all a no-show.

Hopefully the mediawiki team will mend this soon. But meanwhile, here's an effective workaround:

Log in to your wiki as someone with Administrator privileges (WikiSysop or whatever).

Then go to the /MediaWiki%3ACommon.css page of your wiki, which is where you can add your custom style to apply to all pages in your site. And to that wiki page, add this and save it:

/***** Overcome mediawiki bug whereby the WikiEdit sprite is a no-show *****/
.wikiEditor-toolbar-spritedButton {
  background-image: linear-gradient(transparent, transparent), url("/extensions/WikiEditor/modules/images/toolbar/button-sprite.svg?v=001") !important;
  background-position: 0px 0px; /* This gets over-ridden with inline style to move sprite into view of relevant part */
  background-repeat: no-repeat !important;
}

That forces the button images sprite to show, and all is good.

这篇关于缺少WikiEditor工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆