User talk:Briess/archive5

From Dwarf Fortress Wiki
Jump to: navigation, search

Contents

[edit] Version namespace links

It appears that the recent update has caused version pages to link back to mainspace, instead of linking within their own version namespace automatically. For example, 40d:Potash_maker links to Potash, while 40d:Potash is the expected link. --Loci (talk) 15:04, 12 April 2013 (UTC)

Looks like you're correct. I'll have to investigate and see what the fix is. --Briess (talk) 20:17, 12 April 2013 (UTC)
This has been fixed. --Briess (talk) 03:16, 14 April 2013 (UTC)

[edit] Double redirects to sections

Though the wiki software is supposed to handle double redirects, it appears to fail when the redirect is to a subsection of a page -- see calm, for instance. --Zzedar (talk) 03:40, 13 April 2013 (UTC)

Interesting. I will investigate, thanks for the report. --Briess (talk) 03:41, 13 April 2013 (UTC)
Looking into it a bit more, it seems there are a lot of double redirects that don't work properly, even when they're not to subsections; fishing, for instance.--Zzedar (talk) 17:17, 13 April 2013 (UTC)
If I remember correctly, Loci pointed that out, but the original discussion was archived. It's probably a problem with the cv: alias (as this revision on Fishing redirects correctly). --Lethosor (talk) 17:25, 13 April 2013 (UTC)
That's been my hunch so far, but I haven't had enough time to fully flesh out the problem just yet. Please keep me posted if y'all find any other edge cases. --Briess (talk) 17:27, 13 April 2013 (UTC)
This manual page seems to be relevant. I just tested this scenario on another wiki (1.20.2) and ran into the exact same situation (with a double redirect from page -> foo:page -> foo:page2 failing). This may be a problem with MediaWiki as opposed to this specific namespace scheme (although MediaWiki seems to discourage double redirects, according to Special:DoubleRedirects). I'll try testing on 1.20.3 next, but it probably produces the same result. --Lethosor (talk) 17:41, 13 April 2013 (UTC)
Actually, no double redirects seem to resolve, according to my tests, even in the same namespace. --Lethosor (talk) 17:43, 13 April 2013 (UTC)
Wikipedia:Wikipedia:Double_redirects seems to state this clearly. I'm not sure if there is a workaround, or what it would be. --Lethosor (talk) 17:46, 13 April 2013 (UTC)
https://gist.github.com/locriani/e43abff805d5cdd6c4ac is the current settings we use (as well as the hack to allow in-namespace redirect) --Briess (talk) 17:49, 13 April 2013 (UTC)
There are a few that work; milking does, for instance. Actually, I did some testing: making a dummy edit to the first redirect seems to fix the problem -- I deleted a space from wrestler, and now it works where it didn't before. However, null edits do not work. Update: this change fixed the trigger redirect.--Zzedar (talk) 17:54, 13 April 2013 (UTC)
Dang it, I bet I know what's causing it then. There are probably bad entries in the links table,and I may have to forcibly refresh the entire table. --Briess (talk) 18:25, 13 April 2013 (UTC)
Completely late here, but I was wrong about the redirect limit, which you probably figured out ([1]). --Lethosor (talk) 01:43, 14 April 2013 (UTC)

Ok, I've completely rebuilt the links and redirect tables, and thing should be working as expected now, although I still need to figure out the issue causing links to not stay within the namespace. If not, let me know! --Briess (talk) 19:17, 13 April 2013 (UTC)

Nope, still not working -- see marksman, for instance. --Zzedar (talk) 19:44, 13 April 2013 (UTC)
Well, dang it. Going to keep digging. --Briess (talk) 19:46, 13 April 2013 (UTC)
Ok, looks like it's a bug in MediaWiki that broke max redirects behavior sometime in version 1.20.x and there is not yet a fix. I will continue to look for a way to resolve it on our end --Briess (talk) 19:55, 13 April 2013 (UTC)

[edit] Rating script

