WordPress.org

Ready to get started?Download WordPress

Forums

Codestyling Localization
[resolved] IDN problem, conflic with (5 posts)

  1. juanstecno
    Member
    Posted 1 year ago #

    Hello,
    I was intended to install the plugin, but when activated lock immediately the web, locking all access and showing this message:

    "Fatal error: Cannot redeclare class idna_convert in /home/***/public_html/wp-content/plugins/idna/idna_convert.class.php on line 57"

    After this, I erase the complete "codestyling-localization" plugin from FTP and then all works again. It has another 12 plugins installed without conflicts with IDNA.
    Any solution?
    Greetings

    http://wordpress.org/extend/plugins/codestyling-localization/

  2. codestyling
    Member
    Plugin Author

    Posted 1 year ago #

    The problem is, that the idna plugin you are using gets loaded later as my plugin. My plugin tests for existing idna class and if already present, it doesn't load it the second time.

    But your idna plugin doesn't do it and loads as you show above the same class a second time without testing it's existance. So you get this issue.

    Because idna is not part of WordPress itself, such conflicts can only be handled, if plugin authors doing tests of existance and avoid 2nd load of same class as I did.

    My suggestion would be to contact the author of this plugin and explain this situation and ask for safety existance check. Or you modify that plugin to do this test.

  3. juanstecno
    Member
    Posted 1 year ago #

    Hi,
    I was sent the same question to the other plugin author. I don't know another plugin that makes the same work than this and compatible with yours. And I don't know how to modify it.
    I'm interested in solve this issue because, I want to use your plugin (I was done in other blogs without issues), but I can't change my domain.
    Greetings.

  4. codestyling
    Member
    Plugin Author

    Posted 1 year ago #

    Change line 38 of idna plugin from

    require_once dirname(dirname(__FILE__)) . '/idna/idna_convert.class.php';

    to this:

    if (!class_exists('idna_convert')) require_once dirname(dirname(__FILE__)) . '/idna/idna_convert.class.php';

    and all works as expected.

  5. juanstecno
    Member
    Posted 1 year ago #

    Hello,
    yes, it seem solves this issue, I was checked activating and deactivating alternatively the 2 plugins and nothing break my site.
    I have other questions but no refered to that case.
    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.