• Resolved Sevallis

    (@sevallis)


    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://www.ads-software.com/plugins/wp-store-locator/

Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    You should look at this table in the db https://codex.www.ads-software.com/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.

    Thread Starter Sevallis

    (@sevallis)

    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?

    Thread Starter Sevallis

    (@sevallis)

    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?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    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;
    Thread Starter Sevallis

    (@sevallis)

    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.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    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://www.ads-software.com/support/topic/current-stores-section-emptied-itself?replies=21#post-5756702

    Thread Starter Sevallis

    (@sevallis)

    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

    Thread Starter Sevallis

    (@sevallis)

    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.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    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.

    Thread Starter Sevallis

    (@sevallis)

    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?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    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.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Current Stores Section emptied itself’ is closed to new replies.