Support » Plugin: WP Store Locator » There was a problem saving the new store details, please try again.

  • Resolved The_Hegemon

    (@the_hegemon)


    I can’t create a new store. Everytime I input a (correct) address and try to save it, this message pops up:
    “There was a problem saving the new store details, please try again.”

    How can I fix this? Unfortunately I can’t give out any login info.

    https://wordpress.org/plugins/wp-store-locator/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The_Hegemon

    (@the_hegemon)

    It’s urgent, does anybody have a solution?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Can you open the /admin/templates/add-store.php and add this to the top of the file.

    <?php
    global $wpdb;
    
    $wpdb->show_errors();
    ?>

    It should when you try to add another store, show the WordPress Database error. If it does, can you post it here?

    Are you running wp multisite? Did you develop your site on another domain and moved it to the current one including the store locator db? If you moved it, you should check with phpmyadmin whether the wpsl_id field has the auto_increment flag set.

    The_Hegemon

    (@the_hegemon)

    I tried it with adding your code to the file, but there wasn’t any output.
    This also didn’t work:
    echo $wpdb->show_errors();

    This just did give me a bool(false):
    var_dump($wpdb->show_errors());

    Yes, I am running a multisite but the plugin was installed afterwards and the wpsl_id field has the auo_increment flag set.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    According to this page http://codex.wordpress.org/Class_Reference/wpdb#Show_and_Hide_SQL_Errors, if you run multisite you should add this to your page otherwise the errors won’t show.

    <?php define( 'DIEONDBERROR', true ); ?>

    Another way is to edit the class-admin.php, search for the ‘add_new_store’ function, and add this below the query.

    echo $wpdb->last_error;
    exit();
    The_Hegemon

    (@the_hegemon)

    Thanks a lot! With these little snippets I found the error. I’m almost a bit ashamed to say what the error was. 😉

    I wanted an extra field, so I tinkered with the database and the code. After a bit of thinking I didn’t need the extra field anymore, so I deleted the extra columns in the database. I also deleted “address2”. Stupid me.

    Thanks again for your help and your great plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘There was a problem saving the new store details, please try again.’ is closed to new replies.