• Resolved pik256

    (@pik256)


    You have at least 2 errors in your code.

    1. I use bad behavior plugin. It use table with a field named ‘key’. When you clone table then an error occurs:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘key FROM bio_4_bad_behavior WHERE key LIKE ….

    this is because key is reserved MySQL word. You need use field names in backticks
    I did not want to struggle wit it. I simply disabled BB plugin and deleted its table. After cloning I could reenable plugin and it recreate the table.

    2. This is worse. This is fatal. When you enable advanced option to “Keep users and roles from duplicated site” then cloning stops before successful finish and do not copy all users. I struggled with it an hour and finally when I enabled error reporting I saw the following fatal error:

    PHP Fatal error: Cannot redeclare user_array_map() (previously declared in …duplicate.php…)

    This is because you declare function user_array_map() in a loop. When you relocate declaration before a loop then code works properly (duplicates all roles).

    https://ww.wp.xz.cn/plugins/multisite-clone-duplicator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pierre Dargham

    (@pdargham)

    Thank you for reporting those two errors !

    I just made the bugfixes. We will run a few more tests and it will available in the next version of the plugin (probably within two weeks from now).

    Best regards,

    Pierre D.

    Hi Pierre,
    is it almost ready the new version fixed?

    Best regards

    Plugin Author Pierre Dargham

    (@pdargham)

    Hi Simon

    Version 1.1.0 was released today !

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Errors in plugin code’ is closed to new replies.