fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-06-17 07:55 am

[dw-free] "DOM not defined" error when in jquery beta

[commit: http://hg.dwscoalition.org/dw-free/rev/efbcd47a98c8]

http://bugs.dwscoalition.org/show_bug.cgi?id=3743

Don't include old-style code for users who are in beta, to avoid errors in
the browser logs.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Talk.pm
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r d37771f3da27 -r efbcd47a98c8 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Fri Jun 17 15:52:46 2011 +0800
+++ b/cgi-bin/LJ/Talk.pm	Fri Jun 17 15:54:56 2011 +0800
@@ -2001,7 +2001,8 @@
         # userpic browse button
         if ( $remote && $remote->can_use_userpic_select ) {
             $ret .= '<input type="button" id="lj_userpicselect" value="Browse" />';
-            $ret .= LJ::Talk::js_iconbrowser_button();
+            $ret .= LJ::Talk::js_iconbrowser_button()
+                unless LJ::BetaFeatures->user_in_beta( $remote => "journaljquery" );
         }
 
         # random icon button - hidden for non-JS
diff -r d37771f3da27 -r efbcd47a98c8 cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Fri Jun 17 15:52:46 2011 +0800
+++ b/cgi-bin/weblib.pl	Fri Jun 17 15:54:56 2011 +0800
@@ -1034,7 +1034,7 @@
     $ret .= "\n</script>";
 
     $ret .= LJ::Talk::js_iconbrowser_button()
-        if $remote->can_use_userpic_select;
+        if $remote->can_use_userpic_select && ! LJ::BetaFeatures->user_in_beta( $remote => "journaljquery" );;
 
     return $ret;
 }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org