Support » Fixing WordPress » [Plugin: Google AJAX Translation] 0.4.6 conflict with Events Calendar

  • Resolved pikahyper


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

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

    wow that did it, thank you very much 😀

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



    This fix worked great!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Google AJAX Translation] 0.4.6 conflict with Events Calendar’ is closed to new replies.