Extension talk:Tabs

Jump to navigation Jump to search

About this board

Knetschkäfer (talkcontribs)

I tried everything but the tabs do not work. I write:

<tabber>
|-|1=
Test

|-|2=
Test

|-|3=
Test

</tabber>

but it does not work. The tabbers are shown but they don't work.


Please can someone help me? The tabs are very important to our wiki.


Thank you!

Knetschkäfer (talkcontribs)

Here is a test page from my wiki: wiki.silverfang.net/Tabber_Test_Page

Reply to "Tabs do not work"
Legaulph (talkcontribs)
MediaWiki	1.30.0
PHP	7.1.8 (apache2handler)
Semantic MediaWiki	2.5.5
Tabs 1.3.2
Tabs no longer working at all
CyberBotX (talkcontribs)

I am getting the same issue, with MediaWiki 1.30.0 and PHP 7.0.27, with the same version of Tabs (but from the master branch). From what I can see, the error is due to the styles not being applied and it appears to be a problem with the extension, as I get in the Debug Log when I turn on the Debug Toolbar of MediaWiki:

[resourceloader] Unexpected general module "ext.tabs" in styles queue.

I've been looking to see how this can be fixed, but cannot find a fix for it. Things I tried:

  • Commenting out usages of addModuleStyles() and addModuleScripts() in Tabs.body.php
  • Changing extension.json (but this problem was occurring even with the version of Tabs from the REL1_30 branch and editing Tabs.php instead) to have the styles and scripts separate, which removes the error but doesn't load the styles
  • Changing the uses of addModuleStyles() and addModuleScripts() to just addModules()

None of these have worked, though.

Legaulph (talkcontribs)

./Tabs.body.php:

I was able to get rid of the message [resourceloader] Unexpected general module "ext.tabs" in styles queue
Tabs.body.php change
$parserOut->addModuleStyles('ext.tabs');
$parserOut->addModuleScripts('ext.tabs');
To
$parserOut->addModules('ext.tabs');
//$parserOut->addModuleScripts('ext.tabs');
This message is also showing
  • [GlobalTitleFail] MessageCache::parse called by Tabs->renderTab/trim/Message->__toString/Message->toString/Message->parseText/MessageCache->parse with no title set.
--Legaulph (talk) 12:48, 2 March 2018 (UTC)
Legaulph (talkcontribs)
Josh Simon (talkcontribs)

I'm curious: What was your "No longer working" failure mode?

I installed a fresh MW 1.31 instance (PHP 7.2.7) and now with the same tab-generating wikitext and version of Tabs (1.3.2) that works in my old MW 1.30 instance (PHP 5.5.38) instead of tabs I get radio buttons for each tab title and all the text from all the tabs below them. Commenting out the $parserOut->addModuleScripts('ext.tabs'); line and loading the AddMessages extension suppresses the MW debug log messages (as you note above), but still doesn't display the tabs.

~~~~

Legaulph (talkcontribs)

Sorry for the late reply. I'm not sure what you mean by failure mode. The tabs would not work, MediaWiki was working fine just could not get tabs working. I'm recently testing on MediaWiki 1.31

MediaWiki	1.31.0
PHP	7.1.8 (apache2handler)
MySQL	5.6.34-log
Tabs	1.3.2

everything is still working with the configuration above. It may have to do with PHP 7.2.7 or did you change the line above $parserOut->addModuleStyles('ext.tabs'); to $parserOut->addModules('ext.tabs');?

Josh Simon (talkcontribs)

Aha! I missed the "replace with..." piece. If I change ...->addModuleScripts... to ...->addModules... on line 378 of Tabs.body.php then the tabs do work as expected again (MW 1.31, PHP 7.2.8, Tabs 1.3.2). Thanks!!

Unnamed mercenary (talkcontribs)

Currently using MW 1.31.1, PHP 7.2.15, and Tabs 1.3.2 and I've applied the changes noted above.

//$parserOut->addModuleStyles('ext.tabs');
//$parserOut->addModuleScripts('ext.tabs');
$parserOut->addModules('ext.tabs');

I've also added the AddMessages plugin as advised, which did fix the tab buttons themselves. However, I'm encountering a bug where most of the tab content won't be displayed. It'll make it to a 3rd tab, and then stop displaying any afterwards.


Examples:

https://wiki.ffxiv-roleplayers.com/pages/Greer_Wolf

 https://wiki.ffxiv-roleplayers.com/pages/Kaz_Ashura

 https://wiki.ffxiv-roleplayers.com/pages/Azlem_Riendotte

 https://wiki.ffxiv-roleplayers.com/pages/Mihk'a_Epocan



Paladox (talkcontribs)
Jamal22066 (talkcontribs)

When attempting to render a PDF using mwlib rendering server, the rendered PDF shows the source code instead of the published page. This is likely a mwlib problem but was wondering if anyone has a fix/workaround.

