Topic on Extension talk:Translate/Archive 2

Summary by Nikerabbit

An issue with older versions of MediaWiki, no longer present in newer versions as far as I know.

67.244.49.134 (talkcontribs)

(Moved from support desk and modified) I have translate installed on my wiki, but when I try to add a translation for a page I get the following error. Saving the translation failed: Unknown error: "tpt-unknown-page" FuzzyBot also isn't running when I mark a page for translation. Running runJobs.php did nothing. Running showJobs.php gave the result 0. Any help would be great. Thanks.

Tuxxic (talkcontribs)

Hi,

Did you run runJobs.php from your actual PHP CLI instead of using an extension like MaintenanceShell ?

I had the same problem but running from CLI solved it.

In fact, in my case I'd like to runJobs eachtime I mark a page for translation, since it isn't done automatically ... :)

This post was hidden by 24.39.1.139 (history)
24.39.1.139 (talkcontribs)

I ran it using SSH.

2002:43F4:3186:1234:35AE:218:4B7:62E5 (talkcontribs)

Please help me.

Nikerabbit (talkcontribs)

So if runJobs.php doesn't work, does running extensions/Translate/scripts/createMessageIndex.php work?

24.39.1.139 (talkcontribs)

That worked

24.39.1.139 (talkcontribs)

FuzzyBot still isn't creating the /en subpages though.

Nikerabbit (talkcontribs)

I don't have much info, so my best guess is that either the JobQueue is seriously broken and not running jobs, or there is some kind of error that prevents Translate from adding jobs to the queue. Enabling PHP error reporting as well as logging exceptions could help to identify the cause. For example:

error_reporting( E_ALL | E_STRICT );

$wgShowExceptionDetails = true;

$wgDebugLogGroups['exception'] = ini_get( 'error_log' ); 

$wgDebugLogGroups['error'] = ini_get( 'error_log' );

$wgDebugLogGroups['fatal'] = ini_get( 'error_log' );

Tuxxic (talkcontribs)

Edit : So here is what I get in my PHP error log after :

  • Adding a new chunk of text
  • Marking therefore the page for translation
  • then trying to translate it afterwards

I don't experience the problem if I update an already existing message group, if it can help you.

Thanks for advice on error logs :)

2017-05-03 12:01:19 SERVERNAME database-name: [3f588d59648bf5725b6fb31e] /index.php?title=Sp%C3%A9cial:PageTranslation   DBUnexpectedError from line 2866 of C:\mediawiki-path\includes\libs\rdbms\database\Database.php: MWCallableUpdate::doUpdate: Cannot flush snapshot because writes are pending (JobQueueDB::doBatchPush).

#0 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1092): Database->flushSnapshot(string)

#1 [internal function]: LoadBalancer->{closure}(DatabaseMysqli)

#2 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1390): call_user_func_array(Closure, array)

#3 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1100): LoadBalancer->forEachOpenMasterConnection(Closure)

#4 [internal function]: LoadBalancer->beginMasterChanges(string)

#5 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(176): call_user_func_array(array, array)

#6 [internal function]: LBFactory->{closure}(LoadBalancer, string, array)

#7 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactorySimple.php(134): call_user_func_array(Closure, array)

#8 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(179): LBFactorySimple->forEachLB(Closure, array)

#9 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(200): LBFactory->forEachLBCallMethod(string, array)

#10 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(262): LBFactory->beginMasterChanges(string)

#11 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(225): DeferredUpdates::runUpdate(MWCallableUpdate, LBFactorySimple, integer)

#12 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(133): DeferredUpdates::execute(array, string, integer)

#13 C:\mediawiki-path\includes\MediaWiki.php(891): DeferredUpdates::doUpdates(string)

#14 C:\mediawiki-path\includes\MediaWiki.php(720): MediaWiki->restInPeace(string)

#15 C:\mediawiki-path\includes\MediaWiki.php(739): MediaWiki->{closure}()

#16 C:\mediawiki-path\includes\MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)

#17 C:\mediawiki-path\index.php(43): MediaWiki->run()

#18 {main}

Nikerabbit (talkcontribs)
Tuxxic (talkcontribs)

In my case, 1.28.2, but I experienced it also on 1.28.0.

113.172.20.5 (talkcontribs)

Hi Nikerabbit,

I got same problem Saving the translation failed: Unknown error: "tpt-unknown-page"

Wiki version 1.28.1

Use extensions/Translate/scripts/createMessageIndex.php is OK, but translate new page doesn't work

Nikerabbit (talkcontribs)

I don't know if this is specific to 1.28, but I just tried with MediaWiki vagrant on a clean install, using default MLEB configuration, and I did not have this problem.

Tuxxic (talkcontribs)

Thanks for testing.

Would you be interested in the list of my extensions installed, in order to see which one might be the culprit then ?

Nikerabbit (talkcontribs)

There is some info at https://phabricator.wikimedia.org/T100085 about different but possible related error message. It says it would be about exceptions.

I also can reproduce "Cannot flush snapshot" errors on my wiki now, so let's see if I can debug further.

171.233.234.227 (talkcontribs)

Thanks for debug Nikerabbit

ShInKurO (talkcontribs)

Hi all,

I've installed Translate extension (2017.07) on my wiki (mediawiki 1.27). When I try to translate a translable article the translation progressbar of the GUI doesn't go on when I press "Save translation" and I don't obtain any translation of my page after I've finished to translate at all. I've configured $wgJobRunRate to 0 and setted from console configuration of my hosting the cron job php script as written on mediawiki documentation (I cannot access to console).

Any idea about how solve this problem?

Thanks in advance!

Nikerabbit (talkcontribs)

Please open a new thread and check why the saving of the translations is failing, for example using PHP logs or your browser's developer tool and network tab.

ShInKurO (talkcontribs)

new thread opened! :)