Thank-you
]]>I have added some CSP headers for my page and wanted to avoided enabeling ‘unsafe-inline’ for script-src. If i leave the unsafe-inline option out in my evolve theme i get error messages due not executed functions e.g. to missing variables (Uncaught ReferenceError: evolve_js_local_vars is not defined) which seem to be implemented as an inline script in the evolve theme.
Do you have any advise for me how i can used the evolve theme but still have hte unsafe-inline option disabled?
Thank you very much
]]>I’m using the combined JS optimization on my site and I noticed that LSCWP is creating a unique combined JS for every post. These files are taking a lot of space, approx. 200MB.
I’ve checked the docs here, and I’ve managed to narrow down the issue is being caused by an inline script from Antispam Bee.
The script generates a unique ID for each comment form which causes LSCWP to generate a unique combined JS for all posts. Example of script from a post:
<script data-noptimize type="text/javascript">document.getElementById("comment").setAttribute( "id", "<strong>ae78e638defdf0472bf1c5230c38f1f9</strong>" );document.getElementById("b6f07f75fd").setAttribute( "id", "comment" );</script>
I found a thread detailing a similar issue but on a different plugin (Autoptimize). Presumably that was resolved by excluding the script using the attribute data-noptimize that’s in the script.
Excluding this attribute does not work with LSCWP as it uses data-no-optimize=”1″ instead. Is there any other way I can exclude this script seeing it has no query string I can use?
]]>This is the error that occurred in the latest version.
—–
wpp.min.js?ver=5.2.2:1 WPP: Couldn’t read JSON data
WordPress: 5.5
WordPress Popular Posts: 5.2.2
Theme: Twenty Twenty
—–
OK
WordPress 5.5
WordPress Popular Posts: 5.1
Theme: Twenty Twenty
—–
OK
WordPress 5.4.1
WordPress Popular Posts: 5.2.2
Theme: Twenty Twenty
—–
Thank you.
]]>I upgraded to WordPress 5.5. last night and the AJAX loading of posts stopped working. I have it disabled now and the Popular posts widget in the sidebar now loads: https://www.bamapolitics.com
The template is custom built by me on Bootstrap and is pretty straight forward. Any suggestions?
Link to error: https://imgur.com/K0pKWCi
]]>Uncaught SyntaxError: Unexpected token ':'
at eval (<anonymous>)
at jquery.js?ver=1.12.4-wp:2
at Function.globalEval (jquery.js?ver=1.12.4-wp:2)
at HTMLScriptElement.<anonymous> (ajax.min.js?ver=5.4.2:1)
at Function.each (jquery.js?ver=1.12.4-wp:2)
at a.fn.init.each (jquery.js?ver=1.12.4-wp:2)
at slideInNewPage (ajax.min.js?ver=5.4.2:1)
at d (ajax.min.js?ver=5.4.2:1)
at Object.success (ajax.min.js?ver=5.4.2:1)
at i (jquery.js?ver=1.12.4-wp:2)
(anonymous) @ jquery.js?ver=1.12.4-wp:2
globalEval @ jquery.js?ver=1.12.4-wp:2
(anonymous) @ ajax.min.js?ver=5.4.2:1
each @ jquery.js?ver=1.12.4-wp:2
each @ jquery.js?ver=1.12.4-wp:2
slideInNewPage @ ajax.min.js?ver=5.4.2:1
d @ ajax.min.js?ver=5.4.2:1
success @ ajax.min.js?ver=5.4.2:1
i @ jquery.js?ver=1.12.4-wp:2
fireWith @ jquery.js?ver=1.12.4-wp:2
x @ jquery.js?ver=1.12.4-wp:4
c @ jquery.js?ver=1.12.4-wp:4
XMLHttpRequest.send (async)
send @ jquery.js?ver=1.12.4-wp:4
ajax @ jquery.js?ver=1.12.4-wp:4
loadResource @ ajax.min.js?ver=5.4.2:1
onLinkClicked @ ajax.min.js?ver=5.4.2:1
(anonymous) @ ajax.min.js?ver=5.4.2:1
dispatch @ jquery.js?ver=1.12.4-wp:3
r.handle @ jquery.js?ver=1.12.4-wp:3
VM2160 {"sampling_active":0,"sampling_rate":100,"ajax_url":"https:\/\/facilrk.com.br\/wp-json\/wordpress-popular-posts\/v1\/popular-posts","ID":221,"token":"a2d6e13b2c","lang":0,"debug":0}
Debug info:
Plugin Configuration
Performance Nag: Inactive
Log Limit: No
Log Views From: Everyone
Data Caching: Yes, 1 minute
Data Sampling: No
External object cache: No
WPP_CACHE_VIEWS: No
System Info
PHP version: 7.1.24
PHP extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, mbstring, mcrypt, mysqli, odbc, standard, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, SourceGuardian, ionCube Loader
Database version: 5.6.41-84.1
InnoDB availability: YES
WordPress version: 5.4.2
Multisite: No
Active plugins: Advanced Ads 1.18.0, Advanced CF7 DB 1.7.2, Advanced post slider 2.5.1, Classic Editor 1.5, Contact Form 7 5.2, Envato Market 2.0.3, Google Analytics Dashboard for WP (GADWP) 6.1.0, Post Grid by PickPlugins 2.0.69, Qode Instagram Widget 1.2.1, Qode Twitter Feed 1.1, SiteOrigin Widgets Bundle 1.17.0, Slider Revolution 5.4.8, Social Media and Share Icons (Ultimate Social Media) 2.5.7, WordPress Importer 0.7, WordPress Popular Posts 5.2.2, WPBakery Page Builder 5.6, WP File Manager 6.5, WP Mail SMTP 2.2.1
Theme: Bridge (17.2) by Qode Interactive
Navigation works when I disable the plugin
]]>Is there any chance Fast Velocity Minify could exclude application/json
scripts from the minification process?
WordPress Popular Posts version 5.2 injects a application/json
script into <head>
that contains a JSON string, for example:
<script type="application/json" id="wpp-json"
{"sampling_active":0,"sampling_rate":"100","ajax_url":"https:\/\/www.example.com\/wp-json\/wordpress-popular-posts\/v1\/popular-posts","ID":false,"token":"a787dd82b4","lang":null,"debug":true}
</script>
When Fast Velocity Minify is active, this inline application/json
script is apparently bundled with the rest of the minified code, breaking WordPress Popular Posts’ ability to track pageviews, load widgets, etc.
application/json
script tags should be safe to ignore as the browser doesn’t execute any code (they’re just JSON strings) and won’t load (external) JS files either.
Other solutions I tested (like Autoptimize) do seem to ignore these <script type="application/json">...</script>
tags so I’m hoping you could implement this as well.
Thanks in advance!
]]>hyphenator_hook()
(in hyphenator/plugin.php
) loads the initialization script. It would be very useful to make $hyphenatorConfig
filterable (something like apply_filters( 'hyphenator_config, $hyphenatorConfig );
). This would allow developers to extend/change the configuration easily and would make requests like this one from @opticaldreams4u possible.
Also, you should use wp_add_inline_script()
.
Thanks!
]]>In the footer is loaded multiple scripts from external files and the most terrible – inline script directly into the page source code.
Please put inline script in a separate file! And if you can apply the merge scripts into one, for example, using the minify library (can be optional). Thanks!
https://www.ads-software.com/plugins/syntaxhighlighter/
]]>