<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediawiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=93.153.250.62</id>
	<title>MediaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediawiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=93.153.250.62"/>
	<link rel="alternate" type="text/html" href="https://www.mediawiki.org/wiki/Special:Contributions/93.153.250.62"/>
	<updated>2026-08-23T01:07:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-wmf.16</generator>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Topic:Y90tdydridd4fu7o&amp;topic_postId=y90tdydrihb6ny5w&amp;topic_revId=y90tdydrihb6ny5w&amp;action=single-view</id>
		<title>Topic:Y90tdydridd4fu7o</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Topic:Y90tdydridd4fu7o&amp;topic_postId=y90tdydrihb6ny5w&amp;topic_revId=y90tdydrihb6ny5w&amp;action=single-view"/>
		<updated>2024-07-22T13:38:28Z</updated>

		<summary type="html">&lt;span class=&quot;plainlinks&quot;&gt;&lt;a href=&quot;/wiki/Special:Contributions/93.153.250.62&quot; class=&quot;mw-userlink mw-anonuserlink&quot; title=&quot;Special:Contributions/93.153.250.62&quot;&gt;&lt;bdi&gt;93.153.250.62&lt;/bdi&gt;&lt;/a&gt; &lt;span class=&quot;mw-usertoollinks&quot;&gt;(&lt;a href=&quot;/w/index.php?title=User_talk:93.153.250.62&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;mw-usertoollinks-talk new&quot; title=&quot;User talk:93.153.250.62 (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/span&gt; &lt;a class=&quot;external text&quot; data-mw-original-href=&quot;//www.mediawiki.org/w/index.php?title=Topic:Y90tdydridd4fu7o&amp;amp;topic_showPostId=y90tdydrihb6ny5w#flow-post-y90tdydrihb6ny5w&quot; href=&quot;https://www.mediawiki.org/w/index.php?title=Topic:Y90tdydridd4fu7o&amp;amp;topic_showPostId=y90tdydrihb6ny5w#flow-post-y90tdydrihb6ny5w&quot;&gt;commented&lt;/a&gt; on &quot;the link to the extension in gerrit is not active&quot; (&lt;em&gt;the link to the extension in gerrit is not active&lt;/em&gt;)&lt;/span&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6034979</id>
		<title>Extension talk:External Data</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6034979"/>
		<updated>2023-07-21T07:33:23Z</updated>

		<summary type="html">&lt;p&gt;93.153.250.62: /* Read BSON array from MongoDB */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{External Data navigation}}&lt;br /&gt;
{{Archive box|&lt;br /&gt;
* [[Extension talk:External Data/Archive 2009|2009]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2010|2010]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2011|2011]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2012|2012]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2013|2013]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2014|2014]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2015|2015]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2016|2016]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2017 to 2018|2017 to 2018]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2019 to 2020|2019 to 2020]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2021 to 2022|2021 to 2022]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== accessing the internal variable (__json) ==&lt;br /&gt;
&lt;br /&gt;
I need some help. Background: I&#039;m working on an extension that uses a webcall to retrieve a JSON object and converts it into concise html code. This extension now is working properly, but lacks caching. This JSON object is complex: containing multiple nested arrays with varying number of elements and it took me a while to program it in php.&lt;br /&gt;
&lt;br /&gt;
My current line of thought is to transfer the entire json object (that is stored in the internal variable __json) to my extension.&lt;br /&gt;
&lt;br /&gt;
Question 1) how does one access the internal variables??  The code below doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
Question 2) do you have any comments / suggestions on my approach?&amp;lt;!-- retreiving the data --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#get_web_data:url=https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;|format=json}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* first bullit: {{#external_value:__json}}&lt;br /&gt;
* second bullit:{{#external_value:meta}}&amp;lt;!-- this value (200) is being output correctly --&amp;gt;&amp;lt;!-- passing it to my extension --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#myextension:{{#external_value:__json}}|param1|param2}} [[User:Harro Kremer|Harro Kremer]] ([[User talk:Harro Kremer|talk]]) 21:20, 3 January 2023 (UTC)&lt;br /&gt;
* Since &amp;lt;code&amp;gt;__json&amp;lt;/code&amp;gt; is not a string but a Lua table, it is only accessible from Lua ([[Extension:Scribunto|Scribunto]] is needed) and not from wikitext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local parsed, errors = mw.ext.externalData.getExternalData{ url = &#039;https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;&#039; }&lt;br /&gt;
if parsed then&lt;br /&gt;
    local json = parsed.__json&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:46, 9 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using External Data in a Template ==&lt;br /&gt;
I want to fill a custom Infobox Template with data from ExternalData. The data will reside in a CSV file matching the non-namespace part of the page importing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mynamespace:mypage content: &amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
template:myinfobox content: &amp;lt;nowiki&amp;gt;{{infobox | header1 = header | data1 = {{#external_value:value_name|source=data|format=csv with header|delimiter=;|file name={{PAGENAME}}.csv}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
However, this tries to fetch data from a CSV file named &amp;quot;myinfobox&amp;quot; instead&lt;br /&gt;
What is a better way to achieve this?&lt;br /&gt;
&lt;br /&gt;
:Is the template called &amp;quot;infobox myinfobox&amp;quot;, or just &amp;quot;myinfobox&amp;quot;? And do you see the problem on the &amp;quot;mypage&amp;quot; page, or right on the template page? [[User:Yaron Koren|Yaron Koren]] ([[User talk:Yaron Koren|talk]]) 00:34, 10 January 2023 (UTC)&lt;br /&gt;
::my template page is called &amp;quot;Vorlage:Infobox_VM&amp;quot;. The problem occurs on &amp;quot;mypage&amp;quot; as the template page doesn’t really have any visible content nor has it the CSV providing information. &amp;quot;mypage&amp;quot; tries to read from a csv called Vorlage:Infobox_VM.csv instead if mypage.csv.&lt;br /&gt;
* This looks like a strange way to invoke a template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Why not just &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;? And, as said above, fetching data from &amp;lt;code&amp;gt;myinfobox.csv&amp;lt;/code&amp;gt; is what to be expected on the template page itself, unless the code is wrapped with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:11, 10 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::yes you’re right, i tried being verbose for clarity. in my page i have only &amp;lt;nowiki&amp;gt; {{Infobox VM}}&amp;lt;/nowiki&amp;gt; and that seems to work well enough. I&#039;m not really concerned what csv is being read on the template page itself, as that page isn’t really supposed to be looked at. &amp;lt;br&amp;gt; I want &amp;quot;mypage&amp;quot; to look at mypage.csv through the template. that’s what doesn’t work.&lt;br /&gt;
* What are the settings for the data source &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; inline&amp;gt;$wgExternalDataSources[&#039;data&#039;]&amp;lt;/syntaxhighlight&amp;gt;)?&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$wgExternalDataSources[&#039;data&#039;][&#039;path&#039;] = &#039;/opt/infradb-data/vm/&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: that path and all the files in it are world readable. that stuff works in principle. i am able to pull info from csv. just not via the page name in the template.&lt;br /&gt;
* Could not reproduce the issue at my &#039;&#039;MediaWiki&#039;&#039; installation. Looks like there you have some sophisticated wiki code that substituted &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; too early on.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:59, 14 January 2023 (UTC)&lt;br /&gt;
*:I solved the problem this way:   on &amp;quot;mypage&amp;quot; i call &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;amp;lt;nowiki&amp;amp;gt;{{Infobox Host | filename={{PAGENAME}} }} &amp;amp;lt;/nowiki&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and on the template page i use that variable to find the right file. [[Special:Contributions/24.134.95.253|24.134.95.253]] 15:51, 17 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Slightly different csv data files, only one works ==&lt;br /&gt;
&lt;br /&gt;
I have 2 48 line csv files, &amp;lt; 10k in size with a minor difference, but only one can be read in ExternalData in 1.39&lt;br /&gt;
&lt;br /&gt;
Simplified case https://johnbray.org.uk/expounder/Extdataproblem1 uses &lt;br /&gt;
&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/datagood and then&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/databad &lt;br /&gt;
&lt;br /&gt;
checking that {{#external_value:ddescription}} has something from a line of the csv file. datagood works, but databad does not. The difference between the files is a few characters on one line, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}, {{link|Q62625219|Maureen Kincaid Speller}}&lt;br /&gt;
,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;gt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB&lt;br /&gt;
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both files are &amp;lt; 10k in size, 48 lines, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
wc datagood databad    &lt;br /&gt;
  48   338  9245 datagood &lt;br /&gt;
  48   341  9180 databad [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 14:05, 13 January 2023 (UTC)&lt;br /&gt;
* Neither of the CSV files is formed perfectly from PHP&#039;s point of view. The problems start at the line 7 (one-based). For &amp;lt;code&amp;gt;databad&amp;lt;/code&amp;gt; this causes the automatically recognised delimiter to be &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;. You can overcome this by adding &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:45, 14 January 2023 (UTC)&lt;br /&gt;
*:Thanks for the quick response. That cured the problem, both for my trivial and full cases. [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 11:00, 16 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What is the best practice to fetch many values (&amp;gt;300) from the same place? ==&lt;br /&gt;
&lt;br /&gt;
Is it better to use the legacy method, like #get_web_data, and fetch all the values at once, then display using #external_value; or is it better to use the new method, #external_value with source parameter, 300 times? What performance consideration might there be?&lt;br /&gt;
&lt;br /&gt;
[[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:51, 17 January 2023 (UTC)&lt;br /&gt;
* If you use caching, the difference is not that big. Using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will save cache lookups, but the legacy mode will stop working once MediaWiki is upgraded to use Parsoid, since it does not guarantee parsing order. The optimal solution is to handle data fetching and display with one Lua function, where you can save the fetched data into a variable and later display it.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:22, 18 January 2023 (UTC)&lt;br /&gt;
*:Thanks, we&#039;ll look into Lua. We do have caching setup so the standalone method might be fine, now that you&#039;ve helped us iron out the kinks. Thanks again for the help! [[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:54, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some JSONPATH doesn’t retrieve results ==&lt;br /&gt;
I have a JSON file with Information about network interfaces in it.&lt;br /&gt;
I am retrieving this information with get_file_data and two jsonpath instructions. However, only one of them seems to be executed/filled with data.&lt;br /&gt;
&lt;br /&gt;
This is my json:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[{&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;prefix&amp;quot;: 24, &amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.1&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::aaaa:aaaa:aaaa:aaaa&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ab:ab:ab:ab:ab:ab&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth0&amp;quot;}, {&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.2&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;, &amp;quot;prefix&amp;quot;: 24}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::ccff:ceff:feff:ceff&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ce:ff:ce:ff:ce:ff&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth1&amp;quot;}]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
and this is the template code i use to retrieve the data:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_external_data: source=host_data&lt;br /&gt;
   |file name={{{{{ucfirst:{{{hostname}}}}}|dummy}}}_net.json&lt;br /&gt;
   |data=mymacaddress=$[?(@.name == &#039;{{{interfacename}}}&#039;)].hardware-address,&lt;br /&gt;
     adressen=$[?(@.name == &#039;{{{interfacename}}}&#039;)][ip-addresses][*].ip-address&lt;br /&gt;
     &lt;br /&gt;
   |use jsonpath&lt;br /&gt;
   |format=json&lt;br /&gt;
   }}&lt;br /&gt;
{{{hostname}}}&lt;br /&gt;
{{{interfacename}}} ({{#external_value:mymacaddress|invalid}})&lt;br /&gt;
{{#display_external_table: template=bulleted list|data=1=adressen}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
i call this template in the following fashion: &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#display_external_table: template=Interface&lt;br /&gt;
  |data=interfacename={{{netnames}}},hostname={{{filename}}}&lt;br /&gt;
  }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where netnames is just an array, usually only one entry like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;quot;ens18&amp;quot;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and filename points to the correct file&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{netnames}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an array, I don&#039;t know how transcluding it within single quotes in a JsonPath query could work. Neither &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;ens18&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt;, nor &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;eth1&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt; is a working JsonPath. &amp;lt;code&amp;gt;mymacaddress=$[?(@.name == &#039;eth1&#039;)].hardware-address&amp;lt;/code&amp;gt; would be. I would suggest replacing &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, but this does not seem to be implemented.&amp;lt;br /&amp;gt;You could try a regular expression: &amp;lt;code&amp;gt;$[?(@.name =~ &#039;eth0|eth1&#039;)].ip-addresses.[*].ip-address&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;Also, you can get the bulleted list without a template:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{#for_external_table:|&lt;br /&gt;
 * {{{adressen}}}}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:23, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Strange bug parsing CSV with pipe character ==&lt;br /&gt;
&lt;br /&gt;
I have a field called &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; which is called in &amp;lt;code&amp;gt;#for_external_table&amp;lt;/code&amp;gt;. All of the values have at least one pipe character, and the page cuts off everything before and including the first pipe character. But the strange thing is that it only happens if {{{title}}} is located in a specific place. &lt;br /&gt;
&lt;br /&gt;
The page can be seen at https://comprehensibleinputwiki.org/wiki/Mandarin_Chinese/Videos and the external data is at https://comprehensibleinputwiki.org/wiki/Data:Mandarin_Chinese/Videos. If you look at the wiki source of the first link, I have {{{title}}} twice, one of them in a hidden div. If you view the source of the page, the first one is missing part of the value, while the hidden one is complete. [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 20:08, 22 January 2023 (UTC)&lt;br /&gt;
* Add &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;{{#get_web_data:}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:01, 23 January 2023 (UTC)&lt;br /&gt;
*:It didn&#039;t seem to change anything. I changed it to:&lt;br /&gt;
*:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:url={{fullurl:Data:Mandarin_Chinese/Videos|action=raw}}|format=csv with header|data=language=Language, title=Title, videoId=Video ID, service=Service, level=Level, channel=Channel, index=Index|delimiter=,}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 03:00, 23 January 2023 (UTC)&lt;br /&gt;
*** At least, the videos are displayed now. If the current problem is the trimmed titles in the &amp;quot;Title&amp;quot; column, this is not related directly to the extension. The beginning of the title is treated as attributes to the &amp;lt;code&amp;gt;&amp;amp;lt;td&amp;amp;gt;&amp;lt;/code&amp;gt; tag by &#039;&#039;MediaWiki&#039;&#039; parser. Wrap &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;nowiki&amp;lt;/code&amp;gt;, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:nowiki|{{{title}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, to see the first chunk of the title.&amp;lt;br /&amp;gt;&#039;&#039;&#039;UPD:&#039;&#039;&#039; Or, you can add a second &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:21, 23 January 2023 (UTC)&lt;br /&gt;
***:That worked, thanks! I didn&#039;t notice any issues on my end with the videos not displaying before, but good to know! [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 09:36, 23 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameter parsing problems==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PHP || 8.2.1&lt;br /&gt;
|-&lt;br /&gt;
| MediaWiki || 1.38.4&lt;br /&gt;
|-&lt;br /&gt;
| PostgreSQL || 14.6&lt;br /&gt;
|-&lt;br /&gt;
| External Data || 3.2 (5d30e60) 08:38, 2. Nov. 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hi. I use External Data to retrieve data from a PostgreSQL database. In most cases I use prepared statements and I noticed that the passing of parameters seem not to work correctly. Here a self contained test to visualize what I mean.&lt;br /&gt;
&lt;br /&gt;
In the database I have a table with a single column of type text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT * FROM public.test;&lt;br /&gt;
            txt&lt;br /&gt;
----------------------------&lt;br /&gt;
 a simple text&lt;br /&gt;
 another simple text&lt;br /&gt;
 a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the lines contain spaces and in one case a comma.&lt;br /&gt;
&lt;br /&gt;
Then I have a search function that receives a parameter of type text and returns a set of text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SETOF TEXT public.mw_test(p_search TEXT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the configuration LocalSettings.php for this looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgExternalDataSources[&#039;wikidoc&#039;] = [&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;type&#039; =&amp;gt; &#039;postgres&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;prepared&#039;  =&amp;gt; [&lt;br /&gt;
       &#039;test&#039; =&amp;gt; &#039;SELECT mw_test&lt;br /&gt;
                  FROM public.mw_test($1);&#039;&lt;br /&gt;
    ]&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the wikipage the snippet is as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply displays what it finds on a line.&lt;br /&gt;
&lt;br /&gt;
What happens is the the list of parameters cannot contain a comma. The snippet as is above works fine and returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But something like this not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with, a&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error is &amp;quot;Fehler: Es wurden keine Rückgabewerte festgelegt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is clear that a comma is used to separate parameters and that is the reason why this does not work. My question is how can I pass the whole string &amp;quot;with, a&amp;quot; as a single parameter.&lt;br /&gt;
&lt;br /&gt;
I tried enclosing it in single and double quotes, but this did not help. It leads to this exception:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[6882cc0e426ebdb6cf6911bc] /w/index.php?title=IT/IT_Infrastructure/KOFDB_Uebersicht&amp;amp;action=submit TypeError: EDParserFunctions::formatErrorMessages(): Argument #1 ($errors) must be of type array, null given, called in /home/wiki/application/w/extensions/ExternalData/includes/EDParserFunctions.php on line 98&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any idea what I could do to solve this? Help is very appreciated. Thanks&lt;br /&gt;
&lt;br /&gt;
It looks like I found a way to solve this. I can enclose the whole string in round parenthesis and it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = (with, a)&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* An intresting workaround; however, upgrade to be able to use double quotes.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:10, 11 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== composer.json ==&lt;br /&gt;
&lt;br /&gt;
When trying to install dependencies via composer, the current requirement says &amp;lt;code&amp;gt;&amp;quot;composer/installers&amp;quot;: &amp;quot;~2.1&amp;quot;&amp;lt;/code&amp;gt; on REL1_39 branch. The latest version is currently 2.5.4 which doesn&#039;t meet this requirement. Could this be updated to a more permissive requirement? [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 18:29, 24 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is being addressed in [[phab:T330485]]. [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 19:39, 13 March 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Not pulling the correct result from the json ==&lt;br /&gt;
&lt;br /&gt;
I have a json file that validates and have used the following code in the page: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#get_web_data:url=https://blah.json&amp;lt;br&amp;gt;&lt;br /&gt;
| data = id=id,type=type,description=description&amp;lt;br&amp;gt;&lt;br /&gt;
| use jsonpath $[&#039;Generic&#039;][&#039;Defensive&#039;][&#039;Wanted&#039;]:&amp;lt;br&amp;gt;&lt;br /&gt;
| format=json&amp;lt;br&amp;gt;&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have tried all sorts of iterations code to get External data to bring back the result for [&#039;Wanted&#039;] but it will only bring back the first entry in the json file, not the [&#039;Wanted&#039;] entry. The patch checks out and I have checked it on a validator so I am not sure what I am doing wrong. &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 23:22, 25 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The correct syntax seems to be:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=$.Generic.Defensive.Wanted.id,type=$.Generic.Defensive.Wanted.type,description=$.Generic.Defensive.Wanted.description&lt;br /&gt;
:   | use jsonpath&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }}&lt;br /&gt;
:A simpler variant may also work, depending on the JSON contents:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=id,type=type,description=description&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }} [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 12:47, 26 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
:Thanks for those. The first example returns the error &lt;br /&gt;
:ID: Error: no local variable &amp;quot;id&amp;quot; has been set.&lt;br /&gt;
:Type: Error: no local variable &amp;quot;type&amp;quot; has been set.&lt;br /&gt;
:Description(s): Error: no local variable &amp;quot;description&amp;quot; has been set.&lt;br /&gt;
:I was calling the results with &lt;br /&gt;
:* ID: {{#external_value:id}}&lt;br /&gt;
:* Type: {{#external_value:type}}&lt;br /&gt;
:* Description(s): {{#external_value:description}}&lt;br /&gt;
:The second example I had already tried and it has the same problem. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 16:52, 26 April 2023 (UTC)&lt;br /&gt;
::Then an example of the JSON would be helpful. [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 08:13, 28 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Read BSON array from MongoDB ==&lt;br /&gt;
&lt;br /&gt;
submit TypeError EDConnectorMongodb::getValueFromJSONArray(): Argument #1 ($origArray) must be of type array, MongoDB\Model\BSONDocument given &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When I put data to {{get_external_data: source=Mongo|from collection|find query ={&amp;quot;email.domain&amp;quot;:&amp;quot;some_domain&amp;quot;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|data=email=email.domain}} recieve error above&amp;lt;/nowiki&amp;gt; [[Special:Contributions/93.153.250.62|93.153.250.62]] 09:47, 18 July 2023 (UTC)&lt;br /&gt;
* You can now upgrade and check if the error is still there.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 15:27, 18 July 2023 (UTC)&lt;br /&gt;
*:yes, the same error [[Special:Contributions/93.153.250.62|93.153.250.62]] 07:13, 19 July 2023 (UTC)&lt;br /&gt;
*** What is the Special:Version line for External Data?&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:20, 19 July 2023 (UTC)&lt;br /&gt;
***:3.3-alpha [[Special:Contributions/93.153.250.62|93.153.250.62]] 12:30, 19 July 2023 (UTC)&lt;br /&gt;
**** Yes, but what is after &amp;quot;3.3-alpha&amp;quot;?&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 13:02, 19 July 2023 (UTC)&lt;br /&gt;
****:3.3-alpha (67b5813) 11:15, 3 июля 2023 [[Special:Contributions/93.153.250.62|93.153.250.62]] 13:42, 19 July 2023 (UTC)&lt;br /&gt;
***** And the bug was fixed on the eighteenth of July.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 14:06, 19 July 2023 (UTC)&lt;br /&gt;
*****:Do I need update extension? [[Special:Contributions/93.153.250.62|93.153.250.62]] 07:33, 21 July 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032870</id>
		<title>Extension talk:External Data</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032870"/>
		<updated>2023-07-19T13:42:21Z</updated>

		<summary type="html">&lt;p&gt;93.153.250.62: /* Read BSON array from MongoDB */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{External Data navigation}}&lt;br /&gt;
{{Archive box|&lt;br /&gt;
* [[Extension talk:External Data/Archive 2009|2009]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2010|2010]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2011|2011]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2012|2012]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2013|2013]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2014|2014]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2015|2015]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2016|2016]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2017 to 2018|2017 to 2018]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2019 to 2020|2019 to 2020]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2021 to 2022|2021 to 2022]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== accessing the internal variable (__json) ==&lt;br /&gt;
&lt;br /&gt;
I need some help. Background: I&#039;m working on an extension that uses a webcall to retrieve a JSON object and converts it into concise html code. This extension now is working properly, but lacks caching. This JSON object is complex: containing multiple nested arrays with varying number of elements and it took me a while to program it in php.&lt;br /&gt;
&lt;br /&gt;
My current line of thought is to transfer the entire json object (that is stored in the internal variable __json) to my extension.&lt;br /&gt;
&lt;br /&gt;
Question 1) how does one access the internal variables??  The code below doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
Question 2) do you have any comments / suggestions on my approach?&amp;lt;!-- retreiving the data --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#get_web_data:url=https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;|format=json}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* first bullit: {{#external_value:__json}}&lt;br /&gt;
* second bullit:{{#external_value:meta}}&amp;lt;!-- this value (200) is being output correctly --&amp;gt;&amp;lt;!-- passing it to my extension --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#myextension:{{#external_value:__json}}|param1|param2}} [[User:Harro Kremer|Harro Kremer]] ([[User talk:Harro Kremer|talk]]) 21:20, 3 January 2023 (UTC)&lt;br /&gt;
* Since &amp;lt;code&amp;gt;__json&amp;lt;/code&amp;gt; is not a string but a Lua table, it is only accessible from Lua ([[Extension:Scribunto|Scribunto]] is needed) and not from wikitext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local parsed, errors = mw.ext.externalData.getExternalData{ url = &#039;https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;&#039; }&lt;br /&gt;
if parsed then&lt;br /&gt;
    local json = parsed.__json&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:46, 9 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using External Data in a Template ==&lt;br /&gt;
I want to fill a custom Infobox Template with data from ExternalData. The data will reside in a CSV file matching the non-namespace part of the page importing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mynamespace:mypage content: &amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
template:myinfobox content: &amp;lt;nowiki&amp;gt;{{infobox | header1 = header | data1 = {{#external_value:value_name|source=data|format=csv with header|delimiter=;|file name={{PAGENAME}}.csv}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
However, this tries to fetch data from a CSV file named &amp;quot;myinfobox&amp;quot; instead&lt;br /&gt;
What is a better way to achieve this?&lt;br /&gt;
&lt;br /&gt;
:Is the template called &amp;quot;infobox myinfobox&amp;quot;, or just &amp;quot;myinfobox&amp;quot;? And do you see the problem on the &amp;quot;mypage&amp;quot; page, or right on the template page? [[User:Yaron Koren|Yaron Koren]] ([[User talk:Yaron Koren|talk]]) 00:34, 10 January 2023 (UTC)&lt;br /&gt;
::my template page is called &amp;quot;Vorlage:Infobox_VM&amp;quot;. The problem occurs on &amp;quot;mypage&amp;quot; as the template page doesn’t really have any visible content nor has it the CSV providing information. &amp;quot;mypage&amp;quot; tries to read from a csv called Vorlage:Infobox_VM.csv instead if mypage.csv.&lt;br /&gt;
* This looks like a strange way to invoke a template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Why not just &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;? And, as said above, fetching data from &amp;lt;code&amp;gt;myinfobox.csv&amp;lt;/code&amp;gt; is what to be expected on the template page itself, unless the code is wrapped with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:11, 10 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::yes you’re right, i tried being verbose for clarity. in my page i have only &amp;lt;nowiki&amp;gt; {{Infobox VM}}&amp;lt;/nowiki&amp;gt; and that seems to work well enough. I&#039;m not really concerned what csv is being read on the template page itself, as that page isn’t really supposed to be looked at. &amp;lt;br&amp;gt; I want &amp;quot;mypage&amp;quot; to look at mypage.csv through the template. that’s what doesn’t work.&lt;br /&gt;
* What are the settings for the data source &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; inline&amp;gt;$wgExternalDataSources[&#039;data&#039;]&amp;lt;/syntaxhighlight&amp;gt;)?&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$wgExternalDataSources[&#039;data&#039;][&#039;path&#039;] = &#039;/opt/infradb-data/vm/&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: that path and all the files in it are world readable. that stuff works in principle. i am able to pull info from csv. just not via the page name in the template.&lt;br /&gt;
* Could not reproduce the issue at my &#039;&#039;MediaWiki&#039;&#039; installation. Looks like there you have some sophisticated wiki code that substituted &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; too early on.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:59, 14 January 2023 (UTC)&lt;br /&gt;
*:I solved the problem this way:   on &amp;quot;mypage&amp;quot; i call &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;amp;lt;nowiki&amp;amp;gt;{{Infobox Host | filename={{PAGENAME}} }} &amp;amp;lt;/nowiki&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and on the template page i use that variable to find the right file. [[Special:Contributions/24.134.95.253|24.134.95.253]] 15:51, 17 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Slightly different csv data files, only one works ==&lt;br /&gt;
&lt;br /&gt;
I have 2 48 line csv files, &amp;lt; 10k in size with a minor difference, but only one can be read in ExternalData in 1.39&lt;br /&gt;
&lt;br /&gt;
Simplified case https://johnbray.org.uk/expounder/Extdataproblem1 uses &lt;br /&gt;
&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/datagood and then&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/databad &lt;br /&gt;
&lt;br /&gt;
checking that {{#external_value:ddescription}} has something from a line of the csv file. datagood works, but databad does not. The difference between the files is a few characters on one line, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}, {{link|Q62625219|Maureen Kincaid Speller}}&lt;br /&gt;
,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;gt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB&lt;br /&gt;
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both files are &amp;lt; 10k in size, 48 lines, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
wc datagood databad    &lt;br /&gt;
  48   338  9245 datagood &lt;br /&gt;
  48   341  9180 databad [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 14:05, 13 January 2023 (UTC)&lt;br /&gt;
* Neither of the CSV files is formed perfectly from PHP&#039;s point of view. The problems start at the line 7 (one-based). For &amp;lt;code&amp;gt;databad&amp;lt;/code&amp;gt; this causes the automatically recognised delimiter to be &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;. You can overcome this by adding &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:45, 14 January 2023 (UTC)&lt;br /&gt;
*:Thanks for the quick response. That cured the problem, both for my trivial and full cases. [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 11:00, 16 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What is the best practice to fetch many values (&amp;gt;300) from the same place? ==&lt;br /&gt;
&lt;br /&gt;
Is it better to use the legacy method, like #get_web_data, and fetch all the values at once, then display using #external_value; or is it better to use the new method, #external_value with source parameter, 300 times? What performance consideration might there be?&lt;br /&gt;
&lt;br /&gt;
[[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:51, 17 January 2023 (UTC)&lt;br /&gt;
* If you use caching, the difference is not that big. Using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will save cache lookups, but the legacy mode will stop working once MediaWiki is upgraded to use Parsoid, since it does not guarantee parsing order. The optimal solution is to handle data fetching and display with one Lua function, where you can save the fetched data into a variable and later display it.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:22, 18 January 2023 (UTC)&lt;br /&gt;
*:Thanks, we&#039;ll look into Lua. We do have caching setup so the standalone method might be fine, now that you&#039;ve helped us iron out the kinks. Thanks again for the help! [[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:54, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some JSONPATH doesn’t retrieve results ==&lt;br /&gt;
I have a JSON file with Information about network interfaces in it.&lt;br /&gt;
I am retrieving this information with get_file_data and two jsonpath instructions. However, only one of them seems to be executed/filled with data.&lt;br /&gt;
&lt;br /&gt;
This is my json:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[{&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;prefix&amp;quot;: 24, &amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.1&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::aaaa:aaaa:aaaa:aaaa&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ab:ab:ab:ab:ab:ab&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth0&amp;quot;}, {&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.2&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;, &amp;quot;prefix&amp;quot;: 24}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::ccff:ceff:feff:ceff&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ce:ff:ce:ff:ce:ff&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth1&amp;quot;}]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
and this is the template code i use to retrieve the data:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_external_data: source=host_data&lt;br /&gt;
   |file name={{{{{ucfirst:{{{hostname}}}}}|dummy}}}_net.json&lt;br /&gt;
   |data=mymacaddress=$[?(@.name == &#039;{{{interfacename}}}&#039;)].hardware-address,&lt;br /&gt;
     adressen=$[?(@.name == &#039;{{{interfacename}}}&#039;)][ip-addresses][*].ip-address&lt;br /&gt;
     &lt;br /&gt;
   |use jsonpath&lt;br /&gt;
   |format=json&lt;br /&gt;
   }}&lt;br /&gt;
{{{hostname}}}&lt;br /&gt;
{{{interfacename}}} ({{#external_value:mymacaddress|invalid}})&lt;br /&gt;
{{#display_external_table: template=bulleted list|data=1=adressen}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
i call this template in the following fashion: &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#display_external_table: template=Interface&lt;br /&gt;
  |data=interfacename={{{netnames}}},hostname={{{filename}}}&lt;br /&gt;
  }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where netnames is just an array, usually only one entry like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;quot;ens18&amp;quot;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and filename points to the correct file&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{netnames}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an array, I don&#039;t know how transcluding it within single quotes in a JsonPath query could work. Neither &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;ens18&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt;, nor &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;eth1&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt; is a working JsonPath. &amp;lt;code&amp;gt;mymacaddress=$[?(@.name == &#039;eth1&#039;)].hardware-address&amp;lt;/code&amp;gt; would be. I would suggest replacing &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, but this does not seem to be implemented.&amp;lt;br /&amp;gt;You could try a regular expression: &amp;lt;code&amp;gt;$[?(@.name =~ &#039;eth0|eth1&#039;)].ip-addresses.[*].ip-address&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;Also, you can get the bulleted list without a template:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{#for_external_table:|&lt;br /&gt;
 * {{{adressen}}}}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:23, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Strange bug parsing CSV with pipe character ==&lt;br /&gt;
&lt;br /&gt;
I have a field called &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; which is called in &amp;lt;code&amp;gt;#for_external_table&amp;lt;/code&amp;gt;. All of the values have at least one pipe character, and the page cuts off everything before and including the first pipe character. But the strange thing is that it only happens if {{{title}}} is located in a specific place. &lt;br /&gt;
&lt;br /&gt;
The page can be seen at https://comprehensibleinputwiki.org/wiki/Mandarin_Chinese/Videos and the external data is at https://comprehensibleinputwiki.org/wiki/Data:Mandarin_Chinese/Videos. If you look at the wiki source of the first link, I have {{{title}}} twice, one of them in a hidden div. If you view the source of the page, the first one is missing part of the value, while the hidden one is complete. [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 20:08, 22 January 2023 (UTC)&lt;br /&gt;
* Add &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;{{#get_web_data:}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:01, 23 January 2023 (UTC)&lt;br /&gt;
*:It didn&#039;t seem to change anything. I changed it to:&lt;br /&gt;
*:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:url={{fullurl:Data:Mandarin_Chinese/Videos|action=raw}}|format=csv with header|data=language=Language, title=Title, videoId=Video ID, service=Service, level=Level, channel=Channel, index=Index|delimiter=,}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 03:00, 23 January 2023 (UTC)&lt;br /&gt;
*** At least, the videos are displayed now. If the current problem is the trimmed titles in the &amp;quot;Title&amp;quot; column, this is not related directly to the extension. The beginning of the title is treated as attributes to the &amp;lt;code&amp;gt;&amp;amp;lt;td&amp;amp;gt;&amp;lt;/code&amp;gt; tag by &#039;&#039;MediaWiki&#039;&#039; parser. Wrap &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;nowiki&amp;lt;/code&amp;gt;, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:nowiki|{{{title}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, to see the first chunk of the title.&amp;lt;br /&amp;gt;&#039;&#039;&#039;UPD:&#039;&#039;&#039; Or, you can add a second &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:21, 23 January 2023 (UTC)&lt;br /&gt;
***:That worked, thanks! I didn&#039;t notice any issues on my end with the videos not displaying before, but good to know! [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 09:36, 23 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameter parsing problems==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PHP || 8.2.1&lt;br /&gt;
|-&lt;br /&gt;
| MediaWiki || 1.38.4&lt;br /&gt;
|-&lt;br /&gt;
| PostgreSQL || 14.6&lt;br /&gt;
|-&lt;br /&gt;
| External Data || 3.2 (5d30e60) 08:38, 2. Nov. 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hi. I use External Data to retrieve data from a PostgreSQL database. In most cases I use prepared statements and I noticed that the passing of parameters seem not to work correctly. Here a self contained test to visualize what I mean.&lt;br /&gt;
&lt;br /&gt;
In the database I have a table with a single column of type text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT * FROM public.test;&lt;br /&gt;
            txt&lt;br /&gt;
----------------------------&lt;br /&gt;
 a simple text&lt;br /&gt;
 another simple text&lt;br /&gt;
 a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the lines contain spaces and in one case a comma.&lt;br /&gt;
&lt;br /&gt;
Then I have a search function that receives a parameter of type text and returns a set of text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SETOF TEXT public.mw_test(p_search TEXT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the configuration LocalSettings.php for this looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgExternalDataSources[&#039;wikidoc&#039;] = [&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;type&#039; =&amp;gt; &#039;postgres&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;prepared&#039;  =&amp;gt; [&lt;br /&gt;
       &#039;test&#039; =&amp;gt; &#039;SELECT mw_test&lt;br /&gt;
                  FROM public.mw_test($1);&#039;&lt;br /&gt;
    ]&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the wikipage the snippet is as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply displays what it finds on a line.&lt;br /&gt;
&lt;br /&gt;
What happens is the the list of parameters cannot contain a comma. The snippet as is above works fine and returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But something like this not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with, a&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error is &amp;quot;Fehler: Es wurden keine Rückgabewerte festgelegt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is clear that a comma is used to separate parameters and that is the reason why this does not work. My question is how can I pass the whole string &amp;quot;with, a&amp;quot; as a single parameter.&lt;br /&gt;
&lt;br /&gt;
I tried enclosing it in single and double quotes, but this did not help. It leads to this exception:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[6882cc0e426ebdb6cf6911bc] /w/index.php?title=IT/IT_Infrastructure/KOFDB_Uebersicht&amp;amp;action=submit TypeError: EDParserFunctions::formatErrorMessages(): Argument #1 ($errors) must be of type array, null given, called in /home/wiki/application/w/extensions/ExternalData/includes/EDParserFunctions.php on line 98&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any idea what I could do to solve this? Help is very appreciated. Thanks&lt;br /&gt;
&lt;br /&gt;
It looks like I found a way to solve this. I can enclose the whole string in round parenthesis and it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = (with, a)&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* An intresting workaround; however, upgrade to be able to use double quotes.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:10, 11 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== composer.json ==&lt;br /&gt;
&lt;br /&gt;
When trying to install dependencies via composer, the current requirement says &amp;lt;code&amp;gt;&amp;quot;composer/installers&amp;quot;: &amp;quot;~2.1&amp;quot;&amp;lt;/code&amp;gt; on REL1_39 branch. The latest version is currently 2.5.4 which doesn&#039;t meet this requirement. Could this be updated to a more permissive requirement? [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 18:29, 24 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is being addressed in [[phab:T330485]]. [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 19:39, 13 March 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Not pulling the correct result from the json ==&lt;br /&gt;
&lt;br /&gt;
I have a json file that validates and have used the following code in the page: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#get_web_data:url=https://blah.json&amp;lt;br&amp;gt;&lt;br /&gt;
| data = id=id,type=type,description=description&amp;lt;br&amp;gt;&lt;br /&gt;
| use jsonpath $[&#039;Generic&#039;][&#039;Defensive&#039;][&#039;Wanted&#039;]:&amp;lt;br&amp;gt;&lt;br /&gt;
| format=json&amp;lt;br&amp;gt;&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have tried all sorts of iterations code to get External data to bring back the result for [&#039;Wanted&#039;] but it will only bring back the first entry in the json file, not the [&#039;Wanted&#039;] entry. The patch checks out and I have checked it on a validator so I am not sure what I am doing wrong. &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 23:22, 25 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The correct syntax seems to be:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=$.Generic.Defensive.Wanted.id,type=$.Generic.Defensive.Wanted.type,description=$.Generic.Defensive.Wanted.description&lt;br /&gt;
:   | use jsonpath&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }}&lt;br /&gt;
:A simpler variant may also work, depending on the JSON contents:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=id,type=type,description=description&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }} [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 12:47, 26 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
:Thanks for those. The first example returns the error &lt;br /&gt;
:ID: Error: no local variable &amp;quot;id&amp;quot; has been set.&lt;br /&gt;
:Type: Error: no local variable &amp;quot;type&amp;quot; has been set.&lt;br /&gt;
:Description(s): Error: no local variable &amp;quot;description&amp;quot; has been set.&lt;br /&gt;
:I was calling the results with &lt;br /&gt;
:* ID: {{#external_value:id}}&lt;br /&gt;
:* Type: {{#external_value:type}}&lt;br /&gt;
:* Description(s): {{#external_value:description}}&lt;br /&gt;
:The second example I had already tried and it has the same problem. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 16:52, 26 April 2023 (UTC)&lt;br /&gt;
::Then an example of the JSON would be helpful. [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 08:13, 28 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Read BSON array from MongoDB ==&lt;br /&gt;
&lt;br /&gt;
submit TypeError EDConnectorMongodb::getValueFromJSONArray(): Argument #1 ($origArray) must be of type array, MongoDB\Model\BSONDocument given &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When I put data to {{get_external_data: source=Mongo|from collection|find query ={&amp;quot;email.domain&amp;quot;:&amp;quot;some_domain&amp;quot;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|data=email=email.domain}} recieve error above&amp;lt;/nowiki&amp;gt; [[Special:Contributions/93.153.250.62|93.153.250.62]] 09:47, 18 July 2023 (UTC)&lt;br /&gt;
* You can now upgrade and check if the error is still there.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 15:27, 18 July 2023 (UTC)&lt;br /&gt;
*:yes, the same error [[Special:Contributions/93.153.250.62|93.153.250.62]] 07:13, 19 July 2023 (UTC)&lt;br /&gt;
*** What is the Special:Version line for External Data?&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:20, 19 July 2023 (UTC)&lt;br /&gt;
***:3.3-alpha [[Special:Contributions/93.153.250.62|93.153.250.62]] 12:30, 19 July 2023 (UTC)&lt;br /&gt;
**** Yes, but what is after &amp;quot;3.3-alpha&amp;quot;?&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 13:02, 19 July 2023 (UTC)&lt;br /&gt;
****:3.3-alpha (67b5813) 11:15, 3 июля 2023 [[Special:Contributions/93.153.250.62|93.153.250.62]] 13:42, 19 July 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032856</id>
		<title>Extension talk:External Data</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032856"/>
		<updated>2023-07-19T12:30:49Z</updated>

		<summary type="html">&lt;p&gt;93.153.250.62: /* Read BSON array from MongoDB */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{External Data navigation}}&lt;br /&gt;
{{Archive box|&lt;br /&gt;
* [[Extension talk:External Data/Archive 2009|2009]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2010|2010]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2011|2011]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2012|2012]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2013|2013]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2014|2014]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2015|2015]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2016|2016]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2017 to 2018|2017 to 2018]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2019 to 2020|2019 to 2020]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2021 to 2022|2021 to 2022]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== accessing the internal variable (__json) ==&lt;br /&gt;
&lt;br /&gt;
I need some help. Background: I&#039;m working on an extension that uses a webcall to retrieve a JSON object and converts it into concise html code. This extension now is working properly, but lacks caching. This JSON object is complex: containing multiple nested arrays with varying number of elements and it took me a while to program it in php.&lt;br /&gt;
&lt;br /&gt;
My current line of thought is to transfer the entire json object (that is stored in the internal variable __json) to my extension.&lt;br /&gt;
&lt;br /&gt;
Question 1) how does one access the internal variables??  The code below doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
Question 2) do you have any comments / suggestions on my approach?&amp;lt;!-- retreiving the data --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#get_web_data:url=https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;|format=json}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* first bullit: {{#external_value:__json}}&lt;br /&gt;
* second bullit:{{#external_value:meta}}&amp;lt;!-- this value (200) is being output correctly --&amp;gt;&amp;lt;!-- passing it to my extension --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#myextension:{{#external_value:__json}}|param1|param2}} [[User:Harro Kremer|Harro Kremer]] ([[User talk:Harro Kremer|talk]]) 21:20, 3 January 2023 (UTC)&lt;br /&gt;
* Since &amp;lt;code&amp;gt;__json&amp;lt;/code&amp;gt; is not a string but a Lua table, it is only accessible from Lua ([[Extension:Scribunto|Scribunto]] is needed) and not from wikitext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local parsed, errors = mw.ext.externalData.getExternalData{ url = &#039;https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;&#039; }&lt;br /&gt;
if parsed then&lt;br /&gt;
    local json = parsed.__json&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:46, 9 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using External Data in a Template ==&lt;br /&gt;
I want to fill a custom Infobox Template with data from ExternalData. The data will reside in a CSV file matching the non-namespace part of the page importing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mynamespace:mypage content: &amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
template:myinfobox content: &amp;lt;nowiki&amp;gt;{{infobox | header1 = header | data1 = {{#external_value:value_name|source=data|format=csv with header|delimiter=;|file name={{PAGENAME}}.csv}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
However, this tries to fetch data from a CSV file named &amp;quot;myinfobox&amp;quot; instead&lt;br /&gt;
What is a better way to achieve this?&lt;br /&gt;
&lt;br /&gt;
:Is the template called &amp;quot;infobox myinfobox&amp;quot;, or just &amp;quot;myinfobox&amp;quot;? And do you see the problem on the &amp;quot;mypage&amp;quot; page, or right on the template page? [[User:Yaron Koren|Yaron Koren]] ([[User talk:Yaron Koren|talk]]) 00:34, 10 January 2023 (UTC)&lt;br /&gt;
::my template page is called &amp;quot;Vorlage:Infobox_VM&amp;quot;. The problem occurs on &amp;quot;mypage&amp;quot; as the template page doesn’t really have any visible content nor has it the CSV providing information. &amp;quot;mypage&amp;quot; tries to read from a csv called Vorlage:Infobox_VM.csv instead if mypage.csv.&lt;br /&gt;
* This looks like a strange way to invoke a template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Why not just &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;? And, as said above, fetching data from &amp;lt;code&amp;gt;myinfobox.csv&amp;lt;/code&amp;gt; is what to be expected on the template page itself, unless the code is wrapped with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:11, 10 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::yes you’re right, i tried being verbose for clarity. in my page i have only &amp;lt;nowiki&amp;gt; {{Infobox VM}}&amp;lt;/nowiki&amp;gt; and that seems to work well enough. I&#039;m not really concerned what csv is being read on the template page itself, as that page isn’t really supposed to be looked at. &amp;lt;br&amp;gt; I want &amp;quot;mypage&amp;quot; to look at mypage.csv through the template. that’s what doesn’t work.&lt;br /&gt;
* What are the settings for the data source &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; inline&amp;gt;$wgExternalDataSources[&#039;data&#039;]&amp;lt;/syntaxhighlight&amp;gt;)?&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$wgExternalDataSources[&#039;data&#039;][&#039;path&#039;] = &#039;/opt/infradb-data/vm/&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: that path and all the files in it are world readable. that stuff works in principle. i am able to pull info from csv. just not via the page name in the template.&lt;br /&gt;
* Could not reproduce the issue at my &#039;&#039;MediaWiki&#039;&#039; installation. Looks like there you have some sophisticated wiki code that substituted &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; too early on.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:59, 14 January 2023 (UTC)&lt;br /&gt;
*:I solved the problem this way:   on &amp;quot;mypage&amp;quot; i call &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;amp;lt;nowiki&amp;amp;gt;{{Infobox Host | filename={{PAGENAME}} }} &amp;amp;lt;/nowiki&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and on the template page i use that variable to find the right file. [[Special:Contributions/24.134.95.253|24.134.95.253]] 15:51, 17 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Slightly different csv data files, only one works ==&lt;br /&gt;
&lt;br /&gt;
I have 2 48 line csv files, &amp;lt; 10k in size with a minor difference, but only one can be read in ExternalData in 1.39&lt;br /&gt;
&lt;br /&gt;
Simplified case https://johnbray.org.uk/expounder/Extdataproblem1 uses &lt;br /&gt;
&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/datagood and then&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/databad &lt;br /&gt;
&lt;br /&gt;
checking that {{#external_value:ddescription}} has something from a line of the csv file. datagood works, but databad does not. The difference between the files is a few characters on one line, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}, {{link|Q62625219|Maureen Kincaid Speller}}&lt;br /&gt;
,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;gt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB&lt;br /&gt;
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both files are &amp;lt; 10k in size, 48 lines, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
wc datagood databad    &lt;br /&gt;
  48   338  9245 datagood &lt;br /&gt;
  48   341  9180 databad [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 14:05, 13 January 2023 (UTC)&lt;br /&gt;
* Neither of the CSV files is formed perfectly from PHP&#039;s point of view. The problems start at the line 7 (one-based). For &amp;lt;code&amp;gt;databad&amp;lt;/code&amp;gt; this causes the automatically recognised delimiter to be &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;. You can overcome this by adding &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:45, 14 January 2023 (UTC)&lt;br /&gt;
*:Thanks for the quick response. That cured the problem, both for my trivial and full cases. [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 11:00, 16 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What is the best practice to fetch many values (&amp;gt;300) from the same place? ==&lt;br /&gt;
&lt;br /&gt;
Is it better to use the legacy method, like #get_web_data, and fetch all the values at once, then display using #external_value; or is it better to use the new method, #external_value with source parameter, 300 times? What performance consideration might there be?&lt;br /&gt;
&lt;br /&gt;
[[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:51, 17 January 2023 (UTC)&lt;br /&gt;
* If you use caching, the difference is not that big. Using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will save cache lookups, but the legacy mode will stop working once MediaWiki is upgraded to use Parsoid, since it does not guarantee parsing order. The optimal solution is to handle data fetching and display with one Lua function, where you can save the fetched data into a variable and later display it.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:22, 18 January 2023 (UTC)&lt;br /&gt;
*:Thanks, we&#039;ll look into Lua. We do have caching setup so the standalone method might be fine, now that you&#039;ve helped us iron out the kinks. Thanks again for the help! [[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:54, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some JSONPATH doesn’t retrieve results ==&lt;br /&gt;
I have a JSON file with Information about network interfaces in it.&lt;br /&gt;
I am retrieving this information with get_file_data and two jsonpath instructions. However, only one of them seems to be executed/filled with data.&lt;br /&gt;
&lt;br /&gt;
This is my json:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[{&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;prefix&amp;quot;: 24, &amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.1&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::aaaa:aaaa:aaaa:aaaa&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ab:ab:ab:ab:ab:ab&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth0&amp;quot;}, {&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.2&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;, &amp;quot;prefix&amp;quot;: 24}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::ccff:ceff:feff:ceff&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ce:ff:ce:ff:ce:ff&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth1&amp;quot;}]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
and this is the template code i use to retrieve the data:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_external_data: source=host_data&lt;br /&gt;
   |file name={{{{{ucfirst:{{{hostname}}}}}|dummy}}}_net.json&lt;br /&gt;
   |data=mymacaddress=$[?(@.name == &#039;{{{interfacename}}}&#039;)].hardware-address,&lt;br /&gt;
     adressen=$[?(@.name == &#039;{{{interfacename}}}&#039;)][ip-addresses][*].ip-address&lt;br /&gt;
     &lt;br /&gt;
   |use jsonpath&lt;br /&gt;
   |format=json&lt;br /&gt;
   }}&lt;br /&gt;
{{{hostname}}}&lt;br /&gt;
{{{interfacename}}} ({{#external_value:mymacaddress|invalid}})&lt;br /&gt;
{{#display_external_table: template=bulleted list|data=1=adressen}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
i call this template in the following fashion: &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#display_external_table: template=Interface&lt;br /&gt;
  |data=interfacename={{{netnames}}},hostname={{{filename}}}&lt;br /&gt;
  }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where netnames is just an array, usually only one entry like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;quot;ens18&amp;quot;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and filename points to the correct file&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{netnames}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an array, I don&#039;t know how transcluding it within single quotes in a JsonPath query could work. Neither &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;ens18&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt;, nor &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;eth1&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt; is a working JsonPath. &amp;lt;code&amp;gt;mymacaddress=$[?(@.name == &#039;eth1&#039;)].hardware-address&amp;lt;/code&amp;gt; would be. I would suggest replacing &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, but this does not seem to be implemented.&amp;lt;br /&amp;gt;You could try a regular expression: &amp;lt;code&amp;gt;$[?(@.name =~ &#039;eth0|eth1&#039;)].ip-addresses.[*].ip-address&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;Also, you can get the bulleted list without a template:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{#for_external_table:|&lt;br /&gt;
 * {{{adressen}}}}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:23, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Strange bug parsing CSV with pipe character ==&lt;br /&gt;
&lt;br /&gt;
I have a field called &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; which is called in &amp;lt;code&amp;gt;#for_external_table&amp;lt;/code&amp;gt;. All of the values have at least one pipe character, and the page cuts off everything before and including the first pipe character. But the strange thing is that it only happens if {{{title}}} is located in a specific place. &lt;br /&gt;
&lt;br /&gt;
The page can be seen at https://comprehensibleinputwiki.org/wiki/Mandarin_Chinese/Videos and the external data is at https://comprehensibleinputwiki.org/wiki/Data:Mandarin_Chinese/Videos. If you look at the wiki source of the first link, I have {{{title}}} twice, one of them in a hidden div. If you view the source of the page, the first one is missing part of the value, while the hidden one is complete. [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 20:08, 22 January 2023 (UTC)&lt;br /&gt;
* Add &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;{{#get_web_data:}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:01, 23 January 2023 (UTC)&lt;br /&gt;
*:It didn&#039;t seem to change anything. I changed it to:&lt;br /&gt;
*:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:url={{fullurl:Data:Mandarin_Chinese/Videos|action=raw}}|format=csv with header|data=language=Language, title=Title, videoId=Video ID, service=Service, level=Level, channel=Channel, index=Index|delimiter=,}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 03:00, 23 January 2023 (UTC)&lt;br /&gt;
*** At least, the videos are displayed now. If the current problem is the trimmed titles in the &amp;quot;Title&amp;quot; column, this is not related directly to the extension. The beginning of the title is treated as attributes to the &amp;lt;code&amp;gt;&amp;amp;lt;td&amp;amp;gt;&amp;lt;/code&amp;gt; tag by &#039;&#039;MediaWiki&#039;&#039; parser. Wrap &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;nowiki&amp;lt;/code&amp;gt;, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:nowiki|{{{title}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, to see the first chunk of the title.&amp;lt;br /&amp;gt;&#039;&#039;&#039;UPD:&#039;&#039;&#039; Or, you can add a second &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:21, 23 January 2023 (UTC)&lt;br /&gt;
***:That worked, thanks! I didn&#039;t notice any issues on my end with the videos not displaying before, but good to know! [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 09:36, 23 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameter parsing problems==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PHP || 8.2.1&lt;br /&gt;
|-&lt;br /&gt;
| MediaWiki || 1.38.4&lt;br /&gt;
|-&lt;br /&gt;
| PostgreSQL || 14.6&lt;br /&gt;
|-&lt;br /&gt;
| External Data || 3.2 (5d30e60) 08:38, 2. Nov. 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hi. I use External Data to retrieve data from a PostgreSQL database. In most cases I use prepared statements and I noticed that the passing of parameters seem not to work correctly. Here a self contained test to visualize what I mean.&lt;br /&gt;
&lt;br /&gt;
In the database I have a table with a single column of type text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT * FROM public.test;&lt;br /&gt;
            txt&lt;br /&gt;
----------------------------&lt;br /&gt;
 a simple text&lt;br /&gt;
 another simple text&lt;br /&gt;
 a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the lines contain spaces and in one case a comma.&lt;br /&gt;
&lt;br /&gt;
Then I have a search function that receives a parameter of type text and returns a set of text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SETOF TEXT public.mw_test(p_search TEXT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the configuration LocalSettings.php for this looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgExternalDataSources[&#039;wikidoc&#039;] = [&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;type&#039; =&amp;gt; &#039;postgres&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;prepared&#039;  =&amp;gt; [&lt;br /&gt;
       &#039;test&#039; =&amp;gt; &#039;SELECT mw_test&lt;br /&gt;
                  FROM public.mw_test($1);&#039;&lt;br /&gt;
    ]&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the wikipage the snippet is as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply displays what it finds on a line.&lt;br /&gt;
&lt;br /&gt;
What happens is the the list of parameters cannot contain a comma. The snippet as is above works fine and returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But something like this not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with, a&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error is &amp;quot;Fehler: Es wurden keine Rückgabewerte festgelegt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is clear that a comma is used to separate parameters and that is the reason why this does not work. My question is how can I pass the whole string &amp;quot;with, a&amp;quot; as a single parameter.&lt;br /&gt;
&lt;br /&gt;
I tried enclosing it in single and double quotes, but this did not help. It leads to this exception:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[6882cc0e426ebdb6cf6911bc] /w/index.php?title=IT/IT_Infrastructure/KOFDB_Uebersicht&amp;amp;action=submit TypeError: EDParserFunctions::formatErrorMessages(): Argument #1 ($errors) must be of type array, null given, called in /home/wiki/application/w/extensions/ExternalData/includes/EDParserFunctions.php on line 98&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any idea what I could do to solve this? Help is very appreciated. Thanks&lt;br /&gt;
&lt;br /&gt;
It looks like I found a way to solve this. I can enclose the whole string in round parenthesis and it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = (with, a)&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* An intresting workaround; however, upgrade to be able to use double quotes.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:10, 11 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== composer.json ==&lt;br /&gt;
&lt;br /&gt;
When trying to install dependencies via composer, the current requirement says &amp;lt;code&amp;gt;&amp;quot;composer/installers&amp;quot;: &amp;quot;~2.1&amp;quot;&amp;lt;/code&amp;gt; on REL1_39 branch. The latest version is currently 2.5.4 which doesn&#039;t meet this requirement. Could this be updated to a more permissive requirement? [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 18:29, 24 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is being addressed in [[phab:T330485]]. [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 19:39, 13 March 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Not pulling the correct result from the json ==&lt;br /&gt;
&lt;br /&gt;
I have a json file that validates and have used the following code in the page: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#get_web_data:url=https://blah.json&amp;lt;br&amp;gt;&lt;br /&gt;
| data = id=id,type=type,description=description&amp;lt;br&amp;gt;&lt;br /&gt;
| use jsonpath $[&#039;Generic&#039;][&#039;Defensive&#039;][&#039;Wanted&#039;]:&amp;lt;br&amp;gt;&lt;br /&gt;
| format=json&amp;lt;br&amp;gt;&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have tried all sorts of iterations code to get External data to bring back the result for [&#039;Wanted&#039;] but it will only bring back the first entry in the json file, not the [&#039;Wanted&#039;] entry. The patch checks out and I have checked it on a validator so I am not sure what I am doing wrong. &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 23:22, 25 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The correct syntax seems to be:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=$.Generic.Defensive.Wanted.id,type=$.Generic.Defensive.Wanted.type,description=$.Generic.Defensive.Wanted.description&lt;br /&gt;
:   | use jsonpath&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }}&lt;br /&gt;
:A simpler variant may also work, depending on the JSON contents:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=id,type=type,description=description&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }} [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 12:47, 26 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
:Thanks for those. The first example returns the error &lt;br /&gt;
:ID: Error: no local variable &amp;quot;id&amp;quot; has been set.&lt;br /&gt;
:Type: Error: no local variable &amp;quot;type&amp;quot; has been set.&lt;br /&gt;
:Description(s): Error: no local variable &amp;quot;description&amp;quot; has been set.&lt;br /&gt;
:I was calling the results with &lt;br /&gt;
:* ID: {{#external_value:id}}&lt;br /&gt;
:* Type: {{#external_value:type}}&lt;br /&gt;
:* Description(s): {{#external_value:description}}&lt;br /&gt;
:The second example I had already tried and it has the same problem. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 16:52, 26 April 2023 (UTC)&lt;br /&gt;
::Then an example of the JSON would be helpful. [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 08:13, 28 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Read BSON array from MongoDB ==&lt;br /&gt;
&lt;br /&gt;
submit TypeError EDConnectorMongodb::getValueFromJSONArray(): Argument #1 ($origArray) must be of type array, MongoDB\Model\BSONDocument given &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When I put data to {{get_external_data: source=Mongo|from collection|find query ={&amp;quot;email.domain&amp;quot;:&amp;quot;some_domain&amp;quot;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|data=email=email.domain}} recieve error above&amp;lt;/nowiki&amp;gt; [[Special:Contributions/93.153.250.62|93.153.250.62]] 09:47, 18 July 2023 (UTC)&lt;br /&gt;
* You can now upgrade and check if the error is still there.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 15:27, 18 July 2023 (UTC)&lt;br /&gt;
*:yes, the same error [[Special:Contributions/93.153.250.62|93.153.250.62]] 07:13, 19 July 2023 (UTC)&lt;br /&gt;
*** What is the Special:Version line for External Data?&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:20, 19 July 2023 (UTC)&lt;br /&gt;
***:3.3-alpha [[Special:Contributions/93.153.250.62|93.153.250.62]] 12:30, 19 July 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032505</id>
		<title>Extension talk:External Data</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6032505"/>
		<updated>2023-07-19T07:13:43Z</updated>

		<summary type="html">&lt;p&gt;93.153.250.62: /* Read BSON array from MongoDB */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{External Data navigation}}&lt;br /&gt;
{{Archive box|&lt;br /&gt;
* [[Extension talk:External Data/Archive 2009|2009]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2010|2010]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2011|2011]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2012|2012]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2013|2013]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2014|2014]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2015|2015]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2016|2016]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2017 to 2018|2017 to 2018]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2019 to 2020|2019 to 2020]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2021 to 2022|2021 to 2022]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== accessing the internal variable (__json) ==&lt;br /&gt;
&lt;br /&gt;
I need some help. Background: I&#039;m working on an extension that uses a webcall to retrieve a JSON object and converts it into concise html code. This extension now is working properly, but lacks caching. This JSON object is complex: containing multiple nested arrays with varying number of elements and it took me a while to program it in php.&lt;br /&gt;
&lt;br /&gt;
My current line of thought is to transfer the entire json object (that is stored in the internal variable __json) to my extension.&lt;br /&gt;
&lt;br /&gt;
Question 1) how does one access the internal variables??  The code below doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
Question 2) do you have any comments / suggestions on my approach?&amp;lt;!-- retreiving the data --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#get_web_data:url=https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;|format=json}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* first bullit: {{#external_value:__json}}&lt;br /&gt;
* second bullit:{{#external_value:meta}}&amp;lt;!-- this value (200) is being output correctly --&amp;gt;&amp;lt;!-- passing it to my extension --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#myextension:{{#external_value:__json}}|param1|param2}} [[User:Harro Kremer|Harro Kremer]] ([[User talk:Harro Kremer|talk]]) 21:20, 3 January 2023 (UTC)&lt;br /&gt;
* Since &amp;lt;code&amp;gt;__json&amp;lt;/code&amp;gt; is not a string but a Lua table, it is only accessible from Lua ([[Extension:Scribunto|Scribunto]] is needed) and not from wikitext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local parsed, errors = mw.ext.externalData.getExternalData{ url = &#039;https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;&#039; }&lt;br /&gt;
if parsed then&lt;br /&gt;
    local json = parsed.__json&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:46, 9 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using External Data in a Template ==&lt;br /&gt;
I want to fill a custom Infobox Template with data from ExternalData. The data will reside in a CSV file matching the non-namespace part of the page importing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mynamespace:mypage content: &amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
template:myinfobox content: &amp;lt;nowiki&amp;gt;{{infobox | header1 = header | data1 = {{#external_value:value_name|source=data|format=csv with header|delimiter=;|file name={{PAGENAME}}.csv}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
However, this tries to fetch data from a CSV file named &amp;quot;myinfobox&amp;quot; instead&lt;br /&gt;
What is a better way to achieve this?&lt;br /&gt;
&lt;br /&gt;
:Is the template called &amp;quot;infobox myinfobox&amp;quot;, or just &amp;quot;myinfobox&amp;quot;? And do you see the problem on the &amp;quot;mypage&amp;quot; page, or right on the template page? [[User:Yaron Koren|Yaron Koren]] ([[User talk:Yaron Koren|talk]]) 00:34, 10 January 2023 (UTC)&lt;br /&gt;
::my template page is called &amp;quot;Vorlage:Infobox_VM&amp;quot;. The problem occurs on &amp;quot;mypage&amp;quot; as the template page doesn’t really have any visible content nor has it the CSV providing information. &amp;quot;mypage&amp;quot; tries to read from a csv called Vorlage:Infobox_VM.csv instead if mypage.csv.&lt;br /&gt;
* This looks like a strange way to invoke a template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Why not just &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;? And, as said above, fetching data from &amp;lt;code&amp;gt;myinfobox.csv&amp;lt;/code&amp;gt; is what to be expected on the template page itself, unless the code is wrapped with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:11, 10 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::yes you’re right, i tried being verbose for clarity. in my page i have only &amp;lt;nowiki&amp;gt; {{Infobox VM}}&amp;lt;/nowiki&amp;gt; and that seems to work well enough. I&#039;m not really concerned what csv is being read on the template page itself, as that page isn’t really supposed to be looked at. &amp;lt;br&amp;gt; I want &amp;quot;mypage&amp;quot; to look at mypage.csv through the template. that’s what doesn’t work.&lt;br /&gt;
* What are the settings for the data source &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; inline&amp;gt;$wgExternalDataSources[&#039;data&#039;]&amp;lt;/syntaxhighlight&amp;gt;)?&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$wgExternalDataSources[&#039;data&#039;][&#039;path&#039;] = &#039;/opt/infradb-data/vm/&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: that path and all the files in it are world readable. that stuff works in principle. i am able to pull info from csv. just not via the page name in the template.&lt;br /&gt;
* Could not reproduce the issue at my &#039;&#039;MediaWiki&#039;&#039; installation. Looks like there you have some sophisticated wiki code that substituted &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; too early on.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:59, 14 January 2023 (UTC)&lt;br /&gt;
*:I solved the problem this way:   on &amp;quot;mypage&amp;quot; i call &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;amp;lt;nowiki&amp;amp;gt;{{Infobox Host | filename={{PAGENAME}} }} &amp;amp;lt;/nowiki&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and on the template page i use that variable to find the right file. [[Special:Contributions/24.134.95.253|24.134.95.253]] 15:51, 17 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Slightly different csv data files, only one works ==&lt;br /&gt;
&lt;br /&gt;
I have 2 48 line csv files, &amp;lt; 10k in size with a minor difference, but only one can be read in ExternalData in 1.39&lt;br /&gt;
&lt;br /&gt;
Simplified case https://johnbray.org.uk/expounder/Extdataproblem1 uses &lt;br /&gt;
&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/datagood and then&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/databad &lt;br /&gt;
&lt;br /&gt;
checking that {{#external_value:ddescription}} has something from a line of the csv file. datagood works, but databad does not. The difference between the files is a few characters on one line, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}, {{link|Q62625219|Maureen Kincaid Speller}}&lt;br /&gt;
,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;gt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB&lt;br /&gt;
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both files are &amp;lt; 10k in size, 48 lines, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
wc datagood databad    &lt;br /&gt;
  48   338  9245 datagood &lt;br /&gt;
  48   341  9180 databad [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 14:05, 13 January 2023 (UTC)&lt;br /&gt;
* Neither of the CSV files is formed perfectly from PHP&#039;s point of view. The problems start at the line 7 (one-based). For &amp;lt;code&amp;gt;databad&amp;lt;/code&amp;gt; this causes the automatically recognised delimiter to be &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;. You can overcome this by adding &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:45, 14 January 2023 (UTC)&lt;br /&gt;
*:Thanks for the quick response. That cured the problem, both for my trivial and full cases. [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 11:00, 16 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What is the best practice to fetch many values (&amp;gt;300) from the same place? ==&lt;br /&gt;
&lt;br /&gt;
Is it better to use the legacy method, like #get_web_data, and fetch all the values at once, then display using #external_value; or is it better to use the new method, #external_value with source parameter, 300 times? What performance consideration might there be?&lt;br /&gt;
&lt;br /&gt;
[[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:51, 17 January 2023 (UTC)&lt;br /&gt;
* If you use caching, the difference is not that big. Using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will save cache lookups, but the legacy mode will stop working once MediaWiki is upgraded to use Parsoid, since it does not guarantee parsing order. The optimal solution is to handle data fetching and display with one Lua function, where you can save the fetched data into a variable and later display it.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:22, 18 January 2023 (UTC)&lt;br /&gt;
*:Thanks, we&#039;ll look into Lua. We do have caching setup so the standalone method might be fine, now that you&#039;ve helped us iron out the kinks. Thanks again for the help! [[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:54, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some JSONPATH doesn’t retrieve results ==&lt;br /&gt;
I have a JSON file with Information about network interfaces in it.&lt;br /&gt;
I am retrieving this information with get_file_data and two jsonpath instructions. However, only one of them seems to be executed/filled with data.&lt;br /&gt;
&lt;br /&gt;
This is my json:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[{&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;prefix&amp;quot;: 24, &amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.1&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::aaaa:aaaa:aaaa:aaaa&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ab:ab:ab:ab:ab:ab&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth0&amp;quot;}, {&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.2&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;, &amp;quot;prefix&amp;quot;: 24}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::ccff:ceff:feff:ceff&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ce:ff:ce:ff:ce:ff&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth1&amp;quot;}]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
and this is the template code i use to retrieve the data:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_external_data: source=host_data&lt;br /&gt;
   |file name={{{{{ucfirst:{{{hostname}}}}}|dummy}}}_net.json&lt;br /&gt;
   |data=mymacaddress=$[?(@.name == &#039;{{{interfacename}}}&#039;)].hardware-address,&lt;br /&gt;
     adressen=$[?(@.name == &#039;{{{interfacename}}}&#039;)][ip-addresses][*].ip-address&lt;br /&gt;
     &lt;br /&gt;
   |use jsonpath&lt;br /&gt;
   |format=json&lt;br /&gt;
   }}&lt;br /&gt;
{{{hostname}}}&lt;br /&gt;
{{{interfacename}}} ({{#external_value:mymacaddress|invalid}})&lt;br /&gt;
{{#display_external_table: template=bulleted list|data=1=adressen}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
i call this template in the following fashion: &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#display_external_table: template=Interface&lt;br /&gt;
  |data=interfacename={{{netnames}}},hostname={{{filename}}}&lt;br /&gt;
  }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where netnames is just an array, usually only one entry like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;quot;ens18&amp;quot;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and filename points to the correct file&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{netnames}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an array, I don&#039;t know how transcluding it within single quotes in a JsonPath query could work. Neither &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;ens18&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt;, nor &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;eth1&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt; is a working JsonPath. &amp;lt;code&amp;gt;mymacaddress=$[?(@.name == &#039;eth1&#039;)].hardware-address&amp;lt;/code&amp;gt; would be. I would suggest replacing &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, but this does not seem to be implemented.&amp;lt;br /&amp;gt;You could try a regular expression: &amp;lt;code&amp;gt;$[?(@.name =~ &#039;eth0|eth1&#039;)].ip-addresses.[*].ip-address&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;Also, you can get the bulleted list without a template:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{#for_external_table:|&lt;br /&gt;
 * {{{adressen}}}}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:23, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Strange bug parsing CSV with pipe character ==&lt;br /&gt;
&lt;br /&gt;
I have a field called &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; which is called in &amp;lt;code&amp;gt;#for_external_table&amp;lt;/code&amp;gt;. All of the values have at least one pipe character, and the page cuts off everything before and including the first pipe character. But the strange thing is that it only happens if {{{title}}} is located in a specific place. &lt;br /&gt;
&lt;br /&gt;
The page can be seen at https://comprehensibleinputwiki.org/wiki/Mandarin_Chinese/Videos and the external data is at https://comprehensibleinputwiki.org/wiki/Data:Mandarin_Chinese/Videos. If you look at the wiki source of the first link, I have {{{title}}} twice, one of them in a hidden div. If you view the source of the page, the first one is missing part of the value, while the hidden one is complete. [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 20:08, 22 January 2023 (UTC)&lt;br /&gt;
* Add &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;{{#get_web_data:}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:01, 23 January 2023 (UTC)&lt;br /&gt;
*:It didn&#039;t seem to change anything. I changed it to:&lt;br /&gt;
*:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:url={{fullurl:Data:Mandarin_Chinese/Videos|action=raw}}|format=csv with header|data=language=Language, title=Title, videoId=Video ID, service=Service, level=Level, channel=Channel, index=Index|delimiter=,}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 03:00, 23 January 2023 (UTC)&lt;br /&gt;
*** At least, the videos are displayed now. If the current problem is the trimmed titles in the &amp;quot;Title&amp;quot; column, this is not related directly to the extension. The beginning of the title is treated as attributes to the &amp;lt;code&amp;gt;&amp;amp;lt;td&amp;amp;gt;&amp;lt;/code&amp;gt; tag by &#039;&#039;MediaWiki&#039;&#039; parser. Wrap &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;nowiki&amp;lt;/code&amp;gt;, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:nowiki|{{{title}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, to see the first chunk of the title.&amp;lt;br /&amp;gt;&#039;&#039;&#039;UPD:&#039;&#039;&#039; Or, you can add a second &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:21, 23 January 2023 (UTC)&lt;br /&gt;
***:That worked, thanks! I didn&#039;t notice any issues on my end with the videos not displaying before, but good to know! [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 09:36, 23 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameter parsing problems==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PHP || 8.2.1&lt;br /&gt;
|-&lt;br /&gt;
| MediaWiki || 1.38.4&lt;br /&gt;
|-&lt;br /&gt;
| PostgreSQL || 14.6&lt;br /&gt;
|-&lt;br /&gt;
| External Data || 3.2 (5d30e60) 08:38, 2. Nov. 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hi. I use External Data to retrieve data from a PostgreSQL database. In most cases I use prepared statements and I noticed that the passing of parameters seem not to work correctly. Here a self contained test to visualize what I mean.&lt;br /&gt;
&lt;br /&gt;
In the database I have a table with a single column of type text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT * FROM public.test;&lt;br /&gt;
            txt&lt;br /&gt;
----------------------------&lt;br /&gt;
 a simple text&lt;br /&gt;
 another simple text&lt;br /&gt;
 a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the lines contain spaces and in one case a comma.&lt;br /&gt;
&lt;br /&gt;
Then I have a search function that receives a parameter of type text and returns a set of text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SETOF TEXT public.mw_test(p_search TEXT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the configuration LocalSettings.php for this looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgExternalDataSources[&#039;wikidoc&#039;] = [&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;type&#039; =&amp;gt; &#039;postgres&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;prepared&#039;  =&amp;gt; [&lt;br /&gt;
       &#039;test&#039; =&amp;gt; &#039;SELECT mw_test&lt;br /&gt;
                  FROM public.mw_test($1);&#039;&lt;br /&gt;
    ]&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the wikipage the snippet is as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply displays what it finds on a line.&lt;br /&gt;
&lt;br /&gt;
What happens is the the list of parameters cannot contain a comma. The snippet as is above works fine and returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But something like this not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with, a&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error is &amp;quot;Fehler: Es wurden keine Rückgabewerte festgelegt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is clear that a comma is used to separate parameters and that is the reason why this does not work. My question is how can I pass the whole string &amp;quot;with, a&amp;quot; as a single parameter.&lt;br /&gt;
&lt;br /&gt;
I tried enclosing it in single and double quotes, but this did not help. It leads to this exception:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[6882cc0e426ebdb6cf6911bc] /w/index.php?title=IT/IT_Infrastructure/KOFDB_Uebersicht&amp;amp;action=submit TypeError: EDParserFunctions::formatErrorMessages(): Argument #1 ($errors) must be of type array, null given, called in /home/wiki/application/w/extensions/ExternalData/includes/EDParserFunctions.php on line 98&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any idea what I could do to solve this? Help is very appreciated. Thanks&lt;br /&gt;
&lt;br /&gt;
It looks like I found a way to solve this. I can enclose the whole string in round parenthesis and it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = (with, a)&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* An intresting workaround; however, upgrade to be able to use double quotes.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:10, 11 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== composer.json ==&lt;br /&gt;
&lt;br /&gt;
When trying to install dependencies via composer, the current requirement says &amp;lt;code&amp;gt;&amp;quot;composer/installers&amp;quot;: &amp;quot;~2.1&amp;quot;&amp;lt;/code&amp;gt; on REL1_39 branch. The latest version is currently 2.5.4 which doesn&#039;t meet this requirement. Could this be updated to a more permissive requirement? [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 18:29, 24 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is being addressed in [[phab:T330485]]. [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 19:39, 13 March 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Not pulling the correct result from the json ==&lt;br /&gt;
&lt;br /&gt;
I have a json file that validates and have used the following code in the page: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#get_web_data:url=https://blah.json&amp;lt;br&amp;gt;&lt;br /&gt;
| data = id=id,type=type,description=description&amp;lt;br&amp;gt;&lt;br /&gt;
| use jsonpath $[&#039;Generic&#039;][&#039;Defensive&#039;][&#039;Wanted&#039;]:&amp;lt;br&amp;gt;&lt;br /&gt;
| format=json&amp;lt;br&amp;gt;&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have tried all sorts of iterations code to get External data to bring back the result for [&#039;Wanted&#039;] but it will only bring back the first entry in the json file, not the [&#039;Wanted&#039;] entry. The patch checks out and I have checked it on a validator so I am not sure what I am doing wrong. &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 23:22, 25 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The correct syntax seems to be:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=$.Generic.Defensive.Wanted.id,type=$.Generic.Defensive.Wanted.type,description=$.Generic.Defensive.Wanted.description&lt;br /&gt;
:   | use jsonpath&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }}&lt;br /&gt;
:A simpler variant may also work, depending on the JSON contents:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=id,type=type,description=description&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }} [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 12:47, 26 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
:Thanks for those. The first example returns the error &lt;br /&gt;
:ID: Error: no local variable &amp;quot;id&amp;quot; has been set.&lt;br /&gt;
:Type: Error: no local variable &amp;quot;type&amp;quot; has been set.&lt;br /&gt;
:Description(s): Error: no local variable &amp;quot;description&amp;quot; has been set.&lt;br /&gt;
:I was calling the results with &lt;br /&gt;
:* ID: {{#external_value:id}}&lt;br /&gt;
:* Type: {{#external_value:type}}&lt;br /&gt;
:* Description(s): {{#external_value:description}}&lt;br /&gt;
:The second example I had already tried and it has the same problem. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 16:52, 26 April 2023 (UTC)&lt;br /&gt;
::Then an example of the JSON would be helpful. [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 08:13, 28 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Read BSON array from MongoDB ==&lt;br /&gt;
&lt;br /&gt;
submit TypeError EDConnectorMongodb::getValueFromJSONArray(): Argument #1 ($origArray) must be of type array, MongoDB\Model\BSONDocument given &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When I put data to {{get_external_data: source=Mongo|from collection|find query ={&amp;quot;email.domain&amp;quot;:&amp;quot;some_domain&amp;quot;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|data=email=email.domain}} recieve error above&amp;lt;/nowiki&amp;gt; [[Special:Contributions/93.153.250.62|93.153.250.62]] 09:47, 18 July 2023 (UTC)&lt;br /&gt;
* You can now upgrade and check if the error is still there.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 15:27, 18 July 2023 (UTC)&lt;br /&gt;
*:yes, the same error [[Special:Contributions/93.153.250.62|93.153.250.62]] 07:13, 19 July 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6031240</id>
		<title>Extension talk:External Data</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=Extension_talk:External_Data&amp;diff=6031240"/>
		<updated>2023-07-18T09:47:42Z</updated>

		<summary type="html">&lt;p&gt;93.153.250.62: /* Read BSON array from MongoDB */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{External Data navigation}}&lt;br /&gt;
{{Archive box|&lt;br /&gt;
* [[Extension talk:External Data/Archive 2009|2009]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2010|2010]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2011|2011]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2012|2012]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2013|2013]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2014|2014]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2015|2015]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2016|2016]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2017 to 2018|2017 to 2018]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2019 to 2020|2019 to 2020]]&lt;br /&gt;
* [[Extension talk:External Data/Archive 2021 to 2022|2021 to 2022]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== accessing the internal variable (__json) ==&lt;br /&gt;
&lt;br /&gt;
I need some help. Background: I&#039;m working on an extension that uses a webcall to retrieve a JSON object and converts it into concise html code. This extension now is working properly, but lacks caching. This JSON object is complex: containing multiple nested arrays with varying number of elements and it took me a while to program it in php.&lt;br /&gt;
&lt;br /&gt;
My current line of thought is to transfer the entire json object (that is stored in the internal variable __json) to my extension.&lt;br /&gt;
&lt;br /&gt;
Question 1) how does one access the internal variables??  The code below doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
Question 2) do you have any comments / suggestions on my approach?&amp;lt;!-- retreiving the data --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#get_web_data:url=https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;|format=json}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* first bullit: {{#external_value:__json}}&lt;br /&gt;
* second bullit:{{#external_value:meta}}&amp;lt;!-- this value (200) is being output correctly --&amp;gt;&amp;lt;!-- passing it to my extension --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#myextension:{{#external_value:__json}}|param1|param2}} [[User:Harro Kremer|Harro Kremer]] ([[User talk:Harro Kremer|talk]]) 21:20, 3 January 2023 (UTC)&lt;br /&gt;
* Since &amp;lt;code&amp;gt;__json&amp;lt;/code&amp;gt; is not a string but a Lua table, it is only accessible from Lua ([[Extension:Scribunto|Scribunto]] is needed) and not from wikitext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local parsed, errors = mw.ext.externalData.getExternalData{ url = &#039;https://jisho.org/api/v1/search/words?keyword=&amp;quot;先生&amp;quot;&#039; }&lt;br /&gt;
if parsed then&lt;br /&gt;
    local json = parsed.__json&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:46, 9 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using External Data in a Template ==&lt;br /&gt;
I want to fill a custom Infobox Template with data from ExternalData. The data will reside in a CSV file matching the non-namespace part of the page importing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mynamespace:mypage content: &amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
template:myinfobox content: &amp;lt;nowiki&amp;gt;{{infobox | header1 = header | data1 = {{#external_value:value_name|source=data|format=csv with header|delimiter=;|file name={{PAGENAME}}.csv}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
However, this tries to fetch data from a CSV file named &amp;quot;myinfobox&amp;quot; instead&lt;br /&gt;
What is a better way to achieve this?&lt;br /&gt;
&lt;br /&gt;
:Is the template called &amp;quot;infobox myinfobox&amp;quot;, or just &amp;quot;myinfobox&amp;quot;? And do you see the problem on the &amp;quot;mypage&amp;quot; page, or right on the template page? [[User:Yaron Koren|Yaron Koren]] ([[User talk:Yaron Koren|talk]]) 00:34, 10 January 2023 (UTC)&lt;br /&gt;
::my template page is called &amp;quot;Vorlage:Infobox_VM&amp;quot;. The problem occurs on &amp;quot;mypage&amp;quot; as the template page doesn’t really have any visible content nor has it the CSV providing information. &amp;quot;mypage&amp;quot; tries to read from a csv called Vorlage:Infobox_VM.csv instead if mypage.csv.&lt;br /&gt;
* This looks like a strange way to invoke a template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{template:infobox myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Why not just &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{myinfobox}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;? And, as said above, fetching data from &amp;lt;code&amp;gt;myinfobox.csv&amp;lt;/code&amp;gt; is what to be expected on the template page itself, unless the code is wrapped with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:11, 10 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::yes you’re right, i tried being verbose for clarity. in my page i have only &amp;lt;nowiki&amp;gt; {{Infobox VM}}&amp;lt;/nowiki&amp;gt; and that seems to work well enough. I&#039;m not really concerned what csv is being read on the template page itself, as that page isn’t really supposed to be looked at. &amp;lt;br&amp;gt; I want &amp;quot;mypage&amp;quot; to look at mypage.csv through the template. that’s what doesn’t work.&lt;br /&gt;
* What are the settings for the data source &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; inline&amp;gt;$wgExternalDataSources[&#039;data&#039;]&amp;lt;/syntaxhighlight&amp;gt;)?&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$wgExternalDataSources[&#039;data&#039;][&#039;path&#039;] = &#039;/opt/infradb-data/vm/&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: that path and all the files in it are world readable. that stuff works in principle. i am able to pull info from csv. just not via the page name in the template.&lt;br /&gt;
* Could not reproduce the issue at my &#039;&#039;MediaWiki&#039;&#039; installation. Looks like there you have some sophisticated wiki code that substituted &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; too early on.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:59, 14 January 2023 (UTC)&lt;br /&gt;
*:I solved the problem this way:   on &amp;quot;mypage&amp;quot; i call &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;amp;lt;nowiki&amp;amp;gt;{{Infobox Host | filename={{PAGENAME}} }} &amp;amp;lt;/nowiki&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and on the template page i use that variable to find the right file. [[Special:Contributions/24.134.95.253|24.134.95.253]] 15:51, 17 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Slightly different csv data files, only one works ==&lt;br /&gt;
&lt;br /&gt;
I have 2 48 line csv files, &amp;lt; 10k in size with a minor difference, but only one can be read in ExternalData in 1.39&lt;br /&gt;
&lt;br /&gt;
Simplified case https://johnbray.org.uk/expounder/Extdataproblem1 uses &lt;br /&gt;
&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/datagood and then&lt;br /&gt;
 get_web_data: url=https://files.johnbray.org.uk/Documents/Expounder/Q/532/9928/databad &lt;br /&gt;
&lt;br /&gt;
checking that {{#external_value:ddescription}} has something from a line of the csv file. datagood works, but databad does not. The difference between the files is a few characters on one line, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}, {{link|Q62625219|Maureen Kincaid Speller}}&lt;br /&gt;
,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;gt; &amp;quot;item&amp;quot;,+1996-04-05T00:00:00Z,+1996-04-08T00:00:00Z,&amp;quot;{{link|Q111529509|Evolution}}&amp;quot;,&amp;quot;in Heathrow wit&lt;br /&gt;
h {{link|Q312405|Vernor Vinge}}, {{link|Q472872|Jack Cohen}}, {{link|Q2927188|Bryan Talbot}}, {{link|&lt;br /&gt;
Q7151782|Paul Kincaid}}, {{link|Q742918|Colin Greenland}}AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB&lt;br /&gt;
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA,&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,51.4673,-0.4529&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both files are &amp;lt; 10k in size, 48 lines, and the good file is actually longer than the bad&lt;br /&gt;
&lt;br /&gt;
wc datagood databad    &lt;br /&gt;
  48   338  9245 datagood &lt;br /&gt;
  48   341  9180 databad [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 14:05, 13 January 2023 (UTC)&lt;br /&gt;
* Neither of the CSV files is formed perfectly from PHP&#039;s point of view. The problems start at the line 7 (one-based). For &amp;lt;code&amp;gt;databad&amp;lt;/code&amp;gt; this causes the automatically recognised delimiter to be &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;. You can overcome this by adding &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 10:45, 14 January 2023 (UTC)&lt;br /&gt;
*:Thanks for the quick response. That cured the problem, both for my trivial and full cases. [[User:Vicarage|Vicarage]] ([[User talk:Vicarage|talk]]) 11:00, 16 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What is the best practice to fetch many values (&amp;gt;300) from the same place? ==&lt;br /&gt;
&lt;br /&gt;
Is it better to use the legacy method, like #get_web_data, and fetch all the values at once, then display using #external_value; or is it better to use the new method, #external_value with source parameter, 300 times? What performance consideration might there be?&lt;br /&gt;
&lt;br /&gt;
[[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:51, 17 January 2023 (UTC)&lt;br /&gt;
* If you use caching, the difference is not that big. Using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will save cache lookups, but the legacy mode will stop working once MediaWiki is upgraded to use Parsoid, since it does not guarantee parsing order. The optimal solution is to handle data fetching and display with one Lua function, where you can save the fetched data into a variable and later display it.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 03:22, 18 January 2023 (UTC)&lt;br /&gt;
*:Thanks, we&#039;ll look into Lua. We do have caching setup so the standalone method might be fine, now that you&#039;ve helped us iron out the kinks. Thanks again for the help! [[User:JeremiPlazas|Jeremi Plazas]] ([[User talk:JeremiPlazas|talk]]) 17:54, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some JSONPATH doesn’t retrieve results ==&lt;br /&gt;
I have a JSON file with Information about network interfaces in it.&lt;br /&gt;
I am retrieving this information with get_file_data and two jsonpath instructions. However, only one of them seems to be executed/filled with data.&lt;br /&gt;
&lt;br /&gt;
This is my json:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[{&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;prefix&amp;quot;: 24, &amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.1&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::aaaa:aaaa:aaaa:aaaa&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ab:ab:ab:ab:ab:ab&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth0&amp;quot;}, {&amp;quot;ip-addresses&amp;quot;: [{&amp;quot;ip-address&amp;quot;: &amp;quot;1.1.1.2&amp;quot;, &amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv4&amp;quot;, &amp;quot;prefix&amp;quot;: 24}, {&amp;quot;ip-address-type&amp;quot;: &amp;quot;ipv6&amp;quot;, &amp;quot;ip-address&amp;quot;: &amp;quot;fe80::ccff:ceff:feff:ceff&amp;quot;, &amp;quot;prefix&amp;quot;: 64}], &amp;quot;hardware-address&amp;quot;: &amp;quot;ce:ff:ce:ff:ce:ff&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;eth1&amp;quot;}]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
and this is the template code i use to retrieve the data:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_external_data: source=host_data&lt;br /&gt;
   |file name={{{{{ucfirst:{{{hostname}}}}}|dummy}}}_net.json&lt;br /&gt;
   |data=mymacaddress=$[?(@.name == &#039;{{{interfacename}}}&#039;)].hardware-address,&lt;br /&gt;
     adressen=$[?(@.name == &#039;{{{interfacename}}}&#039;)][ip-addresses][*].ip-address&lt;br /&gt;
     &lt;br /&gt;
   |use jsonpath&lt;br /&gt;
   |format=json&lt;br /&gt;
   }}&lt;br /&gt;
{{{hostname}}}&lt;br /&gt;
{{{interfacename}}} ({{#external_value:mymacaddress|invalid}})&lt;br /&gt;
{{#display_external_table: template=bulleted list|data=1=adressen}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
i call this template in the following fashion: &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#display_external_table: template=Interface&lt;br /&gt;
  |data=interfacename={{{netnames}}},hostname={{{filename}}}&lt;br /&gt;
  }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where netnames is just an array, usually only one entry like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;quot;ens18&amp;quot;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and filename points to the correct file&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{netnames}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an array, I don&#039;t know how transcluding it within single quotes in a JsonPath query could work. Neither &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;ens18&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt;, nor &amp;lt;code&amp;gt;$[?(@.name == &#039;[&amp;quot;eth1&amp;quot;]&#039;)].hardware-address&amp;lt;/code&amp;gt; is a working JsonPath. &amp;lt;code&amp;gt;mymacaddress=$[?(@.name == &#039;eth1&#039;)].hardware-address&amp;lt;/code&amp;gt; would be. I would suggest replacing &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, but this does not seem to be implemented.&amp;lt;br /&amp;gt;You could try a regular expression: &amp;lt;code&amp;gt;$[?(@.name =~ &#039;eth0|eth1&#039;)].ip-addresses.[*].ip-address&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;Also, you can get the bulleted list without a template:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{#for_external_table:|&lt;br /&gt;
 * {{{adressen}}}}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:23, 19 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Strange bug parsing CSV with pipe character ==&lt;br /&gt;
&lt;br /&gt;
I have a field called &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; which is called in &amp;lt;code&amp;gt;#for_external_table&amp;lt;/code&amp;gt;. All of the values have at least one pipe character, and the page cuts off everything before and including the first pipe character. But the strange thing is that it only happens if {{{title}}} is located in a specific place. &lt;br /&gt;
&lt;br /&gt;
The page can be seen at https://comprehensibleinputwiki.org/wiki/Mandarin_Chinese/Videos and the external data is at https://comprehensibleinputwiki.org/wiki/Data:Mandarin_Chinese/Videos. If you look at the wiki source of the first link, I have {{{title}}} twice, one of them in a hidden div. If you view the source of the page, the first one is missing part of the value, while the hidden one is complete. [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 20:08, 22 January 2023 (UTC)&lt;br /&gt;
* Add &amp;lt;code&amp;gt;delimiter=,&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;{{#get_web_data:}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 02:01, 23 January 2023 (UTC)&lt;br /&gt;
*:It didn&#039;t seem to change anything. I changed it to:&lt;br /&gt;
*:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#get_web_data:url={{fullurl:Data:Mandarin_Chinese/Videos|action=raw}}|format=csv with header|data=language=Language, title=Title, videoId=Video ID, service=Service, level=Level, channel=Channel, index=Index|delimiter=,}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 03:00, 23 January 2023 (UTC)&lt;br /&gt;
*** At least, the videos are displayed now. If the current problem is the trimmed titles in the &amp;quot;Title&amp;quot; column, this is not related directly to the extension. The beginning of the title is treated as attributes to the &amp;lt;code&amp;gt;&amp;amp;lt;td&amp;amp;gt;&amp;lt;/code&amp;gt; tag by &#039;&#039;MediaWiki&#039;&#039; parser. Wrap &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;nowiki&amp;lt;/code&amp;gt;, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:nowiki|{{{title}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, to see the first chunk of the title.&amp;lt;br /&amp;gt;&#039;&#039;&#039;UPD:&#039;&#039;&#039; Or, you can add a second &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;{{{title}}}&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 07:21, 23 January 2023 (UTC)&lt;br /&gt;
***:That worked, thanks! I didn&#039;t notice any issues on my end with the videos not displaying before, but good to know! [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 09:36, 23 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameter parsing problems==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PHP || 8.2.1&lt;br /&gt;
|-&lt;br /&gt;
| MediaWiki || 1.38.4&lt;br /&gt;
|-&lt;br /&gt;
| PostgreSQL || 14.6&lt;br /&gt;
|-&lt;br /&gt;
| External Data || 3.2 (5d30e60) 08:38, 2. Nov. 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hi. I use External Data to retrieve data from a PostgreSQL database. In most cases I use prepared statements and I noticed that the passing of parameters seem not to work correctly. Here a self contained test to visualize what I mean.&lt;br /&gt;
&lt;br /&gt;
In the database I have a table with a single column of type text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT * FROM public.test;&lt;br /&gt;
            txt&lt;br /&gt;
----------------------------&lt;br /&gt;
 a simple text&lt;br /&gt;
 another simple text&lt;br /&gt;
 a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the lines contain spaces and in one case a comma.&lt;br /&gt;
&lt;br /&gt;
Then I have a search function that receives a parameter of type text and returns a set of text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SETOF TEXT public.mw_test(p_search TEXT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the configuration LocalSettings.php for this looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgExternalDataSources[&#039;wikidoc&#039;] = [&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;type&#039; =&amp;gt; &#039;postgres&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxx&#039;,&lt;br /&gt;
    &#039;prepared&#039;  =&amp;gt; [&lt;br /&gt;
       &#039;test&#039; =&amp;gt; &#039;SELECT mw_test&lt;br /&gt;
                  FROM public.mw_test($1);&#039;&lt;br /&gt;
    ]&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the wikipage the snippet is as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply displays what it finds on a line.&lt;br /&gt;
&lt;br /&gt;
What happens is the the list of parameters cannot contain a comma. The snippet as is above works fine and returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a text with, a comma in it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But something like this not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = with, a&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error is &amp;quot;Fehler: Es wurden keine Rückgabewerte festgelegt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is clear that a comma is used to separate parameters and that is the reason why this does not work. My question is how can I pass the whole string &amp;quot;with, a&amp;quot; as a single parameter.&lt;br /&gt;
&lt;br /&gt;
I tried enclosing it in single and double quotes, but this did not help. It leads to this exception:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[6882cc0e426ebdb6cf6911bc] /w/index.php?title=IT/IT_Infrastructure/KOFDB_Uebersicht&amp;amp;action=submit TypeError: EDParserFunctions::formatErrorMessages(): Argument #1 ($errors) must be of type array, null given, called in /home/wiki/application/w/extensions/ExternalData/includes/EDParserFunctions.php on line 98&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any idea what I could do to solve this? Help is very appreciated. Thanks&lt;br /&gt;
&lt;br /&gt;
It looks like I found a way to solve this. I can enclose the whole string in round parenthesis and it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#get_db_data:&lt;br /&gt;
  db         = wikidoc&lt;br /&gt;
| query      = test&lt;br /&gt;
| parameters = (with, a)&lt;br /&gt;
| data       = documentation=mw_test&lt;br /&gt;
}} &lt;br /&gt;
{{#for_external_table:&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{{documentation}}}&lt;br /&gt;
}}&lt;br /&gt;
{{#clear_external_data:}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* An intresting workaround; however, upgrade to be able to use double quotes.&amp;lt;br /&amp;gt;[[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 06:10, 11 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== composer.json ==&lt;br /&gt;
&lt;br /&gt;
When trying to install dependencies via composer, the current requirement says &amp;lt;code&amp;gt;&amp;quot;composer/installers&amp;quot;: &amp;quot;~2.1&amp;quot;&amp;lt;/code&amp;gt; on REL1_39 branch. The latest version is currently 2.5.4 which doesn&#039;t meet this requirement. Could this be updated to a more permissive requirement? [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 18:29, 24 February 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is being addressed in [[phab:T330485]]. [[User:Prod|Prod]] ([[User talk:Prod|talk]]) 19:39, 13 March 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Not pulling the correct result from the json ==&lt;br /&gt;
&lt;br /&gt;
I have a json file that validates and have used the following code in the page: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#get_web_data:url=https://blah.json&amp;lt;br&amp;gt;&lt;br /&gt;
| data = id=id,type=type,description=description&amp;lt;br&amp;gt;&lt;br /&gt;
| use jsonpath $[&#039;Generic&#039;][&#039;Defensive&#039;][&#039;Wanted&#039;]:&amp;lt;br&amp;gt;&lt;br /&gt;
| format=json&amp;lt;br&amp;gt;&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have tried all sorts of iterations code to get External data to bring back the result for [&#039;Wanted&#039;] but it will only bring back the first entry in the json file, not the [&#039;Wanted&#039;] entry. The patch checks out and I have checked it on a validator so I am not sure what I am doing wrong. &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 23:22, 25 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The correct syntax seems to be:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=$.Generic.Defensive.Wanted.id,type=$.Generic.Defensive.Wanted.type,description=$.Generic.Defensive.Wanted.description&lt;br /&gt;
:   | use jsonpath&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }}&lt;br /&gt;
:A simpler variant may also work, depending on the JSON contents:&lt;br /&gt;
: {{#get_web_data:&lt;br /&gt;
:     url=https://blah.json&lt;br /&gt;
:   | data = id=id,type=type,description=description&lt;br /&gt;
:   | format=json&lt;br /&gt;
: }} [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 12:47, 26 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
:Thanks for those. The first example returns the error &lt;br /&gt;
:ID: Error: no local variable &amp;quot;id&amp;quot; has been set.&lt;br /&gt;
:Type: Error: no local variable &amp;quot;type&amp;quot; has been set.&lt;br /&gt;
:Description(s): Error: no local variable &amp;quot;description&amp;quot; has been set.&lt;br /&gt;
:I was calling the results with &lt;br /&gt;
:* ID: {{#external_value:id}}&lt;br /&gt;
:* Type: {{#external_value:type}}&lt;br /&gt;
:* Description(s): {{#external_value:description}}&lt;br /&gt;
:The second example I had already tried and it has the same problem. [[User:SyrinxCat|SyrinxCat]] ([[User talk:SyrinxCat|talk]]) 16:52, 26 April 2023 (UTC)&lt;br /&gt;
::Then an example of the JSON would be helpful. [[User:Alex Mashin|Alexander Mashin]]&amp;lt;sup&amp;gt;&amp;amp;nbsp;&#039;&#039;[[:User talk:Alex Mashin|talk]]&#039;&#039;&amp;lt;/sup&amp;gt; 08:13, 28 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Read BSON array from MongoDB ==&lt;br /&gt;
&lt;br /&gt;
submit TypeError EDConnectorMongodb::getValueFromJSONArray(): Argument #1 ($origArray) must be of type array, MongoDB\Model\BSONDocument given &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When I put data to {{get_external_data: source=Mongo|from collection|find query ={&amp;quot;email.domain&amp;quot;:&amp;quot;some_domain&amp;quot;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|data=email=email.domain}} recieve error above&amp;lt;/nowiki&amp;gt; [[Special:Contributions/93.153.250.62|93.153.250.62]] 09:47, 18 July 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>93.153.250.62</name></author>
	</entry>
</feed>