WordPress.org

Ready to get started?Download WordPress

Forums

WP Store Locator
[resolved] Current Stores Section emptied itself (27 posts)

  1. Sevallis
    Member
    Posted 8 months ago #

    Hi,

    I recently ran into a plugin conflict between PageBuilder and your plugin. It seems to cause PageBuilder's UI buttons to misalign for some reason, and it also seems to cause problems with using PageBuilder's Embed Image widget item. What happens is that this maps plugin makes the pop up dialog box within the editor pop up underneath rather than above the other dialog box, and therefore stops me from using the widget.

    So I have been deactivating this maps plugin while I edit other things, which works fine. However, I recently ran into a problem wherein my entire list of stores is empty. When I go to the Manage Stores section of the plugin, all of my work is missing and cannot be edited. The page still lists that there are 21 items in the list, and yet the list is empty, and when I browse to the page that I used the wpsl embed on, the dealers load up correctly. I spent a lot of time adding these dealers to the plugin database, is there some way to correct this?

    Here is a screenshot:

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

  2. Tijmen Smit
    Member
    Plugin Author

    Posted 8 months ago #

    This is the PageBuilder plugin you are using? http://wordpress.org/plugins/siteorigin-panels/ The link for the screenshot is broken.

  3. Tijmen Smit
    Member
    Plugin Author

    Posted 8 months ago #

    I see the screenshot link works in the other thread you started.

  4. Sevallis
    Member
    Posted 8 months ago #

    Huh, that's strange. I hit the edit button on this post and it made a new thread instead. Sorry about that!

    Yes I am using the latest version of page builder, which you linked to.

    I'll add the link back in here to consolidate the threads and then delete the other one.

    https://www.dropbox.com/s/9afr18jbketpzh9/screenshot.jpg

  5. Sevallis
    Member
    Posted 8 months ago #

    OK, perhaps I should redact the dialog box bug I had run into previously. I can't reproduce it now, perhaps I should have reported it when I spotted it months ago, so thats off the table for now. Here are what happens to the PageBuilder buttons though:
    https://www.dropbox.com/s/713fyt4kw64ccpf/pagebuilderbuttons.jpg
    https://www.dropbox.com/s/svlgn9k59bb11ps/pagebuilderbuttons2.jpg
    They just get sort of squished.

    Here is the map working even though the plugin editor isn't showing entries:
    https://www.dropbox.com/s/uxie8tujhzoykko/storemapworking.jpg

    As for the issue with displaying my database of store names, here are a couple of screenshots from the mysql database.
    From the wp_wpsl_stores database:
    https://www.dropbox.com/s/9pgkbifbt4mogk6/wpslstoresdatabase.jpg

    From the wp_store_locator database:
    https://www.dropbox.com/s/3dr5xdt2r7s37za/wpstorelocatordatabase.jpg

  6. Tijmen Smit
    Member
    Plugin Author

    Posted 8 months ago #

    What happens when you use the paging to go the second page? Still no results?

    The UI buttons of PageBuilder are misaligned without the store locator plugin being active in my installation with wp 3.9. So that shouldn't have anything todo with my plugin.

    You haven't customized anything in the code? What other plugins are you using? What is the name of the theme you are using?

  7. Sevallis
    Member
    Posted 8 months ago #

    Ah ok, sorry for putting the up issue on your plate then, it was correlation due to when I installed the plugin, and not causation at work :P

    Page 2 looks identically empty.

    I am using the Vantage theme by SiteOrigin.

    I am using Black Studio's TinyMCE widget, Matcha Labs Meta Slider, SiteOrigin's Page Builder, Raygun's Q and A FAQ and knowledge base for WordPress, and of course WP Store Locator.

    I have customized some CSS but I think I had it active without issue in the past, here it is:

    .specs {
       overflow: hidden;
    }
    
    .specs .col-1, .specs .col-2 {
       overflow: hidden;
       width: 390px;
       position:center;
    }
    
    .specs .col-1 {
       float: left;
       margin-left: 5px;
    }
    
    .specs .col-2 {
       float: right;
       margin-right: 5px;
    }
    
    .specs .col-1, .specs .col-2 {
       line-height: 30px;
    }
    
    .specs .col-1 span.label, .specs .col-2 span.label {
       color: #706d66;
       padding: 0 20px;
       width: 140px;
       float: left;
    }
    
    .specs .col-1 span.value, .specs .col-2 span.value {
       font-weight: bold;
       float: left;
       text-align: left;
       width: 200px;
    }
    
    .specs .col-1.odd, .specs .col-2.odd, .specs .col-1.odd, .specs .col-2.odd {
       background: transparent url(/wp-content/uploads/2014/03/Medium_Gray_Background.jpeg) repeat top left;
    }
    
    ul.noindent {
       margin-left: 0px;
       padding-left: 0px;
    }
  8. Tijmen Smit
    Member
    Plugin Author

    Posted 8 months ago #

    Can you add this to the /admin/class-store-overview.php just after line 330, and then either post it here or email to info at tijmensmit.com. You should probably remove the name of the db if it shows up in the error.

    $wpdb->show_errors();
    
    echo 'Error = ' . $wpdb->last_error;
    echo '<br>';
    echo 'Results';
    echo '<pre>';
    print_r( $wpdb->last_result );
    echo '</pre>';
    exit();
  9. Sevallis
    Member
    Posted 8 months ago #

    I don't know much about PHP, am I supposed to get an error message from a database from this command? Do I enter it via an editor like DreamWeaver and then post the actual file here to share it with you?

  10. Tijmen Smit
    Member
    Plugin Author

    Posted 7 months ago #

    Just open the /admin/class-store-overview.php in any editor that shows line number, and then add the code just after line 330. Upload it to the server and reload the store overview page. It should show whether there are sql error and the current date.

  11. Sevallis
    Member
    Posted 7 months ago #

    I got this text:

    Error = Unknown column 'address' in 'field list'
    Results
    Array
    (
    )
  12. Tijmen Smit
    Member
    Plugin Author

    Posted 7 months ago #

    Something really weird is going on here. What version are you using?

    The field called 'street' in your db should be called 'address' https://www.dropbox.com/s/9pgkbifbt4mogk6/wpslstoresdatabase.jpg But this should have been changed during the upgrade procedure.

    Have you at some point upgraded to a new version? If so, that probably failed. If you rename the street field in the db to address, and download the most recent version then it should work.

  13. Sevallis
    Member
    Posted 7 months ago #

    I am using Version 1.2.21

    I'm a bit wary of changing database table names, I've lost access to large amounts of data in the past because of a lack of understanding of databases. How do I replace the current version with the downloaded plugin without losing my database data?

  14. Tijmen Smit
    Member
    Plugin Author

    Posted 7 months ago #

    Something clearly went wrong because I just realized you also should have an address2 field in your db.

    First download this file http://downloads.wordpress.org/plugin/wp-store-locator.1.2.21.zip and overwrite the existing files on your server.

    After that you should change the wpsl_version value in the wp options table, that should trigger the sql update procedure again. It should now say 1.2.21, change it to 1.2.20.

    Then reload the store locator editor page. If you keep phpMyadmin open while you do this you should see the db field named address instead of street, and an address2 field.

    Do make a db backup first of your wp stores field :)

  15. Sevallis
    Member
    Posted 6 months ago #

    Ok, sorry for the delay in response.

    I'm confused about this instruction. I backed up then replaced my newer plugin with the older version, but then I have no idea what you mean by "change the wpsl_version value in the wp options table". I've logged into the MySQL wordpress database which contains all of my wpsl_stores entries and also looked in the GUI section of my wordpress administration section and I have no idea what that is or where to find it, or how to change it.

  16. Sevallis
    Member
    Posted 6 months ago #

    Can I just delete and reinstall the plugin as a whole, is there a way to properly reinstate all of the store entries that I manually typed in?

  17. Tijmen Smit
    Member
    Plugin Author

    Posted 6 months ago #

    You should look at this table in the db http://codex.wordpress.org/Database_Description#Table:_wp_options

    The default name is wp_options, but it can also be called whatever_options. Open that table and look for the wpsl_version field and then change the value.

    You can uninstall the plugin, but then you will have to enter the data again.

    Or you can just manually rename the street field to address in the wpsl_stores field, that is the easy fix.

  18. Sevallis
    Member
    Posted 5 months ago #

    Alright, so I looked in my wp_options table in my database. Here is what is in there: database img

    I couldn't find a field called wpsl_version, so I went with option 2 and manually renamed "street" to "address" in the wpsl_stores field. My stores are visible on the plugin list again: manage stores
    However, when I attempt to make an edit to the store entry, I get this error: edit error

    So, I have them visible again, but they are not editable. Any ideas?

  19. Sevallis
    Member
    Posted 5 months ago #

    My apologies if this is just dragging on and becoming annoying. Is there any other information that I can post to help smooth this out?

  20. Tijmen Smit
    Member
    Plugin Author

    Posted 5 months ago #

    Add this code to top of the /admin/templates/edit-store.php, and let me know which errors show up. Adding a new store works fine?

    $wpdb->show_errors();
    
    echo 'Error = ' . $wpdb->last_error;
  21. Sevallis
    Member
    Posted 5 months ago #

    When I try to insert the code into any php tagged section of the page, it fails to display anything on the page.

    Code edited

    Edit page does not render

    I tried inserting the code in other areas, and within it's own php tag, and it does the same thing. It just rendered as text outside of a php tag, so I'm thinking that is correct to insert it in-between those tags? I even tried creating it's own tag section:

    <?php
    $wpdb->show_errors();

    echo 'Error = ' . $wpdb->last_error;
    ?>

    However, it did the same thing as represented by the second screenshot. Pardon my ignorance if I have made some fundamental error here.

    I am not able to add a new store, it gives the error:
    "There was a problem saving the new store details, please try again."

    It did allow me to delete a store that I no longer wanted though. Quite confusing.

  22. Tijmen Smit
    Member
    Plugin Author

    Posted 5 months ago #

    When you get a white page again, can you set the WP_DEBUG to true in the wp-config.php, that should show the error. Also make sure there is no whitespace in the php file at the top or the bottom.

    Did you do anything different from this time when you edited the code? https://wordpress.org/support/topic/current-stores-section-emptied-itself?replies=21#post-5756702

  23. Sevallis
    Member
    Posted 3 months ago #

    Again, apologies for the long delay between posting, I have had a lot going on in life lately. I got this error when I enabled debug mode:

    Notice: Undefined variable: wpdb in /Applications/MAMP/htdocs/wp-content/plugins/wp-store-locator/admin/templates/edit-store.php on line 2

    Fatal error: Call to a member function show_errors() on a non-object in /Applications/MAMP/htdocs/wp-content/plugins/wp-store-locator/admin/templates/edit-store.php on line 2

    Edit:
    Oh, I just tried out your older php error call code that we used previously, and found this in the "Address 2:" entry field:

    <b>Notice</b>: Undefined index: address2 in <b>/Applications/MAMP/htdocs/wp-content/plugins/wp-store-locator/admin/templates/edit-store.php</b> on line <b>44</b>

    That looks like it might be a whole lot more helpful, unless I am mistaken.

    If so, here is the block of code starting on line 44:

    <input id="wpsl-store-address2" name="wpsl[address2]" type="text" class="textinput" value="<?php if ( isset( $_POST['wpsl'] ) && empty( $_POST['wpsl']['address2'] ) ) { echo esc_attr( stripslashes( $_POST['wpsl']['address2'] ) ); } else { echo esc_attr( stripslashes( $store_details['address2'] ) ); } ?>" />

    I also just noticed this error on the Current Stores view:

    Notice: Indirect modification of overloaded property WPSL_Store_Overview::$_args has no effect in /Applications/MAMP/htdocs/wp-content/plugins/wp-store-locator/admin/class-store-overview.php on line 393

  24. Sevallis
    Member
    Posted 3 months ago #

    I think that if I didn't have to manually re-type all of the myriad dealer info, then I would probably start over. I see that this thread has ballooned to many times the length of your other resolved threads. I was hoping that perhaps this issue could be resolved so that it wouldn't happen in the future.

  25. Tijmen Smit
    Member
    Plugin Author

    Posted 3 months ago #

    I have kind of run out of ideas, it's not something that I can reproduce and no one else reported this issue. And since it's not online, I can't login myself to try and fix it.

    This however is really, really weird. Notice: Undefined variable: wpdb. You are 100% sure you didn't modify any files?

    You can either make a copy of the wpsl_locations field in the database or rename it to something like wpsl_locations_backup. Then uninstall the plugin, install it again.

    Then go back to phpmyadmin, make sure the field names in the current wpsl_locations db table match with the one you had before. If that is the case then delete the new one, and rename the backup back to wpsl_locations.

    That way all the files, and options are reset and you get to keep the store locations. You can also email me at info at tijmensmit.com, and I can send you the beta version of 2.0. Maybe that fixes the problem.

  26. Sevallis
    Member
    Posted 1 month ago #

    Okay, I have been avoiding dealing with this because I am afraid to destroy something when I am messing with dropping and importing tables in MySQL. However, I did get it working with my previous data, and I am pretty sure I know what happened but not how it happened.

    I think the field "address2" got lost somehow between upgrades of the plugin. I promise I did not edit any files, I am wary of doing anything beyond the general WordPress in browser sandbox. If I recall correctly, I already had to change the "street" field to "address" to make try and fix the problem earlier. I didn't change that either, but for some reason it failed to be changed over from "street" to "address" whenever the update that modified that went out. Well, apparently at the same time it appears that the "address2" field was simply missing/not created. I saw it when I deleted and reinstalled.

    I think the plugin was failing because it didn't have any table to place an empty "address2" data into. I think I got the name correct or it wouldn't have been possible to create a new test location, it is named "address2" right?

  27. Tijmen Smit
    Member
    Plugin Author

    Posted 1 month ago #

    Good to hear it works again, still weird it broke in the first place.

    "address2" is the correct name. You can check your current db structure against the code on line 167 in wp-store-locator.php. Since it is already working fine, it should be identical but you can check it there if you want to.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.