You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Richard Downer <ri...@apache.org> on 2014/12/01 14:01:31 UTC

Help required - ZeroClipboard in jsgui

Hello all,

I've been trying to remove the ZeroClipboard.swf file from the jsgui
project. My intention is to replace it with a CDN-hosted version, such
as http://cdnjs.com/libraries/zeroclipboard.

However my attempts have all ended in failure. I replace the
references to ZeroClipboard.swf with the CDN-based URL, and
copy-to-clipboard stops working. The Javascript console is showing a
failure inside ZeroClipboard.js which I cannot explain.

I'm not a Javascript expert so I don't really know how to debug this.
Could I hand it over to one of the jsgui experts?

Thanks

Richard.

Re: Help required - ZeroClipboard in jsgui

Posted by Richard Downer <ri...@apache.org>.
For those who are looking for more details: you can see the diff I made here:
https://paste.apache.org/8uKg

Note that this uses '//' URLs (i.e. non-specific protocol) but when I
explicitly used 'https://' it still didn't work.

The mode of failure is a message "Unknown Exception" in the Javascript
console. This is in the ZeroClipboard.js file and *appears* to be at
the point of a call which crosses the boundary into the Flash movie.

Richard.


On 1 December 2014 at 13:01, Richard Downer <ri...@apache.org> wrote:
> Hello all,
>
> I've been trying to remove the ZeroClipboard.swf file from the jsgui
> project. My intention is to replace it with a CDN-hosted version, such
> as http://cdnjs.com/libraries/zeroclipboard.
>
> However my attempts have all ended in failure. I replace the
> references to ZeroClipboard.swf with the CDN-based URL, and
> copy-to-clipboard stops working. The Javascript console is showing a
> failure inside ZeroClipboard.js which I cannot explain.
>
> I'm not a Javascript expert so I don't really know how to debug this.
> Could I hand it over to one of the jsgui experts?
>
> Thanks
>
> Richard.

Re: Help required - ZeroClipboard in jsgui

Posted by Richard Downer <ri...@apache.org>.
All,

Mystery solved - a combination of two things:
1: Google Chrome seemingly was loading from the cache, even when I did
a deliberate reload, and even when I told it to clear its caches
2: I hadn't installed the standalone Flash player, so it was
permanently broken in Firefox and Safari

That should be this issue unblocked, so I'll kickstart the release
process again shortly.

Richard.


On 8 December 2014 at 11:10, Richard Downer <ri...@apache.org> wrote:
> Svet,
>
> No luck for me - using this branch, copy&paste is broken in Chrome,
> Firefox and Safari (all on Mac)
>
> All,
>
> Could somebody else try to reproduce from Svet's branch?
>
> Thanks
> Richard.
>
>
> On 2 December 2014 at 10:54, Svetoslav Neykov
> <sv...@cloudsoftcorp.com> wrote:
>> Hi Richard,
>> I made another try at using the hosted version, this time it's working without any issues. Probably was using the wrong version last time.
>>
>> Could you try the changes at https://github.com/apache/incubator-brooklyn/pull/371. Works fine for me, with the exception of browsers with disabled flash (where it silently fails).
>>
>> Svet.
>>
>> -----Original Message-----
>> From: Richard Downer [mailto:richard@apache.org]
>> Sent: Monday, December 1, 2014 7:21 PM
>> To: Brooklyn dev
>> Subject: Re: Help required - ZeroClipboard in jsgui
>>
>> Thanks Svet. One thing to note is that I kept using the same version of ZeroClipboard - 1.3.1 - even though there are much newer versions available. Maybe a newer version will help? I did try the latest version but it did not work, but as you may have seen from some of my earlier messages I was getting very confused about what was being built at one stage, so maybe the mistake was on my side.
>>
>> Another alternative is to not keep ZeroClipboard.js either, and load both .js and .swf from the CDN. I'm not sufficiently familiar with require.js to be able to make this change myself...
>>
>> Richard.
>>
>>
>> On 1 December 2014 at 17:10, Svetoslav Neykov <sv...@cloudsoftcorp.com> wrote:
>>> Hi Richard,
>>> Tried using the remote URL and although I don't get JS errors the copy functionality stops working. The reason is cross-domain security restrictions applied by flash. According to the ZeroClipboard docs the code should auto-detect and deal with this but apparently it's not happening. I'll see if this can be fixed.
>>>
>>> Svet.
>>>
>>> -----Original Message-----
>>> From: Richard Downer [mailto:richard@apache.org]
>>> Sent: Monday, December 1, 2014 3:02 PM
>>> To: Brooklyn dev
>>> Subject: Help required - ZeroClipboard in jsgui
>>>
>>> Hello all,
>>>
>>> I've been trying to remove the ZeroClipboard.swf file from the jsgui project. My intention is to replace it with a CDN-hosted version, such as http://cdnjs.com/libraries/zeroclipboard.
>>>
>>> However my attempts have all ended in failure. I replace the references to ZeroClipboard.swf with the CDN-based URL, and copy-to-clipboard stops working. The Javascript console is showing a failure inside ZeroClipboard.js which I cannot explain.
>>>
>>> I'm not a Javascript expert so I don't really know how to debug this.
>>> Could I hand it over to one of the jsgui experts?
>>>
>>> Thanks
>>>
>>> Richard.
>>>
>>

