• Resolved CPR-Works

    (@cpr-works)


    Hi,

    Upgraded to new ID Directory Lite yesterday from ldd-business-directory in a Dev site I am working on. Unfortunately all of my inputted businesses disappeared. I can live with that as they can be resubmitted.

    However, the Google Maps are now longer showing up with any companies at all. Should the maps be working in this new beta? I’ve tried US and UK addresses with no success. I DO have the maps element enabled in the settings btw. Where is the map info pulled in from, there is no set field when creating a listing, so assume it is from the address fields themselves?

    I should point out I am no programmer, but in my Browser Error Console I do get this bold line highlighted in red. Any ideas?

    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCbaw0hFglsihePOsFpMnLQwJZtOChIoDg&sensor=false"></script>
    <script>
        function initialize() {
            <strong>var mapLatLng = new google.maps.LatLng(, )</strong>
            var mapOptions = {
                center: mapLatLng,
                zoom: 16,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                panControl: false,
            }
            var map = new google.maps.Map( document.getElementById("map_canvas"), mapOptions )
    
            var marker = new google.maps.Marker({
                position: mapLatLng,
                map: map,
                animation: google.maps.Animation.DROP,
            })
        }
        google.maps.event.addDomListener(window, 'load', initialize);
    </script>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Also have the Special Offers element been removed completely now?

    Hope to be able to continue using your plugins.

    Thanks
    CPR

    https://wordpress.org/plugins/ldd-directory-lite/

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

    (@delayedinsanity)

    There’s multiple issues here.

    Unfortunately all of my inputted businesses disappeared. I can live with that as they can be resubmitted.

    They should not have disappeared, one of the first features I built in to this new version was an upgrade path. The old plugin was using some very rudimentary private tables to store it’s information, the new plugin benefits from custom post types and taxonomies (storing all its information alongside the rest of your posts and pages).

    Until the plugin comes out of beta it doesn’t remove any of this old information. Once it’s out of beta I’ll add a tool to ask if you want this information removed, but until then it’s left 100% intact.

    I’d like to know why it’s not upgrading for you. If you’re not too invested, could you try deactivating and deleting the lite plugin, then reinstalling it? Your site may go into maintenance mode for a moment, don’t worry about that. Let me know if it still fails to import all your listings.

    Where is the map info pulled in from, there is no set field when creating a listing, so assume it is from the address fields themselves?

    It is from the address fields, yes. They are glued together in ldl_get_listing_meta() and then sent to be geocoded via Google Maps geocode API.

    The listings won’t generate geocode information if anything is missing from the address (with the exception of an Address Line 2 as this is rarely used). So if you’re short a zip code, or it doesn’t have the region, it will bail.

    In your case it looks like the geocoded elements are missing (the content of the LatLng() call). I just added some more stringent error checking to the development branch on that, but I’m curious if something else isn’t causing a bug for you. Do all your addresses include all elements short Address #2?

    Also have the Special Offers element been removed completely now?

    No, the data is still there, but I had originally decided to disable this until the users front end interface had been built (where people could log in and manage their own listings). It’s use seems to be prevalent enough that I need to turn it back on asap, even if it’s only managed through the dashboard. I’ll try and bring this back online with the next version bump.

    Thread Starter CPR-Works

    (@cpr-works)

    Hi thanks for extensive reply.

    I’m out of the office now but as a quick addition the website went into maintenance mode for over three hours when we deactivated, deleted and reinstalled. It never came out – after that we gave up and removed it again – via the ftp. Our internet connection is strong and the server is a good spec.

    When we reinstalled it, it had once again pulled in the same 8 or so entries but no more. There should have been around 30 in total, so not the biggest directory, and these are now lost.

    As far as I can tell all of the address details were fully completed, and they were certainly were on Lite version we inputted a few test entities.

    We are inputting the missing entries back into the old plugin now, having deactivated Lite, so I am little wary going through the process again if we are likely to lose it. Although a more extensive backup will be taken by us next time.

    I appreciate this info does not really help your debugging very much, but again thanks for the reply.

    Mark

    (@delayedinsanity)

    There’s absolutely no reason you should have lost that original data.

    Something is severely wrong for that to occur, given that the lite plugin only reads from those tables; it does not in any way try to alter, update, or delete them. In my testing I successfully ran the upgrade on databases with a dozen entries up to one with a few hundred.

    Again, there’s nothing in the code that modifies that original data. So I’m at a complete loss for the moment as to what to suggest.

    The only reason I could see your site staying in maintenance mode that long is due to the process timing out, or something killing it prematurely, keeping it from running the command to disable maintenance mode. I’ve got a couple ideas how to avoid that in future releases that I think I’ll go play around with…

    Is there any backup you have which has the original business directory tables? There should be three of them, wp_lddbusinessdirectory, wp_lddbusinessdirectory_cats, and wp_lddbusinessdirectory_docs, keeping in mind of course that the wp_ prefix may be different of course. If you can get them, I would like to be able to test the plugin against them.

    Mark

    (@delayedinsanity)

    I realize this wasn’t the most important issue on your list, but migrating from the old plugin to the new is an important process to me and one that I want to be as painless and perfect as possible.

    To that end, you inspired me to spend the day yesterday rewriting the whole process. The upgrade functionality in 0.5.4-beta now:

    • doesn’t run automatically, or put your site into maintenance mode without warning.
    • displays a notification at the top of the dashboard informing you that there is data available for import. This notification is dismissable if for any reason you want to continue without importing.
    • provides feedback as to what occurred during the import (how many of each item was imported, if there were errors or duplicates, etc)

    There is also a debug utility on the settings page which allows you to remove all Directory Lite content (new content, not the old) if you want to start from a clean slate and attempt the import again. This should provide a completely safe and accountable upgrade path from the old plugin to the new.

    Now on to your other issues…

    Thread Starter CPR-Works

    (@cpr-works)

    Superb, just a quick response to at least show I appreciate your efforts on this.

    I will give the latest version a go and see how it progresses (likely to be next week now).

    Thanks again.

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

The topic ‘Google Maps Not showing’ is closed to new replies.