aiyuyun2015 / wiki2latex

Automatically exported from code.google.com/p/wiki2latex
0 stars 0 forks source link

preferences inaccesible after installing wiki2latex #84

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Install MW 1.20
2. Install w2l 13
3. go to Preferences

I have enabled MW debug so I get:
Global default '' is invalid for field w2lBabelDefault
Backtrace:
#0 /xxx/wiki/includes/Preferences.php(1243): 
Preferences::getPreferences(Object(User), Object(RequestContext))
#1 /xxx/wiki/includes/specials/SpecialPreferences.php(60): 
Preferences::getFormObject(Object(User), Object(RequestContext))
#2 /xxx/wiki/includes/SpecialPage.php(611): SpecialPreferences->execute(NULL)
#3 /xxx/wiki/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
#4 /xxx/wiki/includes/Wiki.php(290): 
SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#5 /xxx/wiki/includes/Wiki.php(536): MediaWiki->performRequest()
#6 /xxx/wiki/includes/Wiki.php(446): MediaWiki->main()
#7 /xxx/wiki/index.php(59): MediaWiki->run()
#8 {main}

I have just upgraded MW to 1.20, not sure if it caused this issue.

Quick, rude fix is to disable w2l settings, go to wiki2latex.php and comment 
line #31 
$wgHooks['GetPreferences'][]             = array(&$w2lHelper);

Original issue reported on code.google.com by sz.tarno...@gmail.com on 31 Mar 2013 at 4:14

GoogleCodeExporter commented 8 years ago
Not sure, but adding 
<------>'' => '',
to w2Languages in w2lHelper solved this problem.

Original comment by sz.tarno...@gmail.com on 31 Mar 2013 at 4:40

GoogleCodeExporter commented 8 years ago
Hi,

I cannot reproduce this issue and the code looks fine to me. My feeling is, 
that you somehow have invalid setting saved by Mediawiki. This might cause it. 
But I'm just guessing here.

Thanks for your report. I'll keep it open, if some other evidence arises.

Original comment by hansgeorg.kluge@gmail.com on 31 Mar 2013 at 5:12

GoogleCodeExporter commented 8 years ago
My feeling is to replicate this issue are needed:
1. MW with empty database (at least user preferences)
2. browser with set any culture other than defined in w2Languages
3. MW with language set any other than defined in w2Languages

Maybe easiest scenario is, delete your language from w2Languages and define new 
user.

Original comment by sz.tarno...@gmail.com on 31 Mar 2013 at 6:52

GoogleCodeExporter commented 8 years ago
The problem is that no preference entry 'w2lBabelDefault' has been set 
initially for the user by installing wiki2latex. Hence, querying this value is 
not possible (but done in w2lHelper.php). 

A proper solution for me was to add an appropriate entry in wiki2latex.php:

  $wgDefaultUserOptions['w2lBabelDefault'] = 'english';

After adding this line, the preference page is available and the user can 
specifically change this value in the preferences page.

Original comment by Marius.L...@gmail.com on 31 Jul 2013 at 6:00