Joeytje50 (talkcontribs)

I'm sorry but I don't really understand what the problem is. Which extension or script is not working?

Jamal22066 (talkcontribs)

The issue was that mwlib can only convert the Wiki markdown language. I was using the 'tabber' extension which is used to create tabs on a page. mwlib can not render a page properly that is using this extension because it is not wiki markdown language.

Reply to "PDF rendering problem"
173.56.73.5 (talkcontribs)

Hello I installed the tabs extension last night and I've realized that the following contents are not working properly for some reason. I've tried all of the methods below and they don't seem to resolve what I am looking for. Here are the examples:

https://imgur.com/a/ywCEF

This image above shows the proper one in another site, and tabs above work and adjust the page as I click different tabs. This is how it is supposed to work.

https://imgur.com/a/xOd1N

This is mine. I tried to make it work like the first link, but it doesn't work like as I wanted it to be. pages don't adjust either. the codes are same too.

Is there something I am doing wrong in this situation? Please help.

148.177.1.210 (talkcontribs)

What versions are you running mediawiki, PHP,

173.52.95.75 (talkcontribs)

I am currently using latest mediawiki that's released. as for PHP, 5.5.51-38.2 - Percona Server (GPL), Release 38.2, Revision 727

Reply to "Boxes don't work properly"
Betmidrash (talkcontribs)

A new tab

Hello, can I add a new namespace to the pages, like talk namespace, and to call it 'draft'. But I want it to be in a new tab like the tab 'discussion', near the page. Actually, maybe I don't need a new namespace, just a new tab, but not like here or here, because it made the tab inside the page, I want it in the head of the page, near the discussion tab. someone?

~~~~

Joeytje50 (talkcontribs)

I'm sorry but that is not possible with my extension either. Those tabs are generated automatically by the page, so they are not part of the content. While it may be technically possible to make an extension that would do this, I think this is too specific to add to any existing extension. I think the best extension for you (if you want the whole page to be a tabbed interface) would still be Header Tabs.

Alternatively you could use javascript to make your own extra 'tab' at the top of the page, but I think that is unnecessary extra work if HeaderTabs basically does what you want to do.

Betmidrash (talkcontribs)

O.k. Thank you very much.

Reply to "A new tab"

#Tag:Tab and #Tab seems to be broken when inside #Tag:Tabs

3
118.212.156.145 (talkcontribs)
Imamadmad (talkcontribs)

I can confirm that I'm seeing the same problems

124.122.55.217 (talkcontribs)

It's a mighty shame, otherwise this would've been the perfect tab extension, and I would have no more use for tabber. Now I have to use both and sometimes even both won't do.

Reply to "#Tag:Tab and #Tab seems to be broken when inside #Tag:Tabs"
Imamadmad (talkcontribs)

Hi there. I tried to generate a set of tabs using a Lua module but it seems the tags are parsed before the module as they were left as plain text. Any suggestion as to what format should be output by the Lua module for this to work properly?

Reply to "Generating tabs with Lua Module"
2605:E000:858B:F900:18A2:6FDA:1C30:8E5C (talkcontribs)

Hi, is it possible to use images inside the tabs? So far I can only get text to work.

Reply to "Adding images"

collapsed attribute in template can't work

1
59.172.176.183 (talkcontribs)

Hi@Joeytje50,

I create the mediawiki template "novel" as below:

{{#tag:tab |{{{content|{{{1|'''Warning! there is no content.'''}}}}}} |{{#if:{{{collapsed|}}}|{{{collapsed}}}}} |class=novel |openname="{{#if:{{{openname|}}}|{{{openname}}}}}(Click to show)" |closename="{{#if:{{{closename|}}}|{{{closename}}}}}(Click to hide)" |style="background:white; width:100%" }} 

But when I use the template:

{{template:novel |content=This is a test ! |collapsed=collapsed }} 

the toggle box can't appear collapsed ! Do you know why? I am looking forward to your repaly!

Reply to "collapsed attribute in template can't work"
HawkHunter3 (talkcontribs)

Using this plugin, is it possible to edit which tab is active when the page loads?

Example:

<tabs>

<tab name="Hi">Hello there!</tab>

<tab name="Bye" active>Goodbye!</tab>

</tabs>

By adding the active attribute, the second tab will be shown when the page loads, and not just the first tab in the the tab menu.

Is a feature like this possible? I understand you can directly link to a tab, but I want to just have the desired tab load on my page versus using a link to do so.

Joeytje50 (talkcontribs)

I'm very sorry for not getting back to you at all (I didn't get any email notifications about this). This is currently not possible, but it does sound like a good idea to implement. I'll try to get this implemented some time in the future, but this might take a while since I'm in my exam period right now (nice timing on getting back to you now eh?). I'll put this on my to-do list though. Thanks for the suggestion.

Reply to "Setting "Active" Tab"