Forums

[Pluggin Events Manager] Description / Maps not showing up on events page (31 posts)

  1. catsandcriminals
    Member
    Posted 1 year ago #

    Hi all,

    I have added the events to the system without any problem and included details such as address website link etc. Inside the admin section it shows up with a correct map etc but when you click on the event no details are being bought up.

    I've looked through the forum and haven't found any answers - can any one point me in the right direction?

    http://catsandcriminals.com

  2. Marcus
    Member
    Posted 1 year ago #

    yep, in settings page, you need to add a map placeholder. see the docs seit or the help page on the pluign

  3. catsandcriminals
    Member
    Posted 1 year ago #

    Thanks for the reply marcus! Unfortunately - I'm still stuck. I've been looking for help files and can't find anything anywhere and can't find anything relevant on the website. Where do you add the placeholders? To the settings page? Or to a page template? Or directly to the 'events' page?

  4. Marcus
    Member
    Posted 1 year ago #

    in settings, there's a single event format, there, add #_MAP

  5. kumbi
    Member
    Posted 1 year ago #

    Marcus, the section where the map is supposed to be displayed on the events page is simply grey, and there is a constant "Loading map..." message.

    displays ok in the admin section though. any clues?

  6. Marcus
    Member
    Posted 1 year ago #

    most probably your theme or a conflicting plugin is messing up the Google maps javascript.

  7. billc108
    Member
    Posted 1 year ago #

    I've found that I often have to go to the Locations page for that location and re-save it in order for the map to show up properly.

  8. Marcus
    Member
    Posted 1 year ago #

    hi, do you mean that without saving it the location map one day just stops working? or could it be you weren't using google maps before and those locations were created during that time (if so that's normal).

  9. billc108
    Member
    Posted 1 year ago #

    Actually, what's happening is that I've hacked something together so that anyone can submit an event (I see that you've got that planned as a feature, and I'm looking forward to it). When I submit (approve) the new event, the location gets entered at the same time but it does not display a map until I've opened that location and re-saved it.

  10. Marcus
    Member
    Posted 1 year ago #

    ah, then it's possible your hacks are having an effect there... depends what you did.

    i've just released a beta yesterday, which allows registered users to submit events (currently via buddypress but will be straightforward to port), and depending on capabilities it may require approvals. http://wp-events-plugin.com/try-the-beta/

  11. Nejrup
    Member
    Posted 1 year ago #

    Hi,

    I have the same problem as Kumbi is stating. If I use the default WP theme there are no problems, but when I use my preferred theme the problems starts. It works perfectly in IE but not in Firefox, so I guess it's a theme related problem. But why?

    Any clues?

  12. Marcus
    Member
    Posted 1 year ago #

    first thing to check is your js console and see if there's any errors. in chrome windows it's ctrl+shift+j

    it's probably a js conflict preventing the maps from finishing loading.

  13. Nejrup
    Member
    Posted 11 months ago #

    Okay, I'm not that skilled in js console, so I don't think that I'm able to find the errors - if any.

    Since it's at theme specific error I guess that I should look in the theme code. Right?

  14. Marcus
    Member
    Posted 11 months ago #

    yep

  15. bmxcamel
    Member
    Posted 11 months ago #

    I found a fix to this problem --

    In /events-manager/includes/js/events-manager.js, edit line 18 from this:

    document.documentElement.firstChild.appendChild(script);

    to this

    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);

    I found this fix here:
    http://robert.accettura.com/blog/2009/12/12/adventures-with-document-documentelement-firstchild/

    Hope this helps.

  16. Nejrup
    Member
    Posted 11 months ago #

    Hi bmxcamel,

    Thanks for your post. I tried your suggestion, but it doesn't seem to work. I still have the problem. As Marcus confirmed, this problem is theme specific, so unfortunately I need another solution (haven't found it yet).

  17. bmxcamel
    Member
    Posted 11 months ago #

    What errors do you see in your JS console? I'm curious to see if its the same issue I was having, as mine was theme related.

    The error I was seeing was as follows:

    Uncaught Error: HIERARCHY_REQUEST_ERR: DOM Exception 3
    mapsevents-manager.js:18
    d.extend._Deferred.f.resolveWithjquery.min.js:16
    d.d.extend.readyjquery.min.js:16
    d.c.addEventListener.y

    Effing wordpress hackery...

    As a footnote, have you disabled ALL of your plugins except for Events Manager and seen if that makes any difference?

  18. Nejrup
    Member
    Posted 11 months ago #

    Hi again,

    Problem solved :-)

    I used your solution (bmxcamel), but I had to change ' with the sign ' in the code. Then it works perfectly.

    Thank you so much for the solution.

    Have a nice day :-)

  19. bmxcamel
    Member
    Posted 11 months ago #

    Glad I could help -- let's please try and get Marcus to implement this solution into his code so we don't have to re-add it every time he updates the plugin.

  20. Marcus
    Member
    Posted 11 months ago #

    if it's theme specific you should ask the theme developer to sort it out.

    however, if more ppl are having this problem I don't mind changing it! I got that snippet from google so i don't see why it would be incompatible (mind you, the snippet of countries i got from google is missing so many my confidence in them is shaken slightly :) )

  21. bmxcamel
    Member
    Posted 11 months ago #

    I mean, just because google writes something doesn't mean it's perfect :P i'd recommend changing it since it fixed our issues and won't break anything...

  22. Marcus
    Member
    Posted 11 months ago #

    i'll have a check and see

  23. Marcus
    Member
    Posted 11 months ago #

    upon further investigation, they've also changed their recommendation to

    function loadScript() {
      var script = document.createElement("script");
      script.type = "text/javascript";
      script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initialize";
      document.body.appendChild(script);
    }

    as shown here
    http://code.google.com/apis/maps/documentation/javascript/basics.html#Async

    will be in next update, does that work for you?

    whilst I agree with what you say bmxcamel, they have a far greater test base, and maps is something they'd get a lot of complaints about if it didn't work.

  24. redsuit
    Member
    Posted 9 months ago #

    Hey guys I'm having trouble getting the map to load in a front end events creation form. I got the date picker to work by importing some script:

    <script type='text/javascript' src='http://mydomain.com/wp-content/plugins/events-manager/includes/js/timeentry/jquery.timeentry.js?ver=3.2.1'></script>
    <script type='text/javascript' src='http://mydomain.com/wp-content/plugins/events-manager/includes/js/events-manager.js?ver=3.2.1'></script>

    The error in the js console is:

    Error: j.google.maps.Load is not a function
    Source File: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/4/19/main.js
    Line: 41

    If I import this script, the map works:

    <script type='text/javascript' src='http://mydomain.com/wp-admin/load-scripts.php?c=1&load=jquery,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-position&ver=9a8b5f8adc55089712b0229f049fcd29'></script>

    but that breaks the datepicker and fancybox.... any suggestions will be very much appreciated

  25. Marcus
    Member
    Posted 9 months ago #

    sounds like you have an issue in your theme, maybe not using the wp_head() function?

  26. redsuit
    Member
    Posted 9 months ago #

    Hi Marcus, it has the function in header.php :

    /* Always have wp_head() just before the closing </head>
    		* tag of your theme, or you will break many plugins, which
    		* generally use this hook to add elements to <head> such
    		* as styles, scripts, and meta tags.
    		*/
    		wp_head();
    	?>    
    
    </head>

    in the functions.php the following scripts are added using the function below:

    function jg_register_js() {
    	if (!is_admin()) {
    		wp_deregister_script('jquery');
    		wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
    		wp_enqueue_script('jquery-ui-custom', get_template_directory_uri() . '/js/jquery-ui-1.8.5.custom.min.js', 'jquery');
    		wp_enqueue_script('fancybox', get_template_directory_uri() . '/js/jquery.fancybox-1.3.4.js', 'jquery');
    		wp_enqueue_script('hover-intent', get_template_directory_uri() . '/js/hoverIntent.js', 'jquery');
    		wp_enqueue_script('superfish', get_template_directory_uri() . '/js/superfish.js', 'jquery');
    		wp_enqueue_script('nudge', get_template_directory_uri() . '/js/link_nudge.js', 'jquery');
    		wp_enqueue_script('jg_custom', get_template_directory_uri() . '/js/scripts.js', 'jquery', '1.0', TRUE);
    		wp_register_script('tabs', get_template_directory_uri().'/js/jquery.tabbed-widget.js', array('jquery-ui-tabs')); // called in 'tabbed-blog.php' widget
    	}
    }
    add_action('init', 'jg_register_js');

    I realise it's a theme issue, cuased by some conflicting js... but can't seem to fix it without breaking something else.

  27. Marcus
    Member
    Posted 9 months ago #

    i'm guessing you're loading two js files somewhere. do you get any js errors in your console? (ctrl + shift + j in chrome)

  28. redsuit
    Member
    Posted 9 months ago #

    Hi Marcus, I have decided to remove the script that causes the map not to load. The only snag is now the date-picker doesn't load... All the script are loaded via functions.php see below:

    function jg_register_js() {
    	if (!is_admin()) {
    		wp_deregister_script('jquery');
    		wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
    		wp_enqueue_script('jquery-ui-custom', get_template_directory_uri() . '/js/jquery-ui-1.8.5.custom.min.js', 'jquery');
    		wp_enqueue_script('fancybox', get_template_directory_uri() . '/js/jquery.fancybox-1.3.4.js', 'jquery');
    
    		wp_enqueue_script('events-manager', 'http://mydomain/wp-content/plugins/events-manager/includes/js/events-manager.js');
    		wp_enqueue_script('timeentry', 'http://mydomain/wp-content/plugins/events-manager/includes/js/timeentry/jquery.timeentry.js', 'jquery');
    
    		wp_enqueue_script('hover-intent', get_template_directory_uri() . '/js/hoverIntent.js', 'jquery');
    		wp_enqueue_script('superfish', get_template_directory_uri() . '/js/superfish.js', 'jquery');
    		wp_enqueue_script('nudge', get_template_directory_uri() . '/js/link_nudge.js', 'jquery');
    
    		wp_enqueue_script('jg_custom', get_template_directory_uri() . '/js/scripts.js', 'jquery', '1.0', TRUE);
    		wp_register_script('tabs', get_template_directory_uri().'/js/jquery.tabbed-widget.js', array('jquery-ui-tabs')); // called in 'tabbed-blog.php' widget
    
    	}
    }
    add_action('init', 'jg_register_js');

    I get no javascript errors but would love for the date-picker to work. Do you think it could be a CSS thing?

    Also I was wondering where I can add to the message that appears after you create an event - I'd just like to add something that says "please expect 24 hours for your event to be made live" .

  29. Marcus
    Member
    Posted 9 months ago #

    I'll be adding a success message customization.

    It could be, using firebug you can see if the div is being loaded by JS (but check the console for errors first)

  30. redsuit
    Member
    Posted 8 months ago #

    I ended up sorting out all the conflicting js stuff. Thanks for all your help.

    Can you please tell me what file I can edit to add to the success message. I look forward to the customization but have to go live tomorrow. So can't wait for that. I was also planning on making it launch in fancybox.. do you think that'll be possible?

    I appreciate your input especially considering this is a free plugin. Developers like you make the wordpress community what it is.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic