"Wikitravel has a speed and convenience the books' publishers can only envy." Time Europe

Tech:Breadcrumb navigation comes and goes

From Wikitravel Shared
Jump to: navigation, search

Before adding anymore problems to this page please read the following[edit]

Chances are if you see a problem with the breadcrumb you can fix it. Please follow the the instructions below before adding any more new issues to the ever growing list.

Let's say that you happen across a page called "Cincinnati" which is in Hamilton County.

The breadcrumb should read like this - North America : United States of America : Midwest : Ohio: Southwest Ohio : Hamilton County: Cincinnati

You may see the breadcrumb reading like this - Hamilton County : Cincinnati.

Click "Edit" then scroll down to the bottom of the page. You'll probably see several templates and and intewiki links. The "isIn" template should always be at the top of list of interwiki links and templates. For example on the Cincinnati article the templates should be listed as follows:


{{isIn|Hamilton_County_%28Ohio%29}}
{{geo|39.1044|-84.5139}}
{{hasDocent|Sapphire}}
{{guide}}
[[de:Cincinnati]]
[[pl:Cincinnati]]
[[pt:Cincinnati]]
[[WikiPedia:Cincinnati]]
[[Dmoz:North America/United States/Ohio/Metro Areas/Cincinnati Metro]]
[[World66:northamerica/unitedstates/ohio/cincinnati]]

If this does not fix the breadcrumb for Cincinnati the next step is to clear the page's cache. Click "http://wikitravel.org/wiki/en/index.php?title=Cincinnati&action=purge". Where "Cincinnati" is change the url to the name of the article in question. This will clear the cache.

Lastly, if this does not work it means somewhere further up the "line" the IsIn tag is not where it should be. You'll need to go to "Hamilton County (Ohio)" and make sure the IsIn tag is where it should be. If it isn't please follow the instructions again. Lastly, you can always ask me to fix it, since I seem to have the magic touch. -- Andrew Haggard (Sapphire) 22:29, 9 October 2006 (EDT)

What happens[edit]

The order in which tags are at the end of an article seems to matter. I doubt it is supposed to.

For example, en:Sichuan showed South West but not the full string which should be:

Asia East Asia China South West

so I checked South West and found it showed nothing. Moving the isIn tag ahead of outline fixed that, but Sichuan still showed the problem. Moving the isIn tag in it made those breadcrumbs work right. Pashley 05:08, 14 April 2006 (EDT)

This is still a problem. I noticed today that Zhuhai showed only Guangdong, not higher levels, even though Guangdong had those. Moving the Wikipedia|Zhuhai link to make isIn first thing in list at end of article made it work right. Pashley 00:21, 23 April 2006 (EDT)

en:Bujumbura shows the problem now Pashley 05:59, 1 May 2006 (EDT)

Also en:Jiangsu Pashley 06:36, 3 May 2006 (EDT)

en:Auxerre shows different but probably related behaviour. Pashley 23:37, 5 May 2006 (EDT)

en:Texel had the problem, re-ordering tags fixed it. Pashley 04:55, 14 May 2006 (EDT)

Breadcrumbs are flaking out pretty badly recently: eg en:Sado Island's trail finds its way two steps up to Niigata and Chubu but stops there, while Chubu then goes all the way to Asia. What's going on? Jpatokal 08:46, 20 May 2006 (EDT)
Jpatokal, I fixed the problem on Sado Island. The problem is this people use the tags incorrectly or place them in the wrong spot:
  • [[:en:WikiPedia:Sado Island]]
  • {{isIn|Niigata_(prefecture)}}
  • {{guide}}

when in face the isIn tag should come first. I don't know why it requires this order but it should go like this:

  • {{isIn|Niigata_(prefecture)}}
  • [[:en:WikiPedia:Sado Island]]
  • {{guide}}

Does that make any sense to you? I spent. a great deal of time experimenting with the isIn tag to figure out how exactly it work and I stumbled on the solution. - Andrew Haggard (Sapphire)

I think it's a bit much to say that people are using the tags "incorrectly" or putting them in the "wrong" place -- it shouldn't matter where on the page the tags are, as long as they're there! Hopefully Evan can figure out the root cause of the problem... Jpatokal 09:24, 20 May 2006 (EDT)
Right, it would be much better if that were fixed so the only two people who actually know about this unusual solution don't have to go tracking down every article that doesn't have a working breadcrumb. - Sapphire
Yes, it's extremely weird that that's happening. I'll try experimenting with en:Special:Rdf to see why we're losing that information. For now, the workaround is to move "isIn" to the beginning of that section. --Evan 10:40, 20 May 2006 (EDT)

Problem is still present. I just noticed it for en:Hangzhou. Moving the tags fixed it. Specifically, Hangzhou showed only Zhejiang and not higher levels, although Zhejiang showed those. Moving tags in Zhejiang made no difference. Changing the order in Hangzhou made the prblem go away. Pashley 03:31, 18 June 2006 (EDT)

My current theory is that the cached breadcrumb data is disappearing from memcached after a few days or weeks. I've put in more strict tests to see if something's in the cache or not; I think but I'm not sure that this fixed the problem. Let me know if you see more weird behavior here. --Evan 17:54, 22 July 2006 (EDT)

en:Sunset Beach shows only North Caorlina in breadcrumb line; en:North Carolina shows links all the way to North America, but they aren't visible at the lower level. 59.56.216.60 19:57, 9 October 2006 (EDT)

New breadcumb oddity[edit]

I'm not 100% positive, but for whatever reason en:Clermont County (Ohio)'s breadrumb isn't linking all the way back to Ohio. It links back to the en:Southwest (Ohio) article. I have a hypothesis that if the breadcrumb links to two or more articles with "(" and ")" the breadcrumb falls apart. Evan, any way you can look into it? My workaround solution didn't work on this article which baffled me, because I was able to fix Jpatokal's issue. That's how I ended up coming up with my hypothesis - because the failure of my workaround to succeed. - Andrew Haggard (Sapphire) 23:48, 30 May 2006 (EDT)

Interesting ... I'll take a closer look. --Evan 23:53, 30 May 2006 (EDT)
en:Dharwad (district) shows the problem. en:Karnataka did also and playing with tag order fixed that. Tag order in Dharwad (district) and Central (Karnataka) looks OK, but problem is still there. Both have brackets, though, so perhaps Sapphire's theory is right. en:User:Pashley 11 Sept 2006
en:Virudhaachalam shows the problem en:User:Pashley
en:Karnataka and en:South (India) show the problem Both have breadcrumb tags which look OK to me Pashley 30 sept
It's fixed now. -- Andrew Haggard (Sapphire) 11:51, 30 September 2006 (EDT)

Suspected umlauts[edit]

en:Friedrichshafen shows the problem. No brackets, but some umlauts. 59.56.216.54 19:57, 22 September 2006 (EDT)

The umlauts had nothing to do with that problem. The isIn tag was linking to "Baden-Württemberg" the isIn tag should have linked to "Baden_Württemberg". Notice the hyphen. The "Baden-Württemberg" page is a redirect to "Baden_Württemberg", which caused everything to fall apart. -- Andrew Haggard (Sapphire) 23:07, 22 September 2006 (EDT)

Complicated example[edit]

What we should have for en:Jalalabad is Asia Central Asia Afghanistan Nangarhar Jalalabad. It shows all of those except Asia.

Checking up the hierarchy, I find en:Nangarhar and en:Afghanistan each show the one directly above them, but nothing more. en:Central Asia correctly shows Asia.

What is going on here? Pashley October 15 2006

When it happens[edit]

What should happen[edit]

How to fix it[edit]

This seems to be caused by problems with the caching server. MediaWiki uses a caching system called "memcached", which makes it easy to store data on the server so it doesn't have to be generated twice. I've been storing RDF data in there, so it doesn't have to be re-calculated. However, the data expires after about a day, and the RDF code should re-generate the data when it doesn't find it in the cache. My code looks something like this, conceptually:

 $rdf = get_rdf_from_memcached();
 if (not_valid($rdf)) {
    $rdf = regenerate_rdf();
 }
 

I think that the test that was checking if the returned RDF was valid wasn't working. I actually have been restarting the memcached daemon on a daily basis to get around this problem (lazy, I know). But I think I've fixed the test, and it should be working correctly now. I've tested on my dev server with the cache expiry set to 10 seconds, and it seemed to be working correctly. To test in production, I've set cache expiry of RDF on wikitravel.org to one hour (3600 seconds), which should start showing problems earlier. --Evan 16:53, 8 January 2007 (EST)

Sign below, please[edit]

Unsigned comment by Evan (talkcontribs) 2006-08-13T22:17:58.

Comments[edit]

I think these bugs have been resolved already, although there are occasional caching problems (akin to those described in countless other bug reports on shared), which can be solved ad hoc by purging the cache. Can we call this bug report closed? --Peter Talk 03:07, 21 March 2008 (EDT)

Any further thoughts on whether issue this should be closed?JuCo 19:35, 21 October 2008 (EDT)
I found that as well as putting the IsPartOf tag on a separate line, a carriage return line-space between IsPartOf and the next tag is also required in order to show all the breadcrumbs in their glory. 220.255.12.178 01:49, 19 December 2011 (EST)

Variants

Actions

In other languages