A few problems with the rating script seem to have popped up with the new software (these are probably more related to User:Emi, but you seem to be more active at the moment):

  • jsMsg() now fades out after a few seconds, preventing the automatic tests from completing in a few cases
  • Clicking a checkbox propagates up to the message box, causing it to fade out and preventing any further action (and showing it again with $("#mw-notification-area").show() doesn't work, because the text is cleared when it disappears).

The easiest solution here is probably to display the interface somewhere else, instead of using the notification system.

For the time being, I can rate articles manually, but it would be nice if someone could look into this. --Lethosor (talk) 14:51, 13 April 2013 (UTC)

I'll poke Emily when she gets back from vacation this weekend and we'll figure out a better way to do it. --Briess (talk) 18:37, 13 April 2013 (UTC)

[edit] Parser Functions

A recent change seems to have caused them to stop working (but they're still listed at Special:Version). See DF2012:Giant lion --Lethosor (talk) 19:24, 13 April 2013 (UTC)

Oops, I forgot to clone the repo into one of the servers. Doing that now. --Briess (talk) 19:27, 13 April 2013 (UTC)
Fixed. Good catch! --Briess (talk) 19:29, 13 April 2013 (UTC)

[edit] Categorization by template

The recent changes briefly made categorization by template work correctly. Then, another change broke it again. Category:DF2012:Flying now includes every creature page, instead of properly determining flying status from the raws. This new breakage seemed to happen about the time you resolved the parser function bug (above). --Loci (talk) 20:48, 13 April 2013 (UTC)

 :psyduck: --Briess (talk) 20:49, 13 April 2013 (UTC)
I'm going to try rebuilding ALL THE THINGS again, momentarily. --Briess (talk) 20:50, 13 April 2013 (UTC)
ALL THE THINGS rebuilt. --Briess (talk) 21:06, 13 April 2013 (UTC)

[edit] Random pages

It looks like $wgExtraRandompageSQL was removed in 1.19 ([2]). The suggested option seems to be adding a hook, as shown here, but it's not clear if it can be defined outside of an extension (which might be easier). --Lethosor (talk) 01:37, 14 April 2013 (UTC)

Yep, another thing on my list. Are you any good at php >.> I'm trying to figure out another issue and I usually avoid PHP at all costs --Briess (talk) 01:38, 14 April 2013 (UTC)
This looks like it works (at least for me in LocalSettings.php):
function randtitle(&$randstr, &$isRedir, &$namespaces, &$extra, &$title){
	$extra[]='page_title NOT LIKE \'%/raw\'';
	return true;
}

$wgHooks['SpecialRandomGetRandomTitle'][] = 'randtitle';
--Lethosor (talk) 01:51, 14 April 2013 (UTC)

Perfect, I'll steal that. Right now I'm trying to figure out what hack we used to keep links within namespaces.  :/ --Briess (talk) 01:52, 14 April 2013 (UTC)

Implemented. --Briess (talk) 03:16, 14 April 2013 (UTC)

I just got Masterwork:Main Page... looks like that shows up too. Adding this line to the code above should prevent that (although it's not that common – I probably won't be able to reproduce it):

	$extra[]='page_title NOT LIKE \'%Main Page\'';

--Lethosor (talk) 20:45, 28 April 2013 (UTC)

[edit] Note

[2f2c73a7] 2013-04-14 10:08:41: Fatal exception of type MWException

[65465d61] 2013-04-14 10:10:19: Fatal exception of type MWException

Internal error

Jump to: navigation, search 

[14d33bba] 2013-04-14 10:09:59: Fatal exception of type MWException

Fixed --Briess (talk) 10:42, 14 April 2013 (UTC)

[edit] Upload link error

This happens:
Upload bug.png
I'm unsure of the cause; it sometimes happens when I load a page and sometimes doesn't, and it even changes between loads of the same page. Something similar happens with tables of contents: where it should say "contents", it instead says "<toc>" (the table of contents for your talk page looks that way to me right now, though I suspect it'll fix itself after I submit this comment, since null edits to pages with this problem seem to fix it for that page).--Zzedar (talk) 18:07, 15 April 2013 (UTC)

Hrm, I'll investigate. --Briess (talk) 18:11, 15 April 2013 (UTC)
Should be fixed now. Thanks for the heads up. --Briess (talk) 18:14, 15 April 2013 (UTC)

It seems to be happening again (right now it's usually just <searchsuggest-search> in the search box). It seems to happen least often on dfweb3. --Lethosor (talk) 23:56, 23 April 2013 (UTC)

This looks like it's fixed now too. --Lethosor (talk) 20:59, 24 April 2013 (UTC)

[edit] Anonymous editing

I noticed that attempting to edit pages anonymously produces the following error:

You do not have permission to edit this page, for the following reason: 
You must confirm your e-mail address before editing pages. Please set and validate your e-mail address through your user preferences.

Special:ListGroupRights claims (all) users have the edit permission. Was this change intentional? --Loci (talk) 19:22, 16 April 2013 (UTC)

It was not. Let me fix. --Briess (talk) 19:22, 16 April 2013 (UTC)
Fixed. --Briess (talk) 19:25, 16 April 2013 (UTC)

[edit] Script reloading error

Was there a change made to the cloudflare settings recently? Because the cloudflare script is suddenly slowing things down a lot and tries to frequently reload the page or something.--Zzedar (talk) 02:11, 17 April 2013 (UTC)

Interesting. I'll turn it off. --Briess (talk) 02:25, 17 April 2013 (UTC)

[edit] Rating script

It works! Somewhat -- it doesn't have any validation/suggestions, but it lets you rate articles. --Lethosor (talk) 01:08, 18 April 2013 (UTC)

[edit] Variable Extension

Sorry to bother you again, but could we have the Variables extension installed? I'm trying to cut down on expensive parser functions (notably #ifexists) by storing the results in variables instead. Thanks --Lethosor (talk) 23:06, 19 April 2013 (UTC)

Not a bother at all. I can't do it right now (maybe not for a few days), but I'll look into it. --Briess (talk) 18:50, 21 April 2013 (UTC)
Thanks. It's one of the things I was trying out in my experimental version template (it reduced the calls to 5, from about 30), so being able to use it will definitely help. :) --Lethosor (talk) 18:53, 21 April 2013 (UTC)
The extension is now live. --Briess (talk) 01:53, 24 April 2013 (UTC)
Great! I have the new av template ready, if you want to copy it over now. (It seems to work in previews, but feel free to test it some more) --Lethosor (talk) 02:10, 24 April 2013 (UTC)
Cool. If you think it's ready, push it up, and I'll monitor the job queue. --Briess (talk) 02:20, 24 April 2013 (UTC)

[edit] Complete set of tables of biome lifeforms

I have assembled a Word .doc containing a set of 5 tables for each of the 51 biomes (Creatures, Vermin, Grasses, Plants, Trees).

I did this for my own purposes, but thought it might be useful to the wiki biome pages. I have *zero* experience with wiki editing.

I wanted the tables to fit within a small vertical space for 'at a glance' viewing of what is native to a biome. The tables are are set up as 4 columns with alpha sorted names. Since in some biomes the list can become long, I used a '<name> (3)' format to collapse '<name>, '<name Man', and 'Giant <name>' into a single line.

The resulting set of 5 tables for each biome are all smaller than a single printed page.

The tables also include surrounding notes where they exist.

If you think this would be useful, I'd be happy to send the Word .doc file.

--- Grumalg ---

[edit] Load time

I've been having some major issues with response time lately - some pages don't load at all, sending me to the Cloudflare page (see the gaps in my recent edits). I haven't seen a lot of visible traffic, though, so I'm not exactly sure what the cause is (although the load times recently seem to have dropped to about 1-2 minutes). There are still around 300 jobs in the job queue (and according to the settings you posted on Gist, the run rate is set at 0, so I don't know how it would affect performance). --Lethosor (talk) 19:34, 24 April 2013 (UTC)

I got the Cloudflare message again right after posting this (right now I'm on dfweb1, which seems to work, but I'm not logged in). --108.84.202.115 19:39, 24 April 2013 (UTC)
Memcached barfed recently and that's why performance is awful. I've been working on fixing it all day today with no luck so far :( --99.35.186.141 19:44, 24 April 2013 (UTC)
That would explain why the API load time is about normal [3] (except it didn't work as often on dfweb2). Thanks for looking into this again, by the way. --Lethosor (talk) 19:51, 24 April 2013 (UTC)
I think memcached was just being slow to repopulate. Should get better within a few hours. Emi [T] 20:23, 24 April 2013 (UTC)
Looks like you're right - the load times for most pages have improved since I last tried. Thanks! --Lethosor (talk) 20:33, 24 April 2013 (UTC)

[edit] PHP backtraces

Hi, About 10 days ago I started seeing error's like this when accessing any page on dwarffortresswiki.org:

[46d7c07f] 2013-04-17 00:33:32: Fatal exception of type MWException

However on friday it started spitting out PHP backtraces that included database user/password and private IP details like this (I've masked the real details): URL: http://dwarffortresswiki.org/index.php/DF2012:Civilian_alert (happened on any URL though).

 
Unable to determine IP
 
Backtrace:
 
#0 /var/www/dfwiki/includes/User.php(1723): WebRequest->getIP()
#1 /var/www/dfwiki/includes/db/Database.php(844): User->getName()
#2 /var/www/dfwiki/includes/db/DatabasePostgres.php(385): DatabaseBase->query('SET client_enco...', 'DatabasePostgre...')
#3 /var/www/dfwiki/includes/db/Database.php(644): DatabasePostgres->open('192.168.X.X', 'XXXX', 'XXXX', 'dfwikidb')
#4 /var/www/dfwiki/includes/db/Database.php(694): DatabaseBase->__construct('192.168.X.X', 'XXXX', 'XXXX', 'dfwikidb', 16, 'get from global')
#5 /var/www/dfwiki/includes/db/LoadBalancer.php(711): DatabaseBase::factory('postgres', Array)
#6 /var/www/dfwiki/includes/db/LoadBalancer.php(586): LoadBalancer->reallyOpenConnection(Array, false)
#7 /var/www/dfwiki/includes/db/LoadBalancer.php(507): LoadBalancer->openConnection(0, false)
#8 /var/www/dfwiki/includes/GlobalFunctions.php(3429): LoadBalancer->getConnection(-1, Array, false)
#9 /var/www/dfwiki/includes/LocalisationCache.php(1002): wfGetDB(-1)
#10 /var/www/dfwiki/includes/LocalisationCache.php(380): LCStore_DB->get('en', 'deps')
#11 /var/www/dfwiki/includes/LocalisationCache.php(422): LocalisationCache->isExpired('en')
#12 /var/www/dfwiki/includes/LocalisationCache.php(309): LocalisationCache->initLanguage('en')
#13 /var/www/dfwiki/includes/LocalisationCache.php(244): LocalisationCache->loadItem('en', 'namespaceNames')
#14 /var/www/dfwiki/languages/Language.php(386): LocalisationCache->getItem('en', 'namespaceNames')
#15 /var/www/dfwiki/includes/search/SearchEngine.php(345): Language->getNamespaces()
#16 /var/www/dfwiki/includes/User.php(1233): SearchEngine::searchableNamespaces()
#17 /var/www/dfwiki/includes/User.php(2230): User::getDefaultOptions()
#18 /var/www/dfwiki/includes/context/RequestContext.php(287): User->getOption('language')
#19 /var/www/dfwiki/includes/cache/HTMLFileCache.php(116): RequestContext->getLanguage()
#20 /var/www/dfwiki/includes/Wiki.php(515): HTMLFileCache::useFileCache(Object(RequestContext))
#21 /var/www/dfwiki/includes/Wiki.php(446): MediaWiki->main()
#22 /var/www/dfwiki/index.php(59): MediaWiki->run()
#23 {main}

At work I have two different Internet connectiosn I can use. One for our R&D lab and one for Corporate users. Using our Corporate connection renders the DF wiki pages fine but using the lab connection causes this error.

A remote user should not be able to trigger your server to reveal this info no matter what kind of Internet connection they use.

tweet me a direct message @mattimustang to get in touch and I can help you troubleshoot it if you need it.

The backtraces are an intentional troubleshooting step on our part for a user. I'm not concerned about the passwords - the nodes actually only connect to the database using SSL and the password is there to prevent mediawiki from complaining. These exceptions will probably be shut off shortly. Part of the reason I enabled these is because of the specific error you show here: the information you had is helpful in figuring it out. Thanks for the heads up, either way!--Briess (talk) 01:52, 26 April 2013 (UTC)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Advertisement