WordPress.org

Ready to get started?Download WordPress

Forums

WP Store Locator
[resolved] There was a problem saving the new store details, please try again. (6 posts)

  1. The_Hegemon
    Member
    Posted 1 month ago #

    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/

  2. The_Hegemon
    Member
    Posted 1 month ago #

    It's urgent, does anybody have a solution?

  3. Tijmen Smit
    Member
    Plugin Author

    Posted 1 month ago #

    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.

  4. The_Hegemon
    Member
    Posted 1 month ago #

    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.

  5. Tijmen Smit
    Member
    Plugin Author

    Posted 1 month ago #

    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();
  6. The_Hegemon
    Member
    Posted 1 month ago #

    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!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.