Thread:Project:Support desk/Templates behaving strangely.

While setting up local wikipedia, by using latest wikipedia dumps, the templates were showing with redlink - saying page did not exist. So using Special:Export page in wikipedia, exported a template and imported it by Special:import page in local wiki.

So what happened is, now the template was not transcluded, but on clicking that template link, the page opened containing template source. After some time, the template was transcluded, and it worked as it should.

I tried some more templates, but sometimes it did work after some time, and in some cases it did not ever. Why this strange behavior ?

Also in the mediaWiki local database-tables.sql, the table templatelinks(which was initially empty) got filled when I created new templates. But also if the templatelinks is empty and I open a page in which I created a template, the table fills up automatically, what is the working and role of templatelinks table ?

To fill up all the templates in wikipedia for latest dumps, I found a file templatelinks.sql in latest dumps folder. So this filled up the templatelinks table, and it seems that this contains all the templates, so no need to import templates from wikipedia, but then also the templates did not transclude, after the templatelinks table got filled.