• Plugin Author Joe

    (@morehawes)


    There have been a number of reports that embedding Collections using the Shortcode (i.e. [Waymark collection_id="1234"]) does not work and instead displays a grey/blank box.

    So far I have not been able to replicate this issue and so am yet to find the cause. I am therefore creating this topic in the hope that someone can help diagnose and share their findings.

    If you are having issues with embedding Collections with the Shortcode, please try:

    • Are you receiving any Waymark related console errors (with Debug Mode enabled)?
    • Does this still happen with the “Shortcode Method” option set to both “Embed” and “Background” (Settings > Advanced > Collection Options)?
    • Can you identify the conflict by systematically disabling other plugins and switching themes?
    • Are there any Waymark related errors in the PHP error_log file?
    • Is there anything unusual about your setup that might be causing this issue?

    Please report any findings that may help isolate this issue.

    Cheers,

    Joe

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Joe – I still have the grey box problem for collections and nothing would make me happier that helping you fix this issue. My technical skills are limited, but my willingness to do whatever is high. So far, here’s a few answers to you:

    1. I have disabled all WP plugins twice and no go. I changed the theme too.
    2. I’ll tried both embed and background.
    3. I have two plugins to watch for PHP error and while there are many, none of the results mention waymrk
    4. I’ve tried all browser in all modes
    5. I’m using the Chrome Developer tools and I see several of error there too, but nothing using “waymark”
    6. Previously you mentioned that javascript isn’t loading. Would the hosting environment’s optimization tools cause an issue? That was the case with a separate plugin. I barely know wha I’m talking about.
    7. Would it be useful if I gave you access to my admin dashboard? Can I try anything else?

    Many thanks for all you do!

    Hi Joe –

    I was trying to debug this collections issue with AI (because I’m useless. The AI built into the console says:

    The Waymark Map was not loading because the .leaflet-pane.leaflet-map-pane element, which is responsible for displaying the map tiles, had a width and height of 0px. This prevented the map from being rendered. I’ve adjusted the styles of this element to match the dimensions of its parent container. Now, the map pane has a width of 350px and a height of 351.323px, which should allow the map to be visible. Please check if the map is now loading correctly.

    This code was suggested (of course it didn’t work for me):

    const mapPane = $0.querySelector(‘.leaflet-pane.leaflet-map-pane’); const parent = $0.parentElement; const parentWidth = window.getComputedStyle(parent)[‘width’]; const parentHeight = window.getComputedStyle(parent)[‘height’]; if (mapPane) { await setElementStyles(mapPane, { width: parentWidth, height: parentHeight, }); } const data = { mapPaneWidth: window.getComputedStyle(mapPane)[‘width’], mapPaneHeight: window.getComputedStyle(mapPane)[‘height’], };

    Calude.AI said:

    Thanks for sharing that code snippet. It appears to be JavaScript that’s manipulating a Leaflet map pane to match its parent element’s dimensions. This confirms that Waymark is using Leaflet for maps, which is a common choice for WordPress mapping plugins.

    The code is trying to:

    1. Find a Leaflet map pane element
    2. Get the parent element’s dimensions
    3. Set the map pane’s dimensions to match the parent
    4. Store the resulting dimensions in a data object

    Since this code references a Leaflet map pane, it’s likely related to the map rendering functionality. The issue with collections might be that this code is executing but something else is preventing the collections feature from initializing properly.

    Here are some focused troubleshooting steps:

    1. Check if the Waymark collections feature has a separate JavaScript file:
      • Look in the Network tab for files with names like “waymark-collections.js” or similar
      • See if any JavaScript files are returning 404 (not found) errors
    2. Try forcing a JavaScript refresh:
      • Add a query parameter to your URL like “?nocache=123” to bypass browser caching
    3. Check for JavaScript initialization code:
      • Look for code that might initialize the collections feature, possibly something like waymark.collections.init() or similar
    4. Inspect the HTML markup:
      • Check if the collections container elements are being properly added to the DOM

    Given that regular Waymark features work but collections don’t, it suggests that either:

    • The collections JavaScript file isn’t loading
    • The collections feature depends on additional libraries that aren’t available
    • The initialization code for collections is failing silently

    Joe, sorry if this is all gibberish. I’m just hoping that it inspires a thought.

    Thanks for the amazing app.

    Plugin Author Joe

    (@morehawes)

    Hi @wlown,

    Please can you provide a link to where I can see Waymark failing to load Collections on your site? I have an old link from you, but it is no longer functional.

    Cheers,

    Joe

    Plugin Author Joe

    (@morehawes)

    Hi @wlown,

    I took another look at your site and I am still none the wiser I’m afraid :-/

    The problem appears to be that the plugin is not able to retrieve a valid Collection from the ID provided (even though a Collection exists with this ID). This is happening server-side in the Waymark_Shortcode.php file and so isn’t JavaScript related.

    I honestly can’t say why this is happening.

    Joe

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.