Topic on Extension talk:Translate

Save button doesn't work

18
Summary by Nikerabbit

Incompatibility with 1.27.3 resolvable by updating MediaWiki.

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).

On Firefox console I've these log:

when I write transation:

When I press save button:

JSON    

error    Object

code    nomessagefortitle

info    Title does not correspond to a translatable message

error    Object

code    unknownerror

info    Unknown error: "tpt-unknown-page"

Any idea about how solve this problem?

Thanks in advance!

Nikerabbit (talkcontribs)
ShInKurO (talkcontribs)

Ok after some test my hosting doesn't support the launch of a script in its cron-mode tool, in fact the launch of runJob.php from that cron tool reply: "This script must be run from the command line cron". At this point shall I configure $wgJobRunRate to 1 again? will the translate extension work in these conditions?

Nikerabbit (talkcontribs)

If your wiki has enough traffic, it might just work okay.

ShInKurO (talkcontribs)

Also setting $wgJobRunRate to 1 my errors on click on save button remain:

code    nomessagefortitle

info    Title does not correspond to a translatable message

code unknownerror

info Unknown error: "tpt-unknown-page"

Nikerabbit (talkcontribs)

Yeah, either there hasn't been enough traffic (requests) to process that job (likely), or the job failed to process for some reason (less likely).

ShInKurO (talkcontribs)

Is there a way to log runJob script from browser (modifing some php source file script I suppose, but what php script? Mantainance.php?)?I

Nikerabbit (talkcontribs)

You don't need any specific page, just making requests to the main page URL should start draining the queue.

ShInKurO (talkcontribs)

Sure but what should read from an http request (with firebug I suppose) from runJob.php to give me help to fix this issue?

Nikerabbit (talkcontribs)

There is no output in the requests about the jobs. For that you have to resort to server side logging, which you may have to configure separately to log at the right verbosity.

ShInKurO (talkcontribs)

The problem is I have no access to server side, I can only upload file or execute in a gui kind a periodical job (a call to an url). For this reason I ask if there is a way to have a log written in a file or similar setting a variable or modifyng a script...

Nikerabbit (talkcontribs)

There are many configuration options for logging, and you can also configure the logs to be written in a file. Have look at DefaultSettings.php.

ShInKurO (talkcontribs)

Ok I've enabled some debug mode from LocalSettings.php and I've these errors when I load my homepage:

Notice: Use of undefined constant DB_REPLICA - assumed 'DB_REPLICA' in ../extensions/Translate/tag/TranslatablePage.php on line 874

And when I try to translate a debug row is written in this way:

[error] [221f291bb92735e24646966f] /index.php?title=Speciale:Traduci&group=page-I+5+Numeri&language=en&action=page&filter= ErrorException from line 874 of ../extensions/Translate/tag/TranslatablePage.php: PHP Notice: Use of undefined constant DB_REPLICA - assumed 'DB_REPLICA'

Nikerabbit (talkcontribs)
ShInKurO (talkcontribs)

I've actually mediawiki 1.27.1, so to have all work properly shall I upgrade mediawiki to 1.27.3 (latest avaible) or upgrade to 1.28+ mantaining actual version of Translate or downgrade Translate (what version?) ?

Nikerabbit (talkcontribs)

1.28+ should work. 1.27.3 won't. Do note that in next MLEB release we are likely going to drop support for 1.27.

ShInKurO (talkcontribs)

Ok I've update mediawiki to 1.29 and Translate to the latest version and now it works, thanks :)

Last question: if I want to remove a translation shall I remove all translations? I've tried to remove a translation (I've selected french instead of english and I've put english translation into french page) without result until I've not removed my page from Translate control.

Nikerabbit (talkcontribs)

Use the Delete action on page "Page/fr", that should remove the translations properly.