Last modified: 2013-04-25 07:02:57 UTC
We have some big pages in our MediaWiki and installed the translate extension just recently. The extension works just fine on smaller pages but on pages above a certain size you always get the message Error 'Unbalanced <translate> tag. Translation template: ' when trying to modify/save the page. Example page: http://manual.limesurvey.org/wiki/Advanced_question_settings (if you want to try it you can create an account on http://www.limesurvey.org) It looks like parsing for the closing </translate> tag does not work at a certain size, anymore. MediaWiki 1.20 and the latest release version of the translate plugin are installed. PHP 5.3.2 with Suhosin-Patch.
I copied the text of the page before it was marked for translation to https://test.wikipedia.org/wiki/Advanced_question_settings and everything seems to work.
I am aware that it might be system-dependant as the translation marking was done on a another server without problems - but how can that be? Why would it start working if I cut back the page to a certain size - one character more and it does not work anymore (of course the </translate> tag is always included). At all times I can see the full source in the submission window - so it's not like there is some server module truncating the POST call or similar.
(In reply to comment #2) > I am aware that it might be system-dependant as the translation marking was > done on a another server without problems - but how can that be? Are any memory limits hit?
PHP Memory limit is set very high at 265M. I switched on the MediaWiki log and logged this when trying to save the page: Start request POST /index.php?title=Advanced_question_settings&action=submit HTTP HEADERS: HOST: manual.limesurvey.org USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-LANGUAGE: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 ACCEPT-ENCODING: gzip, deflate DNT: 1 REFERER: http://manual.limesurvey.org/index.php?title=Advanced_question_settings&action=edit COOKIE: __utma=30318624.95485635.136661628.136659562.136676732.9; __utmz=30318624.136616258.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=103536028.212690596.1366616262.1366804555.1366834704.9; __utmz=103536028.136670308.6.4.utmcsr=google.com|utmccn=(referral)|utmcmd=referral|utmcct=/ig; 2_manual_lsmw_language=en; 2_manual_lsmw_UserName=C+schmitz; 2_manual_lsmw_UserID=1798; 2_manual_lsmw_Token=efde6eddefaa17400ca65b98dc92; 2_manual_lsmw__session=072071ed2b7d4573ee5411e187cb; __utmc=30318624; __utmc=103536028; uls-previous-languages=%5B%22en%22%5D; __utmb=103536028.7.10.1366834704 CONNECTION: close CACHE-CONTROL: max-age=0 CONTENT-LENGTH: 69831 CACHES: EmptyBagOStuff[main] SqlBagOStuff[message] SqlBagOStuff[parser] session_set_cookie_params: "0", "/", "", "", "1" LocalisationCache: using store LCStore_DB Fully initialised Connecting to localhost 2_manual... Profiler::instance called without $wgProfiler['class'] set, falling back to ProfilerStub for safety Connected to localhost 2_manual. User: cache miss for user 1798 User: loading options for user 1798 from database. User: logged in from session User: loading options for user 1798 from override cache. Connecting to localhost 2_manual... Connected to localhost 2_manual. MessageCache::load: Loading en... got from global cache EditPage::edit: enter Unstubbing $wgLang on call of $wgLang::truncate from EditPage::importFormData EditPage::importFormData: Passed token check. Title::getRestrictionTypes: applicable restrictions to [[Advanced question settings]] are {edit,move} User::getBlockedStatus: checking... IP: 84.46.73.189 timestamp: 20130412223200, edittime: 20130412223200 EditPage::internalAttemptSave: getting section '' Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache::getParser Parser: using preprocessor: Preprocessor_DOM Saved preprocessor XML to memcached (key 2_manual-lsmw_:preprocess-xml:02d0d1c1107aede1c59e7f447de6bd31:0) Saved preprocessor XML to memcached (key 2_manual-lsmw_:preprocess-xml:02d0d1c1107aede1c59e7f447de6bd31:0) Title::getRestrictionTypes: applicable restrictions to [[Advanced question settings]] are {edit,move} Title::getRestrictionTypes: applicable restrictions to [[Advanced question settings]] are {edit,move} Title::getRestrictionTypes: applicable restrictions to [[Advanced question settings]] are {edit,move} Title::getRestrictionTypes: applicable restrictions to [[Advanced question settings]] are {edit,move} Class PEAR_Error not found; skipped loading OutputPage::sendCacheControl: private caching; ** Request ended normally wfClientAcceptsGzip: client accepts gzip. wfGzipHandler() is compressing output Maybe this does help?
This is probably https://www.mediawiki.org/wiki/Help:Extension:Translate/Configuration#Page_translation:_translated_version_of_page_is_empty It should be possible to optimize the regexp or replace it with another solution.
Niklas, thank you very very much (and to the other who tried to help). This really was the issue. To help others I took the liberty to extend the trouble shooting page. I am not sure if this needs to be fixed in a general way so I will leave it up to you if the bug should be marked as Fixed. Thanks again!