Re: Help required - ZeroClipboard in jsgui

Posted by Richard Downer <ri...@apache.org>.
Svet,

No luck for me - using this branch, copy&paste is broken in Chrome,
Firefox and Safari (all on Mac)

All,

Could somebody else try to reproduce from Svet's branch?

Thanks
Richard.


On 2 December 2014 at 10:54, Svetoslav Neykov
<sv...@cloudsoftcorp.com> wrote:
> Hi Richard,
> I made another try at using the hosted version, this time it's working without any issues. Probably was using the wrong version last time.
>
> Could you try the changes at https://github.com/apache/incubator-brooklyn/pull/371. Works fine for me, with the exception of browsers with disabled flash (where it silently fails).
>
> Svet.
>
> -----Original Message-----
> From: Richard Downer [mailto:richard@apache.org]
> Sent: Monday, December 1, 2014 7:21 PM
> To: Brooklyn dev
> Subject: Re: Help required - ZeroClipboard in jsgui
>
> Thanks Svet. One thing to note is that I kept using the same version of ZeroClipboard - 1.3.1 - even though there are much newer versions available. Maybe a newer version will help? I did try the latest version but it did not work, but as you may have seen from some of my earlier messages I was getting very confused about what was being built at one stage, so maybe the mistake was on my side.
>
> Another alternative is to not keep ZeroClipboard.js either, and load both .js and .swf from the CDN. I'm not sufficiently familiar with require.js to be able to make this change myself...
>
> Richard.
>
>
> On 1 December 2014 at 17:10, Svetoslav Neykov <sv...@cloudsoftcorp.com> wrote:
>> Hi Richard,
>> Tried using the remote URL and although I don't get JS errors the copy functionality stops working. The reason is cross-domain security restrictions applied by flash. According to the ZeroClipboard docs the code should auto-detect and deal with this but apparently it's not happening. I'll see if this can be fixed.
>>
>> Svet.
>>
>> -----Original Message-----
>> From: Richard Downer [mailto:richard@apache.org]
>> Sent: Monday, December 1, 2014 3:02 PM
>> To: Brooklyn dev
>> Subject: Help required - ZeroClipboard in jsgui
>>
>> Hello all,
>>
>> I've been trying to remove the ZeroClipboard.swf file from the jsgui project. My intention is to replace it with a CDN-hosted version, such as http://cdnjs.com/libraries/zeroclipboard.
>>
>> However my attempts have all ended in failure. I replace the references to ZeroClipboard.swf with the CDN-based URL, and copy-to-clipboard stops working. The Javascript console is showing a failure inside ZeroClipboard.js which I cannot explain.
>>
>> I'm not a Javascript expert so I don't really know how to debug this.
>> Could I hand it over to one of the jsgui experts?
>>
>> Thanks
>>
>> Richard.
>>
>

RE: Help required - ZeroClipboard in jsgui

Posted by Svetoslav Neykov <sv...@cloudsoftcorp.com>.
Hi Richard,
I made another try at using the hosted version, this time it's working without any issues. Probably was using the wrong version last time.

Could you try the changes at https://github.com/apache/incubator-brooklyn/pull/371. Works fine for me, with the exception of browsers with disabled flash (where it silently fails).

Svet.

-----Original Message-----
From: Richard Downer [mailto:richard@apache.org] 
Sent: Monday, December 1, 2014 7:21 PM
To: Brooklyn dev
Subject: Re: Help required - ZeroClipboard in jsgui

Thanks Svet. One thing to note is that I kept using the same version of ZeroClipboard - 1.3.1 - even though there are much newer versions available. Maybe a newer version will help? I did try the latest version but it did not work, but as you may have seen from some of my earlier messages I was getting very confused about what was being built at one stage, so maybe the mistake was on my side.

