WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
failed to upload polylang (24 posts)

  1. eurodriver
    Member
    Posted 4 months ago #

    Warning: Illegal offset type in.................content/plugins/polylang/include/olt-manager.php on line 110 Hi can anyone tell me what this means and how I can correct it please.

    https://wordpress.org/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    Lost probably, one of your other plugins or your theme is sending bad data to WordPress translation function. Polylang intercepts this data and want ot use it, but since it is not of the correct type, PHP fires this warning.

    Try de-activating your plugins or change your theme to find out which one is conflicting.

  3. eurodriver
    Member
    Posted 4 months ago #

    Hello Chouby, Thank you for the tip, and super quick response. I tried deactivating all my other plugins and I still got the same result. So my theme is the issue. grrr :( I am now stuck. Is there anyway that it can be corrected. The theme should support polylang.

  4. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    Is your theme freely available?

  5. eurodriver
    Member
    Posted 4 months ago #

    No, it's Bizz Theme car-hire theme. I have sent them a message and waiting for a response.

  6. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    Are you setting the language from content? Try setting it from the directory name in pretty permalinks. That may hide the message.

  7. eurodriver
    Member
    Posted 4 months ago #

    Hi Chouby,
    I haven't even got that far. I simply uploaded the file and got this message.

  8. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    I see. Does the message appear both on backend and frontend?
    Can you help me debug this?
    Edit polylang/include/olt-manager.php and just above the line 110, type:

    if (!is_string($text)) {
      echo $domain;
      var_dump($text);
    }

    Then report here the extra messages it should display.
    Once it is done, you delete the extra laines of code.

  9. eurodriver
    Member
    Posted 4 months ago #

    Yes the message appears on both ends. I am a bit worried about going into html files. I dont understand, Where would I edit those files, in the plug-in edit or on my theme files?

  10. eurodriver
    Member
    Posted 4 months ago #

    well if i try to look up on the plug-in edit polylang/include/olt-manager.php is not there.
    Can you give me instuctions on in which file I need to edit this?

  11. eurodriver
    Member
    Posted 4 months ago #

    No documentation available for PLL_OLT_Manager()

  12. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    No documentation available for PLL_OLT_Manager()

    What is this?

  13. eurodriver
    Member
    Posted 4 months ago #

    That is the message i get if i go through dashboard.
    plugins- I hit the edit button - there is a documentation and look up name search box. I searched for olt manager I see PLL_OLT_Manager() when I clicked to see it is not availalbe.

  14. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    You should not use the builtin editor. You don't even have access to the line numbers. You should rather use an editor such as notepad++ and modify the file on your computer and upload it via ftp.

  15. eurodriver
    Member
    Posted 4 months ago #

    Is this line 110?

    public function gettext($translation, $text, $domain) {
    $this->labels[$text] = array('domain' => $domain);
    return $translation;

  16. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    Yes.
    And for the test it should be:

    public function gettext($translation, $text, $domain) {
    if (!is_string($text)) {
      echo $domain;
      var_dump($text);
    }
      $this->labels[$text] = array('domain' => $domain);
    return $translation;
  17. eurodriver
    Member
    Posted 4 months ago #

    }public function gettext($translation, $text, $domain) {
    if (!is_string($text)) {
    echo $domain;
    var_dump($text);
    }$this->labels[$text] = array('domain' => $domain);
    return $translation;
    }
    ok i have this. What is the next step Chouby?

  18. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    If you did it locally you upload your modified file to overwrite original file in your wordPress installation.

    Once done, with your browser, just load some page where you have the error. It should display other message before the error. I am interested by what is displayed.

  19. eurodriver
    Member
    Posted 4 months ago #

    ok I am going to try to upload now. Before i upload and panic does this have anything to do with it?
    public function load_textdomains() {
    // our override_load_textdomain filter has done its job. let's remove it before calling load_textdomain
    remove_filter('override_load_textdomain', array(&$this, 'mofile'), 10, 3);
    remove_filter('gettext', array(&$this, 'gettext'), 10, 3);
    remove_filter('gettext_with_context', array(&$this, 'gettext_with_context'), 10, 4);
    $new_locale = get_locale();

    // don't try to save time for en_US as some users have theme written in another language
    // now we can load all overriden text domains with the right language
    foreach ($this->list_textdomains as $textdomain) {
    if (!load_textdomain($textdomain['domain'], str_replace("{$this->default_locale}.mo", "$new_locale.mo", $textdomain['mo']))

  20. eurodriver
    Member
    Posted 4 months ago #

    I am not seeing anything different. I deleted my cache. Message stays the same. I am trying this on my test site. http://www.motorradvermietungkreta.com I am not seeing the message on the front of the site anymore, but its still on dashboard.
    Warning: Illegal offset type in /home3/yannism/public_html/motorradvermietungkreta.com/wp-content/plugins/polylang/include/olt-manager.php on line 110

  21. eurodriver
    Member
    Posted 4 months ago #


  22. eurodriver
    Member
    Posted 4 months ago #

    Warning: Illegal offset type in /home3/yannism/public_html/motorradvermietungkreta.com/wp-content/plugins/polylang/include/olt-manager.php on line 110

    Warning: Cannot modify header information - headers already sent by (output started at /home3/yannism/public_html/motorradvermietungkreta.com/wp-content/plugins/polylang/include/olt-manager.php:110) in /home3/yannism/public_html/motorradvermietungkreta.com/wp-includes/pluggable.php on line 896

  23. eurodriver
    Member
    Posted 4 months ago #

    Hi Chouby,

    Do you have any further instuctions for me?

  24. Chouby
    Member
    Plugin Author

    Posted 4 months ago #

    There is something I don't understand. the code I asked you to add should have output something (in fact the wrong key that provoques the error).

    So now I am a bit blind. Could you try this?

    public function gettext($translation, $text, $domain) {
    if (!empty($text))
      $this->labels[$text] = array('domain' => $domain);
    return $translation;
    }

Reply

You must log in to post.

About this Plugin

About this Topic