Bug 72497 - BUGZILLAASSISTANT: BSA doesn't work with Safari (OX) or Chrome (GNU/Linux) (no selection or log-in options)
Summary: BUGZILLAASSISTANT: BSA doesn't work with Safari (OX) or Chrome (GNU/Linux) (n...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: WWW (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: high major
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 72570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-08 21:11 UTC by Julien Nabet
Modified: 2013-12-10 21:24 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2013-12-08 21:11:30 UTC
Problem description: 
With MacOS 10.7.5 (my version) and 10.8.5 (a user from a forum) and Safari 6.1 (in both cases), BSA doesn't work.
The left green toolbar appears + top green banner but no select box.

I enable development menu then debug console and noticed this:
[Error] SyntaxError: Expected token ')' (bugzilla.js, line 18)
[Error] TypeError: 'undefined' is not an object (evaluating '$.bugzilla.isLoggedIn')
main (bug.js, line 519)
(fonction anonyme) (bug.html, line 1401)
c (jquery-1.10.1.min.js, line 4)
fireWith (jquery-1.10.1.min.js, line 4)
ready (jquery-1.10.1.min.js, line 4)
q (jquery-1.10.1.min.js, line 4)


Steps to reproduce:
1. Open Safari 6.1 in MacOs
2. Go to https://www.libreoffice.org/get-help/bug/


Current behavior:
No Select box

Expected behavior:
Select box appears
              
Operating System: Mac OS X
Version: unspecified
Comment 1 Julien Nabet 2013-12-08 21:12:51 UTC
Alex: would you have some time to give it a try?
Comment 2 Jorendc 2013-12-08 21:27:32 UTC
Reproducible, tested using Mac OSX 10.9 with Safari Version 7.0 (9537.71)
Comment 3 Alex Thurgood 2013-12-08 22:11:27 UTC
@Julien: I don't think I've ever used the BSA so far, but I see that Joren has confirmed.

Alex
Comment 4 Julien Nabet 2013-12-09 06:30:59 UTC
Thank you Joren and Alex for your quick feedback! :-)

Rob: one for you?
Comment 5 retired 2013-12-09 11:49:43 UTC
Raising to "high" "major" since it's not obvious for OS X users (a lot of them use safari) what is going on. Also since there's no info on BSA to try another browser this totally cripples the ability to report OS X bugs.

Adjusting title since it's confirmed for Safari 6 and 7.
Comment 6 Jorendc 2013-12-10 16:39:34 UTC
*** Bug 72570 has been marked as a duplicate of this bug. ***
Comment 7 Jorendc 2013-12-10 16:40:55 UTC
Bug 72570 reports the same behavior using Google Chrome on Linux. Marking as platform 'All'
Comment 8 Robinson Tryon (qubit) 2013-12-10 17:57:25 UTC
Update summary per current repro status
Comment 9 Julien Nabet 2013-12-10 18:33:16 UTC
About bugzilla.js, line 18, we've got this:
        // This function calls the XMLRPC-function.
        // Returns the data or throws an error.
call: function(method, parameters = null, async = false, returnFunction = null) {

But default value arguments seems to be in ECMAScript 6 which isn't supported by Chrome and Safari for the moment.

See:
- http://ariya.ofilabs.com/2013/02/es6-and-default-argument.html
- http://stackoverflow.com/questions/14657117/do-function-arguments-support-a-default-value-in-javascript
Comment 10 Robinson Tryon (qubit) 2013-12-10 18:40:10 UTC
Regarding syntax of default params to javascript functions:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/default_parameters

Looks like only Firefox supports default params like this:

function(method, parameters = null, async = false, returnFunction = null) {
...
}

Everyone supports
function(method, parameters, async, returnFunction) {
params = params || null;
// etc...
...
}
 
I'm working up a patch right now for this.

Bigger Picture: Perhaps we should have a testing policy whenever we update the BSA?

Really simple testing policy:
1) Test in FF
2) Test in Chromium or Chrome
3) Test in Safari
4) Test on at least 2 of Win, Mac, GNU/Linux
Comment 11 Julien Nabet 2013-12-10 18:42:05 UTC
Michael: just in case if Rob is unavailable and/or busy, do you know who may help here?
Comment 12 Robinson Tryon (qubit) 2013-12-10 19:19:52 UTC
(In reply to comment #10)
>  
> I'm working up a patch right now for this.

https://github.com/colonelqubit/www-bugassistant/commit/856d69a5ce496addd1753b1a3982e2b35bdd8453

commit 856d69a5ce496addd1753b1a3982e2b35bdd8453
Author: Robinson Tryon <qubit@runcibility.com>
Date:   Tue Dec 10 13:47:32 2013 -0500

    fdo#7249 - Fix syntax for optional function params
    
    Only FireFox currently supports the PHP/Python/etc... syntax for
    referencing optional javascript function arguments:
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/default_parameters
    
    https://bugs.freedesktop.org/show_bug.cgi?id=72497


Testing w/joren right now.

> Bigger Picture: Perhaps we should have a testing policy whenever we update
> the BSA?
> 
> Really simple testing policy:
> 1) Test in FF

done

> 2) Test in Chromium or Chrome

done

> 3) Test in Safari

done

> 4) Test on at least 2 of Win, Mac, GNU/Linux

done  :-)
Comment 13 Julien Nabet 2013-12-10 19:29:44 UTC
(In reply to comment #12)
> (In reply to comment #10)
> >  
> > I'm working up a patch right now for this.
> 
> https://github.com/colonelqubit/www-bugassistant/commit/
> 856d69a5ce496addd1753b1a3982e2b35bdd8453

Sorry Ron about my previous comment! I hadn't matched in my mind your name and your pseudo! (stupid me! :-))
Comment 14 Robinson Tryon (qubit) 2013-12-10 19:30:32 UTC
(In reply to comment #11)
> Michael: just in case if Rob is unavailable and/or busy, do you know who may
> help here?

Patch written. Tested w/Joren. Site updated. Email sent:
http://lists.freedesktop.org/archives/libreoffice-qa/2013-December/006149.html

:-)
Comment 15 Robinson Tryon (qubit) 2013-12-10 19:43:39 UTC
Resolved and fixed.
Comment 16 Jorendc 2013-12-10 19:47:08 UTC
Verified using Mac OSX 10.9 with Safari 7.0.

Thanks Qubit :)!
Comment 17 Julien Nabet 2013-12-10 20:25:30 UTC
Ok for me too, thank you ! :-)
Comment 18 Julien Nabet 2013-12-10 20:26:32 UTC
Verified then
Comment 19 Julien Nabet 2013-12-10 20:26:50 UTC
And finally closed.
Comment 20 retired 2013-12-10 21:24:34 UTC
Awesome. Thanks to all involved and the super-fast fix. Very happy to see this working :)