Another alternative is to not keep ZeroClipboard.js either, and load both .js and .swf from the CDN. I'm not sufficiently familiar with require.js to be able to make this change myself...

Richard.


On 1 December 2014 at 17:10, Svetoslav Neykov <sv...@cloudsoftcorp.com> wrote:
> Hi Richard,
> Tried using the remote URL and although I don't get JS errors the copy functionality stops working. The reason is cross-domain security restrictions applied by flash. According to the ZeroClipboard docs the code should auto-detect and deal with this but apparently it's not happening. I'll see if this can be fixed.
>
> Svet.
>
> -----Original Message-----
> From: Richard Downer [mailto:richard@apache.org]
> Sent: Monday, December 1, 2014 3:02 PM
> To: Brooklyn dev
> Subject: Help required - ZeroClipboard in jsgui
>
> Hello all,
>
> I've been trying to remove the ZeroClipboard.swf file from the jsgui project. My intention is to replace it with a CDN-hosted version, such as http://cdnjs.com/libraries/zeroclipboard.
>
> However my attempts have all ended in failure. I replace the references to ZeroClipboard.swf with the CDN-based URL, and copy-to-clipboard stops working. The Javascript console is showing a failure inside ZeroClipboard.js which I cannot explain.
>
> I'm not a Javascript expert so I don't really know how to debug this.
> Could I hand it over to one of the jsgui experts?
>
> Thanks
>
> Richard.
>


Re: Help required - ZeroClipboard in jsgui

Posted by Richard Downer <ri...@apache.org>.
Thanks Svet. One thing to note is that I kept using the same version
of ZeroClipboard - 1.3.1 - even though there are much newer versions
available. Maybe a newer version will help? I did try the latest
version but it did not work, but as you may have seen from some of my
earlier messages I was getting very confused about what was being
built at one stage, so maybe the mistake was on my side.

Another alternative is to not keep ZeroClipboard.js either, and load
both .js and .swf from the CDN. I'm not sufficiently familiar with
require.js to be able to make this change myself...

Richard.


On 1 December 2014 at 17:10, Svetoslav Neykov
<sv...@cloudsoftcorp.com> wrote:
> Hi Richard,
> Tried using the remote URL and although I don't get JS errors the copy functionality stops working. The reason is cross-domain security restrictions applied by flash. According to the ZeroClipboard docs the code should auto-detect and deal with this but apparently it's not happening. I'll see if this can be fixed.
>
> Svet.
>
> -----Original Message-----
> From: Richard Downer [mailto:richard@apache.org]
> Sent: Monday, December 1, 2014 3:02 PM
> To: Brooklyn dev
> Subject: Help required - ZeroClipboard in jsgui
>
> Hello all,
>
> I've been trying to remove the ZeroClipboard.swf file from the jsgui project. My intention is to replace it with a CDN-hosted version, such as http://cdnjs.com/libraries/zeroclipboard.
>
> However my attempts have all ended in failure. I replace the references to ZeroClipboard.swf with the CDN-based URL, and copy-to-clipboard stops working. The Javascript console is showing a failure inside ZeroClipboard.js which I cannot explain.
>
> I'm not a Javascript expert so I don't really know how to debug this.
> Could I hand it over to one of the jsgui experts?
>
> Thanks
>
> Richard.
>

RE: Help required - ZeroClipboard in jsgui

Posted by Svetoslav Neykov <sv...@cloudsoftcorp.com>.
Hi Richard,
Tried using the remote URL and although I don't get JS errors the copy functionality stops working. The reason is cross-domain security restrictions applied by flash. According to the ZeroClipboard docs the code should auto-detect and deal with this but apparently it's not happening. I'll see if this can be fixed.

Svet.

-----Original Message-----
From: Richard Downer [mailto:richard@apache.org] 
Sent: Monday, December 1, 2014 3:02 PM
To: Brooklyn dev
Subject: Help required - ZeroClipboard in jsgui

Hello all,

I've been trying to remove the ZeroClipboard.swf file from the jsgui project. My intention is to replace it with a CDN-hosted version, such as http://cdnjs.com/libraries/zeroclipboard.

However my attempts have all ended in failure. I replace the references to ZeroClipboard.swf with the CDN-based URL, and copy-to-clipboard stops working. The Javascript console is showing a failure inside ZeroClipboard.js which I cannot explain.

I'm not a Javascript expert so I don't really know how to debug this.
Could I hand it over to one of the jsgui experts?

Thanks

Richard.