QWebEngine hinders github navigation by default - qt

I'm working on a web browser and without changing any QWebEngineSettings, github can't load the necessary javascript.
QWebEngines javascript output when visiting github
The Content-Security-Policy directive 'worker-src' is implemented behind a flag which is currently disabled.
Uncaught TypeError: this.toggleAttribute is not a function
Uncaught TypeError: this.toggleAttribute is not a function
Uncaught (in promise) ReferenceError: AbortController is not defined
...
And so on, I've tried setting
settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true);
And made sure they are enabled, yet without any success. Do anyone happen to know which security policy I have to change to make github work?

Upgrading from Qt 5.9.9 to 5.15.0 solved the issue.

Related

CRA precache fails because of .LICENSE extension

So, we have a situation where in production the precache is failing on our PWA because of a weird .LICENSE file on our server that is giving us 404
specifically an error like this
uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url"
How we can fix that?
Well, the fix is simple.
Our web-server returns only known file extensions, and .LICENSE is not one of them.
Just enable the ServeUnknownFileTypes flag on your StaticFileServer options info

Firebase works on custom web app but not on wordpress : Uncaught ReferenceError: firebase is not defined

I am trying to add my firebase project to my wordpress website (following the official documentation) but got Uncaught ReferenceError: firebase is not defined
I tried adding firebase, the same way, to a custom web app and it worked.
I added the code snippet provided by Firebase, in the body tag (as recommended by Google). You can check the code on the website : https://testing.myfprod.fr
It worked instantly on my custom web project but I am still getting the error Uncaught ReferenceError: firebase is not defined on wordpress.
Unfortunately I did not find an answer, in a previously asked question, that could solve my problem.
I found out that LSCache was configured to defer js script. I disabled this option and it now works.

call wp_enqueue_media on wordpress page

I am using a custom theme that when I access http://ec2-54-255-182-157.ap-southeast-1.compute.amazonaws.com/shop/ , it gives the error that
upload-media.js?ver=1:3 Uncaught TypeError: Cannot read property 'editor' of undefined
it happends at the code _orig_send_attachment = wp.media.editor.send.attachment;
some google search (like here https://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/
) suggests that "Above code snippet works on post edit page only, to make it work elsewhere you need to use wp_enqueue_media(); in your theme. Thanks to daviedR for correcting me on this."
Any idea how to do call wp_enqueue_media() on this page?
it turns out to be caused by mbstring is not enabled. After run yum install php56-mbstring and restart httpd service, it works good now.

Bug on Chrome while implementing gconnect module in drupal 7

i'm using this module to connect from Gmail to my site, it's working greate on firefox but on chrome the button (Sign in Using Google) is not appearing..
if i go to console, i found a javascript error on the file:
(http://localhost/mysite/sites/all/modules/gconnect/git-for-drupal.js?o) on the line 6:
Uncaught TypeError: Cannot read property 'config' of undefined
Also i am getting an error in Importer.js on line 2035: uncaught syntaxerror unexpected identifier
Please help in solving this issue, http://drupal.org/node/1807348
It happens in my drupal and i installed a Jquery update module link below, and change my jquery version it works great. I think default drupal jquery version is 1.4.
https://www.drupal.org/project/jquery_update
Also if you need use jquery's Browser function you have to add extra js to your file.
jQuery.browser() removed
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If you still need this function, you can get one js file from: https://github.com/gabceb/jquery-browser-plugin and link the js to your file.

Wordpress Uncaught SyntaxError: Unexpected Token Illegal

I have a local install of Wordpress running & I am suddenly getting these errors in my console:
Uncaught SyntaxError: Unexpected token ILLEGAL
media-upload.php:75Uncaught ReferenceError: jQuery is not defined
media-upload.php:89Uncaught ReferenceError: SWFUpload is not defined
media-upload.php:156Uncaught ReferenceError: jQuery is not defined
load-scripts.php:1Uncaught SyntaxError: Unexpected token ILLEGAL
Non-wordpress site's work fine and I've never had any issues like this before, it seems to be limited to Wordpress.
What I don't understand is that the modal window is being called and loading AJAX content, additionally all the transitions work in the rest of the Wordpress admin area.
Does anyone have any suggestions?
Thanks
I had a similar problem. Disable magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase in PHP administration console or php.ini. This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. You can also disable dynamic content compression with IIS administrative console. Then reset your browser cache.
I had this problem also, but clearing the browser, cache (Chrome) with SHIFT+F5 had reloaded the scripts and solved the problem.
Refresh the cache for every page where you encounter the problem.

Resources