WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Youtube Lyte plugin breaking quicktags and javascripts (23 posts)

  1. S.K
    Member
    Posted 2 years ago #

    I encountered a weird behaviour on one of my sites using this plugin. Suddenly quicktag buttons on html edit form disappered and Google api javascripts stopped functioning. I disabled Youtube Lyte plugin and everything became all right. I tried a fresh download from the plugin repository to the same result.

    Please get it fixed.

    Thanks.

    S.K

  2. Frank Goossens
    Member
    Posted 2 years ago #

    Hi SK. Quick question before I dive in: the google api javascripts that stopped functioning, was that in the wp-admin part (as were the quicktags), or in the blog front-end as well?

    And did you happen to check with firebug (or a similar javascript tool) to check what errors were thrown, or can you re-enable for a second and check (because I can't reproduce)?

  3. S.K
    Member
    Posted 2 years ago #

    Thanks, Futtta for your response.

    Yes, the problem is both on the front end and the admin part. I tried re-enabling and checking with firebug. It shows a big chunk of errors which turns me dizzy.

    I'll try it with another site of mine to find out if it conflicts with another plugin.

    S.K

  4. Frank Goossens
    Member
    Posted 2 years ago #

    ideally you would be able to reproduce this an a non-production site (or one which can be broken for a couple of hours) which would allow me to go bug-hunting there myself? :-)

    but feel free to copy/paste that big chunk of errors here or into a mail to futtta-at-gmail-dot-com

  5. Frank Goossens
    Member
    Posted 2 years ago #

    just a silly idea: do you have DoNotTrack (the "bonus feature") disabling 3rd party tracking? if so, can you try without that option to see if that solves the problem? I would still be very interested in the errors you got though (I'm working a new plugin that'll do nothing but DoNotTrack)

  6. S.K
    Member
    Posted 2 years ago #

    Futtta, you are dead on!

    I disabled DoNoTrack and everything is hunky dory!
    But I need the do-not-track thingy too. Any non-conflicting version of it?

    Thanks and regards

    S.K

  7. Frank Goossens
    Member
    Posted 2 years ago #

    ok, now we're getting somewhere. to solve this, i'm afraid i'm really going to need the javascript-errors generated by donottrack-min.js, either by being able to see them for myself in firebug on a site of yours, or by having a copy/paste dump from your firebug or javasript error console. what do you think?

  8. S.K
    Member
    Posted 2 years ago #

    Please see the blank space under the heading "Search site" on the side bar of http://aimwa.in/ and the content area of http://aimwa.in/search-results (under "loading").

    Hope this helps.

    S.K

  9. Frank Goossens
    Member
    Posted 2 years ago #

    Weird, can't see any trace of donottrack-related errors in the firebug-output, the only output I see is related to the google custom search implementation:

    "NetworkError: 404 Not Found - http://www.google.com/uds/api/search/1.0/b30fd838d9675ca5b151bcc19ff5c9c8/default+en.i.js"
    default+en.i.js

    google.search.CustomSearchControl is not a constructor
    http://aimwa.in/?s=india&submit=Search
    Line 301

    Which seems to imply that the js-loader did not succesfully load the search javascript-file because the wrong hash (?) was used. The question is; where does that hash (b30fd838d9675ca5b151bcc19ff5c9c8) come from? and in what way could donottrack interfere?

    Can you disable donottrack, I'd like to see if that URL (the hash inside it) is different. maybe that way I'll start to understand what is going on here ...

  10. Frank Goossens
    Member
    Posted 2 years ago #

    Well, I digged some more, the hash (and full URL) are defined by Google in a response right after initiating the search.

    This is what's happening:
    * jsapi (javasript loader) is loaded successfully
    * search starts initiating (the google.load line)
    * http://www.google.com/uds/?file=search&v=1&hl=en is called successfully
    * that file contains a URL (including hash) for a javascript file which (a.o.) defines google.search.CustomSearchControl
    * that javascript file cannot be loaded (gives a 404)
    * because google.search.CustomSearchControl isn't know, a javascript error is thrown

    questions remaining:
    * how can DoNotTrack cause this (I'm really stumped up until now to be honest)?
    * can you disable DoNotTrack so I can see what is different in that case?

  11. S.K
    Member
    Posted 2 years ago #

    //can you disable DoNotTrack so I can see what is different in that case?//

    Yes. I have done it. Please have a look.

    S.K

  12. Frank Goossens
    Member
    Posted 2 years ago #

    OK, I think I found the problem (a stupid mistake on my part which results in a document.write's not being executed).

    can you replace your version of donottrack-min.js with the one on http://blog.futtta.be/wp-content/plugins/wp-youtube-lyte/external/donottrack-min.js? this should solve the problem.

    if it does, i'll push out wp-youtube-lyte (with some other fixed) later today, if not i'll just have to keep on poking around ;-)

  13. Frank Goossens
    Member
    Posted 2 years ago #

    I was kind of impatient and pushed wp youtube lyte v0.9.3 out, i'm pretty confident it solves the issues you encountered :)

  14. S.K
    Member
    Posted 2 years ago #

    Thanks. It (donottrack) almost fixes everything except the Google custom search code which still plays truant. I haven't looked at the analytics thing yet.

    S.K

  15. Frank Goossens
    Member
    Posted 2 years ago #

    arghhhhhhh ... really thought I had cracked it. do you use a plugin for google custom search? which one?

    and is (was) there an analytics problem as well? what's going wrong there?

  16. S.K
    Member
    Posted 2 years ago #

    I inserted the Google CSE code myself and added a search form widget on the sidebar. I have just now added the Google analytics. So I'll have wait for a day to check if it has started tracking.

    You can see the custom search still "loading" on http://aimwa.in/ (sidebar) with DoNotTrack on.

    Regards

    S.K

  17. Frank Goossens
    Member
    Posted 2 years ago #

    any particular place where you got the CSE-code from?

    i'll create a test-page where i'll test this together with DNT to find out what's going on exactly ...

  18. S.K
    Member
    Posted 2 years ago #

    You can create and get the code from here: http://www.google.com/cse/manage/create
    And here is some more info on howto: http://devpress.com/blog/using-google-search-within-a-wordpress-site/

    HTH

    S.K

  19. Frank Goossens
    Member
    Posted 2 years ago #

    ok, got it working on http://futtta.be/donottrack/search.html, can you replace wp-content/plugins/wp-youtube-lyte/external/donottrack-min.js by the one I've put up here: http://futtta.be/donottrack/donottrack-min.js

    this _should_ fix "all" remaining issue :-)

  20. S.K
    Member
    Posted 2 years ago #

    Thanks, Futtta. Yes. It fixed the lingering issues. Could you please indicate what exactly was the problem and how you fixed it - just for education's sake! (my email ID is skichu [at] gmail dot com - just in case.;))

    Cheers!

    S.K

  21. Frank Goossens
    Member
    Posted 2 years ago #

    in the chunk of code that checks document write's, I lowercased the entire string before comparing (with indexOf), which meant that the name of some variables got changed. I now don't lowercase any more, and use search with a simple regex instead of the indexOf :-)

    the javascript you're using is a lot more powerful by the way; if you open the file, you'll see you can choose between "blacklist" and "whitelist" and define the actual black- or whitelist. feel free to play with it, you're my first beta-tester ;-)

  22. Frank Goossens
    Member
    Posted 2 years ago #

    oh, can you mark this topic as resolved, I like to keep things nice & tidy ;-)

  23. S.K
    Member
    Posted 2 years ago #

    Done. Thanks.

    S.K

Topic Closed

This topic has been closed to new replies.

About this Topic