WordPress.org

Ready to get started?Download WordPress

Forums

Loco Translate
[resolved] Loco on Multisite instalation (15 posts)

  1. napalees
    Member
    Posted 7 months ago #

    Hi, I have WP multisite and Loco Translate plugin installed.
    When I activate the plugin (both for network or for indiviual site only) and open Settings => Translation I get warning and fatal error insted of expected page. Any thoughts on that?

    http://wordpress.org/plugins/loco-translate/

  2. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    I've not tested on multisite.
    Could you tell me what the errors say please?

  3. napalees
    Member
    Posted 7 months ago #

    Warning: proc_open() has been disabled for security reasons in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/lib/build/shell-compiled.php on line 7

    Fatal error: Uncaught exception 'Exception' with message 'Failed to open process to [ -x '/usr/local/bin/msgfmt' ]' in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/lib/build/shell-compiled.php:7 Stack trace: #0 /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/lib/loco-admin.php(53): loco_find_executable('msgfmt') #1 [internal function]: LocoAdmin::render_page_options('') #2 /home/lptd/domains/lptd.lt/public_html/wp-includes/plugin.php(429): call_user_func_array(Array, Array) #3 /home/lptd/domains/lptd.lt/public_html/wp-admin/admin.php(217): do_action('settings_page_l...') #4 /home/lptd/domains/lptd.lt/public_html/wp-admin/options-general.php(10): require_once('/home/lptd/doma...') #5 {main} thrown in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/lib/build/shell-compiled.php on line 7

  4. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    As it says, your system has no proc_open functionality due to a security restriction.

    With the current plugin you won't be able to generate compiled MO files, because this is done via the shell. I am woking on a future version that will compile MO files in PHP, but until then all you can do is blank out the settings field that specifies the msgfmt path (this should prevent the error) and then compile your PO->MO manually yourself.

  5. napalees
    Member
    Posted 7 months ago #

    Yes I gues it is not caused by multisite... I tried it on another site on same server and I replicated the error. However I tryed your plugin on another site on other server it did not caused this error.
    What exactly should I do (where?) to avoid this error?

    TIA

  6. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    blank out the settings field that specifies the msgfmt path (this should prevent the error)

    The settings are accessed via the settings tab on the Loco screens. There is only one field at the moment.

  7. napalees
    Member
    Posted 7 months ago #

    OK, thing is that I can't access Settings => translation. This is where the error happens.

  8. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    Oh, I see. Sorry.
    I've just pushed an update to the development version (1.3.1) that should allow you to get to that screen without an error. Let me know if it works.

  9. napalees
    Member
    Posted 7 months ago #

    Hi I downloaded 1.3.1 from github right?
    And I still have this error:

    Warning: proc_open() has been disabled for security reasons in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate-master/lib/build/shell-compiled.php on line 7

    Warning: include(/home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/tpl/admin-opts.tpl.php): failed to open stream: No such file or directory in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate-master/lib/loco-boot.php on line 85

    Warning: include(): Failed opening '/home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate/tpl/admin-opts.tpl.php' for inclusion (include_path='.:/usr/share/pear54') in /home/lptd/domains/lptd.lt/public_html/wp-content/plugins/loco-translate-master/lib/loco-boot.php on line 85

  10. napalees
    Member
    Posted 7 months ago #

    well no fatal error atleast, but apart from these warnings I get nothing else on screen

  11. napalees
    Member
    Posted 7 months ago #

    well no fatal error atleast, but apart from these warnings I get nothing else on screen

  12. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    The warning will still be raised, yes. but it won't throw an exception.

    It's not on github, no. Download the "Development version" from here:
    http://wordpress.org/plugins/loco-translate/developers/

    You seem to have deleted some of the files, which is why your screen is blank.

  13. napalees
    Member
    Posted 7 months ago #

    I see wrong location. Did not know where to look for it :)
    Anyways I found what was wrong in the zip from github the folder was loco-translate-master so I just deleted the master part of the name and reinstalled. Works now
    Thank you for your help. I appreciate it.

    Cheers!

  14. timwhitlock
    Member
    Plugin Author

    Posted 7 months ago #

    ok, great. thanks.
    New version soon with built-in MO compilation. Just need to find the time.

  15. timwhitlock
    Member
    Plugin Author

    Posted 6 months ago #

    The current development version (1.3.2) now includes a native MO compiler that does not have a Gettext msgfmt dependency.

    http://wordpress.org/plugins/loco-translate/developers/

    The built-in compiler is the default unless you've already set a msgfmt path. Visit the Settings tab to change which compiler is used.

    I hope this solves the problem of your proc_open restriction.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.