Forum Replies Created
-
AuthorPosts
-
November 15, 2017 at 6:31 pm in reply to: Events page broken when WPML is active on Pro theme #1384173Bastien Bournet-CharrierParticipant
Also note that I’ve taken a deep look at the Translation Management page in WPML and couldn’t find where to translate both the “events” and “event” slug.
In TEC General Settings, the fields “Events URL Slug” and “Single event URL Slug” do not show up as compatible with WPML translation. What I mean is that we should see a little drop-down menu below it to choose the language of the entered value. I know that earlier versions of WPML did not work like this so it’s likely this is set elsewhere.
However, in the Custom Posts section, there is only “Events” and the original value shows up as singular “Event”. I’m not sure where WPML would pull the translation for the plural version, which is the slug used in the url “/events/”.
Could it be the reason why the Events page is not working or am I missing something obvious?
November 15, 2017 at 6:05 pm in reply to: Events page broken when WPML is active on Pro theme #1384150Bastien Bournet-CharrierParticipantHey Geoff,
Just wanted to let you know that we got some feedback from WPML :
The only thing that appears to me in the log is not related to WPML, but to your theme, calling a deprecated function from the plugin The Events Calendar
It looks like they are unable to find the problem and they are suggesting that this has to do with using our theme with TEC.
We’re still waiting for some feedback from Themeco, although they have noticed us that since this is a plugin issue not related to the theme in itself it may take longer to get an answer.
Let me know if you find anything!
November 14, 2017 at 10:27 am in reply to: Events page broken when WPML is active on Pro theme #1382780Bastien Bournet-CharrierParticipantHey Geoff,
The guys over at WPML aren’t sure what to make of this error and are suggesting that some files might be corrupted in TEC plugin.
To confirm this wasn’t the case I deleted both TEC and TEC Pro and reinstalled both plugins. Unfortunately the same problem still happens on the Events archive page.
I’ll report back to them and let you know in case of any progress.
Thank you!
November 13, 2017 at 11:40 am in reply to: Events page broken when WPML is active on Pro theme #1381814Bastien Bournet-CharrierParticipantHey Geoff,
Thank you as well for the follow-up with this and the additional information.
I have forwarded the warning to WPML and will let you know if they find anything.
Let’s keep in touch!
All best,
BNovember 9, 2017 at 11:36 pm in reply to: Events page broken when WPML is active on Pro theme #1379679Bastien Bournet-CharrierParticipantThis reply is private.
November 9, 2017 at 12:20 pm in reply to: Events page broken when WPML is active on Pro theme #1379321Bastien Bournet-CharrierParticipantThis reply is private.
Bastien Bournet-CharrierParticipantHey Andras,
Thank you very much for the snippet. I had some troubles at first because it seems jquery has some issues with closing tags…
The only reason you can’t do $(‘<script></script>’) is because the string </script> isn’t allowed inside javascript because the DOM layer can’t parse what’s js and what’s html. You can even do $(‘<script><\/script>’) to get around that limitation – qwertymk Nov 23 ’14 at 22:55
I also changed the trigger code so that it would only fire once and not add a script on every click.
Here’s the final snippet :
jQuery( document ).ready(function($){ $( '#venue-tab' ).one("click", function() { var tecscript = document.createElement("script"); tecscript.src = '/wp-content/plugins/the-events-calendar/src/resources/js/embedded-map.min.js'; $('head').append(tecscript); }); });
Pretty neat!
Thanks for help all along!
November 7, 2017 at 3:12 pm in reply to: Events page broken when WPML is active on Pro theme #1377471Bastien Bournet-CharrierParticipantThis reply is private.
Bastien Bournet-CharrierParticipantHey Andras,
Just following-up with you to see if you could have someone to take a quick look on this and maybe suggest a path of resolution. It seems to be a pretty common issue and hopefully someone already know the solution but unfortunately I can’t get my head wrapped around the concept of using APIs just yet and I’m not sure how to tackle at this issue.
Hope we can find a solution!
All best,
BBastien Bournet-CharrierParticipantHey Andras,
Thank you for the reply and information.
I had not set the Google Maps API key indeed so I did that.
However the jQuery error related to the resize script is more finicky. I fixed it, sort of, there’s no more error in the console but it’s not working.
Upon checking the code of the Venue tab, there is no “#tribe-geo-map-wrapper” identifier. I tried to change it to the class that wraps the venue map without luck.
When I resize the browser the map will start to display (although the centering is off) but I want to trigger that event the moment the person clicks on the tab.
The problem, I believe, is that the “map” var is not declared in our script but when I look inside tribe-events-ajax-maps.js it’s not really clear how to set this var :
var marker = { position: myLatlng, map : tg.map, title : title };
Here’s the value of tg :
{"map":[],"geocoder":[],"geocodes":[],"bounds":[],"markers":[],"refine":false}
It doesn’t look good to me since there’s no data in here.
Here’s the value of tt :
{"pushstate":true,"webkit":true}
It looks like this condition fails to return a TRUE value :
if ( tt.map_view() )
This tt.map_view() indeed returns FALSE.
—
I have removed all conditionals as they doesn’t look necessary in our case. I’ve stripped down the script to only this :
jQuery( document ).ready(function($){ $( '#venue-tab' ).click(function(e){ var tg, map; tg = tribe_ev.geoloc; map = tg.map; google.maps.event.trigger( tg.map, "resize" ); //alert(JSON.stringify(tg) + ", " + tg.map); }); });
If you would be able to put us on the right path to trigger the resize event properly that would be fantastic.
Waiting for your feedback and thank you for the help.
All best,
B- This reply was modified 6 years, 6 months ago by Bastien Bournet-Charrier.
Bastien Bournet-CharrierParticipantNote : The code was actually taken from this thread -> https://theeventscalendar.com/support/forums/topic/fixed-a-bug-map-centering-and-window-resizing/
June 6, 2014 at 6:57 am in reply to: Adding third-party plugin content to Events page (Revolution Slider) #209029Bastien Bournet-CharrierParticipantHey Casey!
Thanks for following up. I hadn’t find a solution until recently. I tried quite a lot of tests without success. I was either getting the slider on every pages or not at all. I finally managed to find a correct test to get the slider only on the main events listing page using the body class. Here is the snippet I’ve added inside our child-theme /tribe-events/default-template.php file :
<?php
$classes = get_body_class();
if (in_array(‘events-list’,$classes)) {
echo do_shortcode(‘[rev_slider home]’);
}
?>Added right before <div id=”tribe-events-pg-template”>
Works like a charm 🙂
Thank you!
Bastien Bournet-CharrierParticipantHey Casey!
Thanks for your answer. In the meantime, I did some research and realized I had the plugin WooCommerce Follow-up Emails. It allows you to create a rule to send an email at a specific time for specific product customer.
We will use this to unveil the event location of our private party and so far it looks like it works like a charm!
Bulk sending is not recommended for confidentiality.
I’d love to submit this as an idea, but I’ve already used all my votes to suggest more important features (like embedding event on third-party websites, show attendees list from local website and from facebook, allow reports and statistics for community events, etc.)
Thank you for your help!
Cheers,
BBCMay 23, 2014 at 7:23 am in reply to: Adding third-party plugin content to Events page (Revolution Slider) #171945Bastien Bournet-CharrierParticipantHey Casey!
Thanks for the answer. I have tried your code snippet but apparently the output is always ‘False’, the slider doesn’t display on the events page or single event page. If I add a ‘!’ in front of ‘tribe_is_in_main_loop()’ the slider starts to display again everywhere.
I wanted to put a simpler logic using the page slug but it looks like since this is a dynamically generated page it won’t work. I don’t really know what options I have left!
Looking forward to hear from you 🙂
Sincerely,
BBCMay 22, 2014 at 7:49 pm in reply to: Adding third-party plugin content to Events page (Revolution Slider) #171163Bastien Bournet-CharrierParticipantWell I’ve spoken too fast!
The slider appears on every page (even single event page) and I wanted it to be displayed only on the events page!
Any ways to include only the main events page?
Sincerely,
BBC -
AuthorPosts