WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Google AJAX Translation] 0.4.6 conflict with Events Calendar (4 posts)

  1. pikahyper
    Member
    Posted 4 years ago #

    Problem : When using 0.4.6 when I click translate the menu does not appear.
    Cause : I'm pretty sure a conflict with Events Calendar is causing the problem, using the Firefox error console I receive an error when the translate link is clicked:

    Error: parent.tagName is undefined
    Source File: localhost/Okinawa/wp-content/plugins/events-calendar/js/jquery.dimensions.js?ver=1.0b2
    Line: 282

    Here is the block of code in that file, line 282 is the line with the while statement: (for some reason I can't get this to show as a code block, sorry)

    position: function(options, returnObject) {
    var elem = this[0], parent = elem.parentNode, op = elem.offsetParent,
    options = $.extend({ margin: false, border: false, padding: false, scroll: false }, options || {}),
    x = elem.offsetLeft,
    y = elem.offsetTop,
    sl = elem.scrollLeft,
    st = elem.scrollTop;

    // Mozilla and IE do not add the border
    if ($.browser.mozilla || $.browser.msie) {
    // add borders to offset
    x += num(elem, 'borderLeftWidth');
    y += num(elem, 'borderTopWidth');
    }

    if ($.browser.mozilla) {
    do {
    // Mozilla does not add the border for a parent that has overflow set to anything but visible
    if ($.browser.mozilla && parent != elem && $.css(parent, 'overflow') != 'visible') {
    x += num(parent, 'borderLeftWidth');
    y += num(parent, 'borderTopWidth');
    }

    if (parent == op) break; // break if we are already at the offestParent
    } while ((parent = parent.parentNode) && (parent.tagName.toLowerCase() != 'body' || parent.tagName.toLowerCase() != 'html'));
    }

    var returnValue = handleOffsetReturn(elem, options, x, y, sl, st);

    if (returnObject) { $.extend(returnObject, returnValue); return this; }
    else { return returnValue; }
    },

    If I deactivate the Events Calendar plugin Google AJAX Translation works fine but the site I am making needs both... any help would be much appreciated.

    http://wordpress.org/extend/plugins/google-ajax-translation/

  2. monodistortion
    Member
    Posted 4 years ago #

    I'm not sure why Events Calendar uses the dimensions jquery plugin. I haven't been using jquery for a long time but I just looked it up and this plugin was merged into the core in jquery version 1.2.6 (May 2008) so it shouldn't be necessary to use the plugin anymore.

    http://docs.jquery.com/Plugins/dimensions

    I would try commenting out lines 85 and 106 in the file events-calendar.php and see if it still works.

  3. pikahyper
    Member
    Posted 4 years ago #

    wow that did it, thank you very much :D

    I do have another question bout this plugin but I will start another thread to keep things sorted.

  4. darrellcdow
    Member
    Posted 4 years ago #

    This fix worked great!

    Not that in Events Calendar version 6.6-beta the line numbers to comment out are 158 and 203.

Topic Closed

This topic has been closed to new replies.

About this Topic