Andre Engels | 1 Dec 22:15 2007
Picon

another ifexists problem

I'm 'doing' disambiguation pages on the Dutch Wikipedia at the moment,
but I found that there are disambiguation pages that are shown as
linked when they are not. After some checking, I found that it is
caused by templates like the Dutch [[Sjabloon:Districtlink]]

{{#ifexist: {{{1}}} (district) | [[{{{1}}} (district)|{{{1}}}]] |
{{#ifexist: {{{1}}} | [[{{{1}}}]] | {{{1}}} }} }}

Apparently, when the template is put on the page, [[X (district)]]
does not exist, but [[X]] does exist. Later [[X]] is changed into a
disambiguation page and [[X (district)]] is created. However, the
links table is not updated in this case. Is there a way to force an
update of the links of a set of pages to be forced (or at least put in
the job queue)? In the past this could be done with a touch
(zero-edit) on the page, but that doesn't seem to work any more.

--

-- 
Andre Engels, andreengels@...
ICQ: 6260644  --  Skype: a_engels
Platonides | 1 Dec 22:33 2007
Picon

Re: another ifexists problem

Andre Engels wrote:
> I'm 'doing' disambiguation pages on the Dutch Wikipedia at the moment,
> but I found that there are disambiguation pages that are shown as
> linked when they are not. After some checking, I found that it is
> caused by templates like the Dutch [[Sjabloon:Districtlink]]
> 
> {{#ifexist: {{{1}}} (district) | [[{{{1}}} (district)|{{{1}}}]] |
> {{#ifexist: {{{1}}} | [[{{{1}}}]] | {{{1}}} }} }}
> 
> Apparently, when the template is put on the page, [[X (district)]]
> does not exist, but [[X]] does exist. Later [[X]] is changed into a
> disambiguation page and [[X (district)]] is created. However, the
> links table is not updated in this case. Is there a way to force an
> update of the links of a set of pages to be forced (or at least put in
> the job queue)? In the past this could be done with a touch
> (zero-edit) on the page, but that doesn't seem to work any more.

Doesn't a purge on the page containing the template fix it?
Andre Engels | 1 Dec 23:01 2007
Picon

Re: another ifexists problem

2007/12/1, Platonides <Platonides@...>:

> Doesn't a purge on the page containing the template fix it?

Doesn't seem to work, no. At least, a purge on [[nl:Geesthacht]] is done through
http://nl.wikipedia.org/w/index.php?title=Geesthacht&action=purge
right?

--

-- 
Andre Engels, andreengels@...
ICQ: 6260644  --  Skype: a_engels
Thomas Dalton | 1 Dec 23:59 2007
Picon

Re: another ifexists problem

> Apparently, when the template is put on the page, [[X (district)]]
> does not exist, but [[X]] does exist. Later [[X]] is changed into a
> disambiguation page and [[X (district)]] is created. However, the
> links table is not updated in this case. Is there a way to force an
> update of the links of a set of pages to be forced (or at least put in
> the job queue)? In the past this could be done with a touch
> (zero-edit) on the page, but that doesn't seem to work any more.

Looks like it's working fine to me... in the example you gave, the
(district) page exists, and is linked to... Can you give an example of
a page that isn't working?
Andre Engels | 2 Dec 08:26 2007
Picon

Re: another ifexists problem

2007/12/1, Thomas Dalton <thomas.dalton@...>:
> > Apparently, when the template is put on the page, [[X (district)]]
> > does not exist, but [[X]] does exist. Later [[X]] is changed into a
> > disambiguation page and [[X (district)]] is created. However, the
> > links table is not updated in this case. Is there a way to force an
> > update of the links of a set of pages to be forced (or at least put in
> > the job queue)? In the past this could be done with a touch
> > (zero-edit) on the page, but that doesn't seem to work any more.
>
> Looks like it's working fine to me... in the example you gave, the
> (district) page exists, and is linked to... Can you give an example of
> a page that isn't working?

The problem is that the page is shown on the "What links here?" page
of the title without '(district)',  even though it's not linking there
any more.

--

-- 
Andre Engels, andreengels@...
ICQ: 6260644  --  Skype: a_engels
Tim Starling | 2 Dec 00:26 2007
Picon

Re: another ifexists problem

Andre Engels wrote:
> I'm 'doing' disambiguation pages on the Dutch Wikipedia at the moment,
> but I found that there are disambiguation pages that are shown as
> linked when they are not. After some checking, I found that it is
> caused by templates like the Dutch [[Sjabloon:Districtlink]]
> 
> {{#ifexist: {{{1}}} (district) | [[{{{1}}} (district)|{{{1}}}]] |
> {{#ifexist: {{{1}}} | [[{{{1}}}]] | {{{1}}} }} }}
> 
> Apparently, when the template is put on the page, [[X (district)]]
> does not exist, but [[X]] does exist. Later [[X]] is changed into a
> disambiguation page and [[X (district)]] is created. However, the
> links table is not updated in this case. Is there a way to force an
> update of the links of a set of pages to be forced (or at least put in
> the job queue)? In the past this could be done with a touch
> (zero-edit) on the page, but that doesn't seem to work any more.

I've been thinking about this problem, since it's going to get even worse 
with the new preprocessor. Currently, links in unfollowed branches aren't 
registered, but templates *are* registered in both branches. So if you have:

{{#ifexist: test | {{a}} | {{b}} }}

Initially [[test]] doesn't exist so {{a}} is displayed. Then [[test]] is 
created and the HTML cache for the page is invalidated via pagelinks. But 
the links tables are not updated, so although the page now contains the 
contents of {{b}}, it doesn't have a template link to it. So when 
[[Template:B]] is subsequently changed, the cache is not invalidated.

The solution is to add yet another tracking table.
(Continue reading)

Thomas Dalton | 2 Dec 00:33 2007
Picon

Re: another ifexists problem

> I've been thinking about this problem, since it's going to get even worse
> with the new preprocessor. Currently, links in unfollowed branches aren't
> registered, but templates *are* registered in both branches. So if you have:
>
> {{#ifexist: test | {{a}} | {{b}} }}
>
> Initially [[test]] doesn't exist so {{a}} is displayed. Then [[test]] is
> created and the HTML cache for the page is invalidated via pagelinks. But
> the links tables are not updated, so although the page now contains the
> contents of {{b}}, it doesn't have a template link to it. So when
> [[Template:B]] is subsequently changed, the cache is not invalidated.
>
> The solution is to add yet another tracking table.

Ah, I see the problem now. Is a whole new table really required? Can't
#ifexist just be made to update the links table?
Tim Starling | 2 Dec 05:45 2007
Picon

Re: another ifexists problem

Thomas Dalton wrote:
>> I've been thinking about this problem, since it's going to get even worse
>> with the new preprocessor. Currently, links in unfollowed branches aren't
>> registered, but templates *are* registered in both branches. So if you have:
>>
>> {{#ifexist: test | {{a}} | {{b}} }}
>>
>> Initially [[test]] doesn't exist so {{a}} is displayed. Then [[test]] is
>> created and the HTML cache for the page is invalidated via pagelinks. But
>> the links tables are not updated, so although the page now contains the
>> contents of {{b}}, it doesn't have a template link to it. So when
>> [[Template:B]] is subsequently changed, the cache is not invalidated.
>>
>> The solution is to add yet another tracking table.
> 
> Ah, I see the problem now. Is a whole new table really required? Can't
> #ifexist just be made to update the links table?

Having a whole new table which triggers link table updates (like 
templatelinks), but triggers only on creation or deletion and not change 
(like pagelinks) is the easy way to solve this problem. There are more 
general solutions, but they're more complicated.

-- Tim Starling
Andre Engels | 2 Dec 08:50 2007
Picon

Re: another ifexists problem

2007/12/2, Tim Starling <tstarling@...>:

> In the meantime, a null edit should work, if it doesn't then that's a bug.

Then I guess this is a bug report -
http://nl.wikipedia.org/wiki/Speciaal:VerwijzingenNaarHier/Hertogdom_Lauenburg
still shows pages on which I did a null edit ([[Lauenburg/Elbe]]) or
even an inconsequential real edit ([[Schwarzenbek]] and
[[Sjabloon:NavigatieHerzogtum Lauenburg]]). Posted as bug 12180.

--

-- 
Andre Engels, andreengels@...
ICQ: 6260644  --  Skype: a_engels
Platonides | 2 Dec 18:24 2007
Picon

Re: another ifexists problem

Tim Starling wrote:
> Initially [[test]] doesn't exist so {{a}} is displayed. Then [[test]] is 
> created and the HTML cache for the page is invalidated via pagelinks. But 
> the links tables are not updated, so although the page now contains the 
> contents of {{b}}, it doesn't have a template link to it. So when 
> [[Template:B]] is subsequently changed, the cache is not invalidated.
> 
> The solution is to add yet another tracking table.

Or maybe a column to pagelinks "clear not only html cache but also rerender"

> I've been thinking about this problem, since it's going to get even worse 
> with the new preprocessor. Currently, links in unfollowed branches aren't 
> registered, but templates *are* registered in both branches. So if you have:
> 
> {{#ifexist: test | {{a}} | {{b}} }}

It seems a bit inconsistent given that the new preprocessor only
How does it work when {{b}} (the non followed branch) includes {{c}} ? 
Will the page rerender?

Also, registering both would break [[Wikipedia:Protected titles]] as 
explained "The use of #ifexist on WP:PT subpages is to prevent the pages 
being transcluded there (and therefore protected) if they do exist" on 
http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Abuse_of_.23ifexist_parser_function

Gmane