In T422299#11845305, @Jdforrester-WMF wrote:In T422299#11841341, @Redmin wrote:@Jdforrester-WMF, to be clear, embedded function calls are apparently currently broken for function calls that did not get their outputs cached after last week’s fix. See this page for example.
When I visited, that page's report says Cached time: 20260421151647, i.e. just now — it's not related to this task.
And the categories being added say that function evaluation failed (, seemingly even with Parsoid(?), see this).
(I think this what @Amire80 was talking about.)If you see the output of embedded Wikifunctions calls at all, that means you're in Parsoid mode; however, they don't properly populate the categories, so https://bn.wiktionary.org/w/index.php?title=%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%B6%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%A3%E0%A7%80:%E0%A6%AE%E0%A7%82%E0%A6%B2%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A6%AF%E0%A6%BC%E0%A6%A8_%E0%A6%AC%E0%A7%8D%E0%A6%AF%E0%A6%B0%E0%A7%8D%E0%A6%A5_%E0%A6%B9%E0%A6%93%E0%A6%AF%E0%A6%BC%E0%A6%BE%E0%A6%AF%E0%A6%BC_%E0%A6%AF%E0%A7%87%E0%A6%B8%E0%A6%AC_%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE%E0%A6%AF%E0%A6%BC_%E0%A6%89%E0%A6%87%E0%A6%95%E0%A6%BF%E0%A6%AB%E0%A6%BE%E0%A6%82%E0%A6%B6%E0%A6%A8%E0%A7%8D%E0%A6%B8_%E0%A6%95%E0%A6%B2_%E0%A6%A4%E0%A7%8D%E0%A6%B0%E0%A7%81%E0%A6%9F%E0%A6%BF%E0%A6%AA%E0%A7%82%E0%A6%B0%E0%A7%8D%E0%A6%A3_%E0%A6%B9%E0%A6%AF%E0%A6%BC%E0%A7%87%E0%A6%9B%E0%A7%87 is empty, which is the Parsoid bug I mentioned.
In T422299#11842198, @Amire80 wrote:I don't know about caches or user errors, and maybe I'm misunderstanding how it's supposed to work, but something definitely seems off:
https://hr.wiktionary.org/wiki/Walnuss in the Croatian Wikipedia works correctly, and the wikitext for the call is {{#function:Z29055|L400183|}}.
https://hr.wiktionary.org/wiki/Akkordeon in the Croatian Wikipedia gives "Pogreška sadržaja" ("Content error"), even though the wikitext for the call is almost the same: {{#function:Z29055|L891497|}}. Same function, different lexeme, no second argument.
Yeah, that's definitely not what should be happening. Let's file a task about it.
https://he.wiktionary.org/wiki/User:Amire80/sulamit in the Hebrew Wiktionary gives "שגיאת תוכן" ("Content error") with both calls, even though the code is the same. (As far as I know, the Hebrew Wiktionary is connected to Wikifunctions identically to the Croatian Wiktionary, but I might be wrong.)
The calls are different; there's an implicit parselang=he vs. hr and renderlang=he vs. hr. Adding support for explicitly stating parselang/renderlang in the wikitext is coming from Parsoid, at some point.
Description
Related Objects
Event Timeline
https://he.wiktionary.org/wiki/User:Amire80/sulamit in the Hebrew Wiktionary gives "שגיאת תוכן" ("Content error") with both calls, even though the code is the same. (As far as I know, the Hebrew Wiktionary is connected to Wikifunctions identically to the Croatian Wiktionary, but I might be wrong.)
The calls are different; there's an implicit parselang=he vs. hr and renderlang=he vs. hr. Adding support for explicitly stating parselang/renderlang in the wikitext is coming from Parsoid, at some point.
The wikitext, for what it's worth, is the same: {{#function:Z29055|L400183|}}
Perhaps I should also mention that this has been broken in one way or another for quite a while. In January, I brought it up on Telegram and @DMartin-WMF said that it's tracked in T405461. Maybe it's the same issue, maybe not.
Unsure how helpful this is but at least on bnwiktionary, functions that output strings are working fine, and the functions that output HTML fragments are broken.
On a somewhat related note, is embedded function cache not supposed to be purged like other parser output cache? @Jdforrester-WMF referred to the ‘cached time’ in the example page’s report but it doesn’t seem like that would necessarily indicate when an embedded function call’s output was regenerated since using ?action=purge has no visible effect as far as users can see (I do not see any ‘this function is being activated’-esque message). Apologies if I am missing something obvious.
Hmm. That sounds like an interesting issue. Can you link to an example of each?
On a somewhat related note, is embedded function cache not supposed to be purged like other parser output cache? @Jdforrester-WMF referred to the ‘cached time’ in the example page’s report but it doesn’t seem like that would necessarily indicate when an embedded function call’s output was regenerated since using ?action=purge has no visible effect as far as users can see (I do not see any ‘this function is being activated’-esque message). Apologies if I am missing something obvious.
Yes, there are multiple levels of caching around MediaWiki, and embedded Wikifunctions calls have their own cache on top of the page cache. The ones involved here:
- ParserCache, the rendered-HTML-from-the-article-wikitext content (~30d or when edited)
- embedded Wikifunctions (1 month if no error, 1 week if user error, 1 minute if server error; voided when Function edited)
- any Wikifunctions call (same as above, but currently a different cache)
- use of Wikidata item in the back-end server (1 day)
A page where an embedded function that outputs a string is working: https://bn.wiktionary.org/wiki/christianisme (the "৩" beside "অক্ষর সংখ্যা:" is coming from Z30837, which outputs a natural number)
A page where an embedded function that outputs a HTML fragment is showing a 'Content error': https://bn.wiktionary.org/wiki/একেশ্বরবাদ (there should have been a declension table thanks to Z33243 on that page)
Both are added using this: https://bn.wiktionary.org/wiki/মডিউল:আভিধানিক_উপাত্ত#L-366
Yes, there are multiple levels of caching around MediaWiki, and embedded Wikifunctions calls have their own cache on top of the page cache. The ones involved here:
...
Thanks for explaining.