Extension talk:PortableInfobox

About this board

How to add images in a horizontal group

1
ChofisDan (talkcontribs)

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>

Is there any other way to fix it or it's just not possible?

Reply to "How to add images in a horizontal group"

Adding PortableInfobox to WikiTide and other wiki farms/bundles

1
RealSwimboy (talkcontribs)

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.

Reply to "Adding PortableInfobox to WikiTide and other wiki farms/bundles"
Summary by FatalFit

You can use <gallery> to create a similar effect.

FatalFit (talkcontribs)

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>

Text Outside Proper CSS Tags

1
SovereignGFC (talkcontribs)

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.

Reply to "Text Outside Proper CSS Tags"

How do I add a header onto a portable infobox?

1
2A02:C7C:BD2C:B500:7C81:A259:259:DC25 (talkcontribs)

Title says it all.

Reply to "How do I add a header onto a portable infobox?"

is there plans to also implement PortableInfoboxBuilder?

1
Sneeze5555 (talkcontribs)
Reply to "is there plans to also implement PortableInfoboxBuilder?"

<image /> does not work (nor <media />)

1
Silkwood (talkcontribs)

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...

Reply to "<image /> does not work (nor <media />)"

Fatal exception of type "Error"

8
Wingedcatgirl (talkcontribs)

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

Hb1290 (talkcontribs)

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.

This post was hidden by Hb1290 (history)
Deejayk (talkcontribs)
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?
Iresprite (talkcontribs)

I'm having the same experience with 1.36.1.

75.170.91.217 (talkcontribs)

Can confirm the same error on 1.37.1.

50.206.104.138 (talkcontribs)

same :(

BenTable (talkcontribs)

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.

Reply to "Fatal exception of type "Error""

PHP deprecated when running refreshLinks.php

1
73.16.66.143 (talkcontribs)

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.

It seems not to work with MediaWiki 1.35

3
LordCroquet (talkcontribs)

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}

62.16.12.39 (talkcontribs)

the same problem

62.16.12.39 (talkcontribs)

version from Github works fine

Reply to "It seems not to work with MediaWiki 1.35"