Page MenuHomePhabricator

Transclusion in Lua modules might not always show up
Closed, ResolvedPublic

Description

Found this problem while looking through all the possible sourcecode variations on Module:Yesno across all the wikis.

In hiwiktionary exist 2 modules, called yesno and Yesno, where the first one simply calls another one. The problem is that this call does not appear in Templatelinks table, where all the transclusions should be. Testing the script on the wiki shows that it seems to be working nevertheless.

Some code examples, which show this problem, can be found in PAWS notebook.

Event Timeline

Hi, where exactly to see a Templatelinks table (URL)? Please follow https://www.mediawiki.org/wiki/How_to_report_a_bug whenever possible - thanks a lot!

Hi, where exactly to see a Templatelinks table (URL)? Please follow https://www.mediawiki.org/wiki/How_to_report_a_bug whenever possible - thanks a lot!

I'm talking about this table for hiwiktionary. They can be accessed either by API or through database dumps - but I don't think there's a URL for accessing database tables?

Sorry if the description is not clear enough.

Aklapper removed a subscriber: dr0ptp4kt.

Ah, thanks! I was thinking in HTML table terms and not database table terms - sorry! :)

@LostEnchanter I think I understand. I believe what you may be witnessing here is that no page uses Module:yesno (lowercase 'y') indirectly (e.g., a page using a template #invokeing some module which in turn requires yesno) on hiwiktionary, and therefore no MediaWiki parser hooks (and manually executed or scheduled link refresh jobs) run in a context where a determination is made to insert an entry into templatelinks.

Interesting! Does that mean the templatelinks table is updated only when a module is actually being 'used'?

@LostEnchanter I think I understand. I believe what you may be witnessing here is that no page uses Module:yesno (lowercase 'y') indirectly (e.g., a page using a template #invokeing some module which in turn requires yesno) on hiwiktionary, and therefore no MediaWiki parser hooks (and manually executed or scheduled link refresh jobs) run in a context where a determination is made to insert an entry into templatelinks.

I've looked into this page usage - and this seems to be true, Module:yesno doesn't seem to be used anywhere on the wiki.

Thanks for the insight!