Extension talk:PortableInfobox
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
How do I make a portable infobox on my mediawiki wiki
[edit]- Im having troubles trying to make a Portable Infobox for some of my created articles on my wiki, when I try to copy the infobox coding from my Fandom wiki Fictional Companies Fanon wiki, it will fail and give me a internal error. Nathan J Richards (talk) 05:55, 2 November 2020 (UTC)
- We need more specific details to answer this question. What is the PI code that you're trying to transfer? What is the error code? While the Luqgreg and Fandom versions of this extension are fairly similar, there may be differences that prevent an easy port. (Meant to reply here, not to the thread) TheDragonFire300 (talk) 01:03, 5 March 2021 (UTC)
It seems not to work with MediaWiki 1.35
[edit]This extension uses the ObjectCache::getMainWANInstance() method, which is deprecated, causing a fatal error when editing pages like MediaWiki:Sidebar.
Debug:
[baf2427f61302637fde6a2e1] /index.php?title=MediaWiki:Sidebar&action=submit Error from line 29 of /var/www/html/extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php: Call to undefined method ObjectCache::getMainWANInstance()
Backtrace:
#0 /var/www/html/extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php(39): PortableInfoboxDataService->__construct(Title)
#1 /var/www/html/extensions/PortableInfobox/includes/PortableInfobox.hooks.php(39): PortableInfoboxDataService::newFromTitle(Title)
#2 /var/www/html/includes/HookContainer/HookContainer.php(320): PortableInfoboxHooks::onPageContentSave(WikiPage, User, WikitextContent, CommentStoreComment, integer, NULL, NULL, integer, Status)
#3 /var/www/html/includes/HookContainer/HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#4 /var/www/html/includes/HookContainer/HookRunner.php(2788): MediaWiki\HookContainer\HookContainer->run(string, array)
#5 /var/www/html/includes/Storage/PageUpdater.php(768): MediaWiki\HookContainer\HookRunner->onPageContentSave(WikiPage, User, WikitextContent, CommentStoreComment, integer, NULL, NULL, integer, Status)
#6 /var/www/html/includes/page/WikiPage.php(2015): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#7 /var/www/html/includes/EditPage.php(2457): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#8 /var/www/html/includes/EditPage.php(1724): EditPage->internalAttemptSave(array, boolean)
#9 /var/www/html/includes/EditPage.php(680): EditPage->attemptSave(array)
#10 /var/www/html/includes/actions/EditAction.php(71): EditPage->edit()
#11 /var/www/html/includes/actions/SubmitAction.php(38): EditAction->show()
#12 /var/www/html/includes/MediaWiki.php(527): SubmitAction->show()
#13 /var/www/html/includes/MediaWiki.php(313): MediaWiki->performAction(Article, Title)
#14 /var/www/html/includes/MediaWiki.php(940): MediaWiki->performRequest()
#15 /var/www/html/includes/MediaWiki.php(543): MediaWiki->main()
#16 /var/www/html/index.php(53): MediaWiki->run()
#17 /var/www/html/index.php(46): wfIndexMain()
#18 {main} LordCroquet (talk) 09:27, 8 April 2021 (UTC)
- the same problem 62.16.12.39 (talk) 20:29, 17 April 2021 (UTC)
- version from Github works fine 62.16.12.39 (talk) 20:32, 17 April 2021 (UTC)
Fatal exception of type "Error"
[edit]- Hi, we just installed this on our wiki per the instructions on the main page, however, attempting to create or preview a template with the infobox syntax results in an internal error '[5eb7c9375e53f66f6c947b93] 2021-05-11 17:18:38: Fatal exception of type "Error"'
- Even just
<infobox></infobox>is enough to trigger the error Wingedcatgirl (talk) 19:38, 11 May 2021 (UTC)- Having the same issue. what's weirder is I added some portable infoboxes to pages just a few days ago without issue. It seems like one of my fellow admins has had to revert my edits to those pages due to the same error. Hb1290 (talk) 23:44, 15 May 2021 (UTC)
I'm experiencing this same issue on a fresh install of MediaWiki 1.36.1. When I installed and tried to use PortableInfobox I get the same error.
- I noticed that you reported this issue on GitHub several months back, but that it's still open.
- Has anyone discovered a workaround? Deejayk (talk) 14:19, 15 September 2021 (UTC)
- I'm having the same experience with 1.36.1. Iresprite (talk) 18:14, 13 December 2021 (UTC)
- Can confirm the same error on 1.37.1. 75.170.91.217 (talk) 05:10, 17 December 2021 (UTC)
- same :( 50.206.104.138 (talk) 03:07, 22 December 2021 (UTC)
- I don't suppose any of you've found a solution to this? I'm planning on using the Capiunto extension instead, but I'd much rather keep using Portable Infobox if it's possible. BenTable (talk) 15:15, 27 December 2021 (UTC)
PHP deprecated when running refreshLinks.php
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi, I've recently upgraded to MediaWiki 1.36 from 1.35.1. I'm using the master version of PortableInfobox. Since the MediaWiki upgrade, running refreshLinks.php results in the following warning when refreshing some pages.
PHP Deprecated: Use of Parser::doBlockLevels was deprecated in MediaWiki 1.35. [Called from PortableInfobox\Parser\MediaWikiParserService::parseRecursive in /var/www/w/extensions/PortableInfobox/includes/services/Parser/MediaWikiParserService.php at line 50] in /var/www/w/includes/debug/MWDebug.php on line 376
The refreshLinks.php script can still run despite the warning, but it takes noticeably longer now, and occasionally it just hangs. 73.16.66.143 (talk) 17:53, 13 September 2021 (UTC)
<image /> does not work (nor <media />)
[edit]My Wiki configuration:
| Product | Version |
|---|---|
| MediaWiki | 1.37.3 (7fd8217)
12:44, July 3, 2022 |
| PHP | 7.3.29-1+ubuntu18.04.1+deb.sury.org+1 (apache2handler) |
| MariaDB | 10.1.48-MariaDB-0ubuntu0.18.04.1 |
| ICU | 65.1 |
| Pygments | 2.10.0 |
| Lua | 5.1.5 |
| Elasticsearch | 6.8.18 |
| LilyPond | 2.18.2 |
this code does not work (does not show the image)
<infobox>
<title source="title_source">
<default>{{PAGENAME}}</default>
</title>
<media source="Webbe.jpg"/>
<data source="theme_code_index">
<label>Theme code Index</label>
<default>default_value</default>
</data>
</infobox>
Interestingly, this one instead shows
- the image declared in <default> (Example.jpg) and not the one in <media> tag (Webbe.jpg).
- the alternative title declared in <default> and not the one declared in <alt> tag
- a question mark in azure field instead of the image (Example.jpg). The missing-image link URL is correct (i.e. if you click on the exclamation mark you'll get the Example.jpg image).
<infobox>
<title source="title_source">
<default>{{PAGENAME}}</default>
</title>
<media source="Webbe.jpg">
<default> "Example.jpg"</default>
<alt source="alternative_title">
<default>Default alt text</default>
</alt>
</media>
<data source="theme_code_index">
<label>Theme code Index</label>
<default>default_value</default>
</data>
</infobox>
curiouser and curiouser... Silkwood (talk) 15:48, 6 July 2022 (UTC)
is there plans to also implement PortableInfoboxBuilder?
[edit]fandom also has the incredibly useful utility PortableInfoboxBuilder which would go great combined with this Sneeze5555 (talk) 19:15, 27 July 2022 (UTC)
How do I add a header onto a portable infobox?
[edit]Title says it all. 2A02:C7C:BD2C:B500:7C81:A259:259:DC25 (talk) 13:09, 4 March 2023 (UTC)
Text Outside Proper CSS Tags
[edit]For some reason, text is being inserted outside its classes. The title is being placed in a set of p-tags outside the h2 tags (and thus renders as regular text). The label is in a set of p-tags outside the h3 tags and again renders as regular text.

SovereignGFC (talk) 19:37, 26 April 2023 (UTC)
Row-items
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I’m trying to make two images show on one row, you can do this with text by using the attribute "row-items", but with images it just shows them vertically. Is there any workaround for this? This is my code:
<group row-items="2">
<image source="flag_image"></image>
<image source="seal_image"></image>
</group>
Adding PortableInfobox to WikiTide and other wiki farms/bundles
[edit]I'm trying to put an infobox into an article on WikiTide, but I'm unclear on how to actually call this function in wikitext. Is there an article/information someone could point me to on how to do this? Using the styling from Fandom doesn't actually work, from my experience. RealSwimboy (talk) 15:34, 5 September 2023 (UTC)
How to add images in a horizontal group
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
According to the FANDOM documentation, the <image> tag is allowed under <group>, but when I try to use it in an infobox, images simply don't display. This is the code I'm using:
<group layout="horizontal">
<image source="flag">
<caption source="flag_caption">
<default>Flag</default>
</caption>
</image>
<image source="coat_of_arms">
<caption source="coat_of_arms_caption">
<default>Coat of arms</default>
</caption>
</image>
</group>
Broken on MW 1.44
[edit](Cross-posting from maintainer's talk page)
I'm running a wiki through Pony ICU using MediaWiki 1.44. When trying to use the PortableInfobox extension on my wiki, it doesn't work at all. When trying to create an Infobox through Special:InfoboxBuilder, I get
An error occured during infobox publishing: [aUhbWf9SgkTJpw11Z6VDTgAAABE] Caught exception of type Error
when trying to publish it. Similarly, when I try to copy and paste this code into my wiki (essentially manually creating the Infobox with the tags instead of using the special page), I get an "Internal Error"
[aUhatRGgUEvmdjIRFhIdQgAAAAo] 2025-12-21 20:38:15: Fatal exception of type "Error"
when trying to save or preview the page. The Boston Railfan (talk) 20:49, 21 December 2025 (UTC)