• Resolved Mance Creative

    (@mance-creative)


    Hi Steven,

    We just updated the connections plugin to the latest version (from 10.3.2) on our test-server for one of our client’s website and it appears the map is all “wanky” looking now. Instead of it just being one embedded square, it looks like the map is being displayed all over the bottom of the page in random blocks. We haven’t updated the live website yet because of this, but would love to do so because of the security updates.

    Do you happen to know why this is happening? Also, just to provide a little refresher, you had helped us customize Connections on this website to fit the clients needs so perhaps one of the customized ways to display the map on the template page became deprecated or overwritten with the update?

    We greatly value your amazing service you have provided us and will be looking out for answer.

    Thanks!
    Mitch

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    I just helped another somewhat recently with a similar issue. The issue is not with Connections. Something is causing the style sheets for the maps not to be loaded.

    The page should be loading the Leaflet CSS (the vendor library used to display maps).

    Your page should contain the two lines that contain the following:

    • <link rel='stylesheet' id='leaflet-css' ...
    • <link rel='stylesheet' id='leaflet-control-geocoder-css'

    Another plugin or the theme may be overriding these or causing them not to be output on the page.

    I hope this helps, please let me know.

    Thread Starter Mance Creative

    (@mance-creative)

    Hi Steven,

    Thank you. I will take a look at this and let you know if it fixes the issue. ??

    Thanks!
    Mitch

    Plugin Author Steven

    (@shazahm1hotmailcom)

    I was thinking more about this… the 10.4 release did add a check to see if the current request is a post (a page is a post) and checks that post (page) content for either the [connections] shortcode or the Connections Directory Block.

    I can not recall… is the site using either on the page? Or is it calling Connections from a page template using code?

    Thread Starter Mance Creative

    (@mance-creative)

    Hi Steven,

    It is calling Connections in a wordpress page template using the PHP “echo do_shortcode” code. And then displays the customized child theme Connections template (for the “Profile” template). Let me know if that makes sense. ??

    I look forward to your reply.

    Thanks!
    Mitch

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Ok, embedding the directory into a page like that will break the logic of whether to enqueue the map CSS or not. This is done as a performance optimization, not including unnecessary CS and such on every page. The map CSS was just the first to start the optimization process.

    It is possible to remove the do_shortcode() call in the page template and put the [connections] shortcode in the page content? If you can, that should correct the map display issue.

    If doing that is not an option, then adding wp_enqueue_style( 'leaflet-control-geocoder' ); to the page template should correct it

    Thread Starter Mance Creative

    (@mance-creative)

    Hi Steven,

    Ok great. I will definitely try this option and see if that works. I will try and get to it today to let you know how it works (or by tomorrow at the latest). Thanks a bunch!

    Mitch

    Thread Starter Mance Creative

    (@mance-creative)

    Hi Steven,

    Your suggestion worked! Thanks so much. ??

    Mitch

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Happy to help! if I may, which solution worked?

    Thread Starter Mance Creative

    (@mance-creative)

    Hi Steven,

    I added the wp_enqueue_style( ‘leaflet-control-geocoder’ ); php code to the page template (below the shortcode) and it worked great.

    Thanks!
    Mitch

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Thanks! That is good info to have.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Map on profile pages not displaying properly after recent update’ is closed to new replies.