gardeningknowhow

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: debug.{anything} but debug.info is not a function #1480643
    gardeningknowhow
    Participant

    Hey guys, any update on this matter?

    in reply to: debug.{anything} but debug.info is not a function #1474029
    gardeningknowhow
    Participant

    The ad company responded and yes, they are using the debug variable although in a different way. So you see, using such a generic variable is conflict prone. Just doesn’t make sense to name something globally like that. You should namespace it. Will you do this?

    in reply to: debug.{anything} but debug.info is not a function #1473397
    gardeningknowhow
    Participant

    I just did some debugging on staging and the conflict is with the javascript used by the freestar ad company. I will get in touch with them, but it seems you are both using the open source library to use the debug object, without namespacing it, and therefore conflicts are inevitable.

    Will you change your code to namespace the debug object/function variable?

    in reply to: debug.{anything} but debug.info is not a function #1473263
    gardeningknowhow
    Participant

    Ok, I have to ammend my statements. I am looking at the minified version right now and the function is included:

    ;window.debug=function(){function e(e){!r||!a&&s&&s.log||r.apply(i,e)}function t(e){return d>0?d>e:l.length+d<=e}for(var r,a,i=this,n=Array.prototype.slice,s=i.console,o={},d=9,l=["error","warn","info","debug","log"],u="assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace".split(" ")…

    But for some reason, it is not being recognized on my site. We are using ads and it is possible that they are also using the window.debug function but in an altered way. I am not sure. When I add the function, unminified, to the footer, it works well for the events calendar but it causes the ads to some weird printing out of what looks to be debug info. So, it is likely that they are also using the same function from the same open source as you, but they have modified it and redefined the debug object. This still falls on you as plugin developers. You have a WordPress Plugin. It will be expected to work well with countless other plugins and code for countless other sources. Because of this, you should not be using the generic open source object variable of "debug"…. It should be called tribedebug or something. It's a VERY simple fix to sort of namespace the variable so that you do not run into conflict with very likely possibility that someone else is using the same popular open source script.

    So, for me right now, I am left with only a few options. 1) to change your code directly and keep a copy so that I can replace the files everytime you submit an update. 2) try to get the ad companies to namespace the debug object they are using from the same source (which is never going to happen). 3) sit and wait for you guys to do something about this and namespace YOUR debug object (I do not know how motivated you guys are to doing this). 4) create a bunch of javascript hacks that not only redefine the debug object to it's original condition, but to look for the output from the ad companies in the DOM and remove them. 5) edit all of your javascript files and remove the debugging or namespace the debug object myself, and then try to dequeue the plugin scripts and call them myself, referencing the working, edited files in an attempt to avoid having to make changes everytime you put out an update.

    in reply to: debug.{anything} but debug.info is not a function #1473237
    gardeningknowhow
    Participant

    If you decide to take a look at the site, things will be working on the events page. This is BECAUSE I have just now added the function for debugging in the footer for that page.

    in reply to: debug.{anything} but debug.info is not a function #1473229
    gardeningknowhow
    Participant

    There is no minification occurring on the site. Yes, we are using a CDN, but the files are not minified. The caching is happening from the server and it has been cleared numerous times while I was debugging the issue. Have you read my ticket? The problem is the javascript debug object! The debugging is scattered throughout your javascript files!

    The code that controls that debug call is omitted in the minified version however the debug object is still being used throughout. That is causing the error!!!!!

    In the unminified version (THE PLUGIN IS USING THE MINIFIED VERSION, as it should be) even states it:

    ======================
    /*!
    * this debug code is stripped out by closure compiler so it is not present in the .min versions.
    */

    // @ifdef DEBUG

    /*!
    * JavaScript Debug – v0.4 – 6/22/2010
    * http://benalman.com/projects/javascript-debug-console-log/
    *
    * Copyright (c) 2010 “Cowboy” Ben Alman
    * Dual licensed under the MIT and GPL licenses.
    * http://benalman.com/about/license/
    *
    * With lots of help from Paul Irish!
    * http://paulirish.com/

    */

    That function is included in the unminified javascript file, but is removed in the minified version, however you STILL have the “debug” object being called throughout, with no reference to the object. It’s properties (or members) such as debug.info, are NOT DEFINED!!!!

    Do you understand what I am saying? This needs to be fixed. There should be no debugging in the release version of the files (the minified versions).

    in reply to: License key is coming back invalid #1467621
    gardeningknowhow
    Participant

    This reply is private.

Viewing 7 posts - 1 through 7 (of 7 total)