dongshen4129 2014-08-07 18:23
浏览 174
已采纳

缺少WikiEditor工具栏

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.

  • 写回答

1条回答 默认 最新

  • duanpacan9388 2015-04-29 15:52
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题