Support » Plugin: A/B Testing for WordPress » Updating failed. The response is not a valid JSON response.

  • Resolved slochbronner

    (@slochbronner)


    Hey!

    I’m getting this error message: “Updating failed. The response is not a valid JSON response.”

    Testing it on WordPress Version 5.4 with the Genesis theme. I’ve just created a fresh install with the exact same setup, I don’t get the error message there. So it has something to do with the existing website. Any recommendations where I should start looking for the bug? I’ve already deactivated every plugin except yours, but this didn’t solve the problem.

    Thanks,
    Sebastian

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gaya Kessler

    (@gayakessler)

    Hi Sebastian,

    Sorry to hear you’re running into trouble. Good to hear that at least a fresh install does not yield any errors.

    Could be that the database user does not have enough permissions to install the plugin.

    It needs CREATE and ALTER table permissions.

    You can try to begin looking there.

    I also just released an updated version of the plugin which adds a “repair database” functionality

    Kind regards,
    Gaya Kessler

    Thread Starter slochbronner

    (@slochbronner)

    Hi Gaya,

    thank you for the quick update! I’ve tested the new “repair database” functionality – that gave me an important clue: while trying to create the table, I got the error “max key length is 767 bytes”. So I’ve changed the varchar value from 255 to 191 (INNODB utf8mb4):

    CREATE TABLE IF NOT EXISTS PREFIX_ab_testing_for_wp_variant_condition ( variantId varchar(32) NOT NULL DEFAULT ”, key varchar(191) NOT NULL DEFAULT ”, value varchar(191) NOT NULL DEFAULT ”, PRIMARY KEY (variantId, key, value) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    That solved the problem for me!

    Best regards,
    Sebastian

    Plugin Author Gaya Kessler

    (@gayakessler)

    @slochbronner Thanks for the update and spotting the issue!
    I changed the create and alter queries to reflect the max key length of the different charsets.

    This will be released shortly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Updating failed. The response is not a valid JSON response.’ is closed to new replies.