[Twisted-Python] Broken Javascript on https://twistedmatrix.com ?

Tom Most twm at freecog.net
Thu Sep 17 15:14:10 MDT 2020


Access-Control-Allow-Origin is a header that would need to be set on PayPal/Flattr's side. 

They may have newer versions of these buttons that permit hotlinking, but the best solution is probably to host the images locally. That's what's best for performance of the page because you avoid extra DNS resolutions and can reuse the connection(s) used to load the rest of the page.

---Tom

On Thu, Sep 17, 2020, at 12:47 PM, Craig Rodrigues wrote:
> Doing a force refresh in my browser fixed it.  I can now click on *Publish/Subscribe* and switch the tab.
> 
> I'm still seeing these errors which is causing the Paypal and Flattr gif's not to load:
> 
> Access to image at 'https://www.paypalobjects.com/en_US/i/scr/pixel.gif' from origin 'https://twistedmatrix.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
> (Access to image at 'https://button.flattr.com/flattr-badge-large.png' from origin 'https://twistedmatrix.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
> 
> I'm not familiar with CORS, so don't know what the proper fix for this is.
> 
> Thanks for fixing this.
> --
> Craig
> 
> 
> 
> 
> On Thu, Sep 17, 2020 at 11:55 AM Glyph <glyph at twistedmatrix.com> wrote:
>> This is the JS that I specifically changed, which is no longer being served by twistedmatrix.com, so just likeā€¦ reload harder, or something.  Clear your cookies, zap your caches, restart your browser, repent of your sins, etc.  Maybe repent before clearing the caches so you don't have any cached sins either.
>> 
>> If you want to work on this yourself, we do have *something* of a local staging infrastructure set up with... vagrant, I think?, but I haven't tried it.  If you want to test your changes in developmestuction, check out braid, edit the HTML and JS in t-web, push to master, and then `fab config.production t-web.update`.
>> 
>> Good luck,
>> 
>> -g
>> 
>> P.S.: braid still requires python2, so anybody enthusiastic about python3 porting is encouraged to take a look at it :-).
>> 
>>> On Sep 17, 2020, at 8:37 AM, Craig Rodrigues <rodrigc at crodrigues.org> wrote:
>>> 
>>> Thanks for looking into this.  Now I am seeing this error on the https://twistedmatrix.com :
>>> 
>>> jsapi?key=ABQIAAAAJE-f7vmwI1-jxkmwRe4lUxTAs18ELyhzmLGaHoc1qJwmpJy3zhR3LMRRdwqg5PSY4tnVO684msUklQ:136 Uncaught Error: Must call google.charts.load before google.charts.setOnLoadCallback
>>>     at Object.J.R [as setOnLoadCallback] (jsapi?key=ABQIAAAAJE-f7vmwI1-jxkmwRe4lUxTAs18ELyhzmLGaHoc1qJwmpJy3zhR3LMRRdwqg5PSY4tnVO684msUklQ:136)
>>>     at twisted.js:92
>>> jsapi?key=ABQIAAAAJE-f7vmwI1-jxkmwRe4lUxTAs18ELyhzmLGaHoc1qJwmpJy3zhR3LMRRdwqg5PSY4tnVO684msUklQ:141 Uncaught Error: Module "feeds" is not supported.
>>>     at jsapi?key=ABQIAAAAJE-f7vmwI1-jxkmwRe4lUxTAs18ELyhzmLGaHoc1qJwmpJy3zhR3LMRRdwqg5PSY4tnVO684msUklQ:141
>>> 
>>> 
>>> Where is that coming from?
>>> 
>>> 
>>> --
>>> Craig
>>> 
>>> On Wed, Sep 16, 2020 at 11:28 PM Glyph <glyph at twistedmatrix.com> wrote:
>>>> We were depending on some Google APIs that were disabled a really long time ago, so I pushed & deployed this commit <https://github.com/twisted-infra/braid/commit/1df63c5d8b44e079487be2f0bf099108a77872e5> to get the front page back to working.
>>>> 
>>>> -g
>>>> 
>>>>> On Sep 16, 2020, at 2:53 PM, L. Daniel Burr <ldanielburr at me.com> wrote:
>>>>> 
>>>>> Hi Craig,
>>>>> 
>>>>> No error is being emitted to the console when you click on a tab.  There are some cross-origin script failures being logged, and Firefox blocked google urchin, which causes some more error messages.
>>>>> 
>>>>> As far as I can tell, the JS code that is supposed to hook up the clicking of the tab (an anchor tag with a relative href) is not being executed, either because it is being blocked by the browser, or as a side-effect of other things being blocked.
>>>>> 
>>>>> Hope this helps,
>>>>> 
>>>>> Daniel
>>>>> --
>>>>> L. Daniel Burr
>>>>> ldanielburr at me.com
>>>>> (312) 656-8387
>>>>> 
>>>>>> On Sep 16, 2020, at 4:36 PM, Craig Rodrigues <rodrigc at crodrigues.org> wrote:
>>>>>> 
>>>>>> If I go to https://twistedmatrix.com and click on
>>>>>> one of the tabs in the *Code Examples* section,
>>>>>> such as *Publish/Subscribe*, the tab does not switch.
>>>>>> 
>>>>>> This looks like a Javascript problem.  Does anyone with knowledge
>>>>>> of Javascript have an idea what the problem is?
>>>>>> 
>>>>>> --
>>>>>> Craig
>>>>>> _______________________________________________
>>>>>> Twisted-Python mailing list
>>>>>> Twisted-Python at twistedmatrix.com
>>>>>> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>>>> 
>>>>> _______________________________________________
>>>>> Twisted-Python mailing list
>>>>> Twisted-Python at twistedmatrix.com
>>>>> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>>> 
>>>> _______________________________________________
>>>> Twisted-Python mailing list
>>>> Twisted-Python at twistedmatrix.com
>>>> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>> _______________________________________________
>>> Twisted-Python mailing list
>>> Twisted-Python at twistedmatrix.com
>>> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>> 
>> _______________________________________________
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
>> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20200917/c1313868/attachment.htm>


More information about the Twisted-Python mailing list