WikiEditor toolbar is missing

不打扰是莪最后的温柔 提交于 2019-12-06 09:19:47

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!