epointal / lf-hiker

A wordpress plugin to quickly display yours gpx tracks with their elevation profile
http://elisabeth.pointal.org/lf-hiker/
12 stars 2 forks source link

LF Hiker in combination with siteorigin widgets - not showing up - Map container not found #11

Open DESIGNMENOW opened 6 years ago

DESIGNMENOW commented 6 years ago

Salut Elisabeth,

first of all congrats and thanks for this awesome plugin. I was testing it and it was working (almost) perfectly out of the box.

In one instance, it seems not to be working as supposed. My setup:

Your maps work in three cases:

  1. Pasting/Creating a shortcode in the default WP editor
  2. Shortcode in sidebar default WP widget -> Text or Editor
  3. Shortcode in sidebar siteorigin Layout Builder -> Text or Editor

And here comes the curious thing: When switching the default WP editor to "Siteorigin Page Builder" to create and arrange page content, the map will not show on the frontend. The error console only says "Error: Map container not found" BUT it works in the sidebar in combination with Siteorigin Layout Builder as shortcode pasted in the text or editor widget.

AND the error is the same when pasting any lf hiker shortcode in a custom page template.

Do I have to add a script to make the container load properly (as it is filled dynamically) Do you have any ideas on how to solve it? Or put me in the right direction? Maybe, I could assist in coding.

Merci beaucoup. A bientôt Tobi

epointal commented 6 years ago

I see your issue just now. I already had problems with divi theme. Some function execute the shortcode first time to extract picture or some think else. @see commit 72ff9c I try to reproduce...