Marcus
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Store “core/interface” is already registeredOkay i will do
I hope u help that, i fix your script and my issues is resolved
In new update 9.2.2 – is not fixed( lol…
This is own fix i do for 2min
/**
* Update script tag.
* The vue code needs type=module.
*/
public function script_loader_tag( $tag, $handle, $src ) {
if ( ! in_array( $handle, $this->own_handles ) ) {
return $tag;
}
// Check if the 'monsterinsights-vue-frontend' script is the target
if ( 'monsterinsights-vue-frontend' === $handle ) {
// Remove any existing type attribute
$tag = str_replace( 'text/javascript', 'module', $tag );
}
// Change the script tag by adding type="module" and return it.
$html = str_replace( '></script>', ' type="module"></script>', $tag );
$domain = monsterinsights_is_pro_version() ? 'ga-premium' : 'ga-premium';
$html = monsterinsights_get_printable_translations( $domain ) . $html;
return $html;
}+ New bug in Dashboard WordPress
Error: attribute d: Expected number, "M e -16 6 A -6 -6 …".
TypeError: t.tablePrepareColumnItems is not a function
at ReportReAuthBug Report: Conflict in Script Tag Type Modification for Module Scripts
Description:
During independent testing, a bug was identified involving the function
public function script_loader_tag( $tag, $handle, $src )located inadmin-assets.php. This function is intended to set specific scripts as modules by modifying the<script>tag. However, an issue was observed, where despite modifications from the filter, the<script>tag’s type remains astext/javascriptinstead ofmodule.Log results indicate that the filter correctly applies changes to the
<script>tag. Nevertheless, the script type is not updated tomodulebecause an existingtype="text/javascript"attribute is likely predefined, either within the plugin code or influenced by browser behavior. Consequently, for the filejs/frontend.min.js, the script type remains incorrect, causing the module-based script not to load as intended.Proposed Solution:
To address this issue temporarily, I suggest modifying the function in
admin-assets.phpunder the path/wp-content/plugins/google-analytics-for-wordpress/includes/adminas follows:/** * Update script tag. * The vue code needs type=module. */ public function script_loader_tag( $tag, $handle, $src ) { if ( ! in_array( $handle, $this->own_handles ) ) { return $tag; } // Check if the 'monsterinsights-vue-frontend' script is the target if ( 'monsterinsights-vue-frontend' === $handle ) { // Remove any existing type attribute $tag = preg_replace( '/\stype="[^"]+"/', '', $tag ); } // Change the script tag by adding type="module" and return it. $tag = str_replace( '></script>', ' type="module"></script>', $tag ); $domain = monsterinsights_is_pro_version() ? 'ga-premium' : 'ga-premium'; $tag = monsterinsights_get_printable_translations( $domain ) . $tag; return $tag; }This modification removes the
type="text/javascript"attribute and correctly setstype="module". It temporarily resolves the console errors and ensures proper functionality of the plugin. We hope the development team can review and implement a permanent fix to detect and set the correct module type without conflict.Impact:
This issue affects both the Pro and Lite versions of the plugin, preventing the script and its dependencies from executing correctly.
Results After the Fix:
- Pro Version:
<script src="DEMOSITE/wp-content/plugins/google-analytics-premium/pro/assets/vue/js/frontend.min.js?ver=9.2.1" id="monsterinsights-vue-frontend-js" type="module"></script> - Lite Version:
<script src="DEMOSITE/wp-content/plugins/google-analytics-for-wordpress/lite/assets/vue/js/frontend.min.js?ver=9.2.1" id="monsterinsights-vue-frontend-js" type="module"></script>
The
monsterinsights-vue-frontendscript is set with the typetext/javascript, likely due to the following reasons:- Lack of initial check for type in the
script_loader_tagfunction: The MonsterInsights plugin might explicitly settext/javascriptfor all scripts if the type was not previously modified. Thescript_loader_tagfunction may trigger after the type has already been set. - Conflicts with
wp_enqueue_script(): If the script is registered with the standard WordPress functionwp_enqueue_script()or a similar method without thetype="module"attribute, WordPress will automatically apply thetext/javascripttype.
the
monsterinsights-vue-frontendscript is registered in google-analytics-premium/includes/frontend/frontend.phpusing thewp_register_script()andwp_enqueue_script()functions:wp_register_script( 'monsterinsights-vue-frontend', $frontend_js_url, array( 'wp-i18n' ), monsterinsights_get_asset_version(), true );
wp_enqueue_script( 'monsterinsights-vue-frontend' );It’s important to note that the
wp_register_script()andwp_enqueue_script()functions do not set thetypeattribute, so by default, WordPress addstype="text/javascript".This second solution:
* Update script tag.
* The vue code needs type=module.
*/
public function script_loader_tag( $tag, $handle, $src ) {
if ( ! in_array( $handle, $this->own_handles ) ) {
return $tag;
}
// Check if the 'monsterinsights-vue-frontend' script is the target
if ( 'monsterinsights-vue-frontend' === $handle ) {
// Remove any existing type attribute
$tag = str_replace( 'text/javascript', 'module', $tag );
}
// Change the script tag by adding type="module" and return it.
$html = str_replace( '></script>', ' type="module"></script>', $tag );
$domain = monsterinsights_is_pro_version() ? 'ga-premium' : 'ga-premium';
$html = monsterinsights_get_printable_translations( $domain ) . $html;
return $html;
}I hope this helps the development team address this critical issue. Thank you!
Hello. I have too error on Frontend side with this “Import Module”
The error “Uncaught SyntaxError: Cannot use import statement outside a module” occurs when a JavaScript file with
importstatements is loaded in a context that doesn’t support ES6 module syntax (also known as ECMAScript 2015). This can happen with files likefrontend.min.jsif they are loaded without specifying the module type.Subject: JavaScript Module Loading Issue:
Uncaught SyntaxError: Cannot use import statement outside a moduleDescription: I’m encountering an error in
frontend.min.jsin the plugin directory (/wp-content/plugins/google-analytics-premium/pro/assets/vue). When attempting to load this file, I receive the following error in the console:javascript
Copy code
Uncaught SyntaxError: Cannot use import statement outside a module (at frontend.min.js?ver=9.2.1:1:1)Steps to Reproduce:
- Load the page where
frontend.min.jsis used. - Observe the console error.
Expected Behavior: The JavaScript file should load without errors, and all module imports should be properly handled.
Observed Behavior: The
importstatements infrontend.min.jsare throwing an error because the file is not recognized as a module.Details: This issue typically occurs when JavaScript files with
importstatements are loaded without the necessarytype="module"attribute, which is required for ES6 modules. Here is a relevant configuration snippet frommanifest.json:You must add script how <script type=”module” but you add him how <script type=”text/javascript”..
When a client downloads files, for example, products for download from WooCommerce, and the file is remote on Google Drive, the browser does not receive the download size. This means that the client is downloading the file with a question mark until the file is fully downloaded and does not see the final file size until the download is complete. This issue occurs because the Content-Length is not passed to the browser, so it does not know the size of the file being downloaded. Is it possible to add a feature that first retrieves the file size from Google Drive and then includes it in the headers during the download? This happens only when the download works directly without redirecting to Google Drive.
Forum: Fixing WordPress
In reply to: Issue with YouTube Embed Block in Gutenberg EditorOkay
Will try find solution for this
Forum: Fixing WordPress
In reply to: Issue with YouTube Embed Block in Gutenberg EditorIn firefox latest
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://googleads.g.doubleclick.net/pagead/viewthroughconversion/962985656/?backend=innertube&cname=56&cver=20240902&foc_id=aS-igVSTyhIQopJHsWJN_A&label=followon_view&ptype=no_rmkt&random=143700614&cv_attributed=0. (Reason: CORS request did not succeed). Status code: (null).
In opera latest after tap play buttn YouTube
Forum: Fixing WordPress
In reply to: Issue with YouTube Embed Block in Gutenberg EditorThis is issues on any website where is YouTube video added via block YouTube Embed Block..
https://heavyocity.com/2-hour-cues-episode-9-writing-a-supervillain-theme/
Forum: Fixing WordPress
In reply to: Issue with YouTube Embed Block in Gutenberg EditorInstalled: PHP 8.3.11 + NGINX + APACHE
WordPress 6.6.1 and Browser Opera 113.0.5230.55
Please add to to filter
// This Allow Lang Tag from XSL
$allowedposttags['html'] = array(
'lang' => array(),
);<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>XML Sitemap</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="This file was dynamically generated using the WordPress content management system and XML Sitemap Generator for Google by Auctollo." />This will be resolved BING
WARNING : Meta Language tag missing
What is the issue about?
The page is missing meta language information. The Meta Language information is used as a hint to help us understand the intended language and country/region the page content applies to. This can help if your site is not hosted in the country/region. Use the “content-language” meta tag to embed the culture code in the <head> section of your page. For example, <meta http-equiv=’content-language’ content=’en-gb’> indicates that the page is in English and intended for the the United Kingdom. Alternatively, you can use <html lang=’en-gb’> or <title lang=’en-gb’ />.
THIS IS FIXED VERSION WITH ALL FIXES: XSL + Core.php
Download 4.1.21 Fixed: https://www.transfernow.net/dl/20240807XoPXNMYs
Changes
$allowedposttags['meta'] = array( 'name' => array(), 'content' => array(), 'http-equiv' => array(), ); $allowedposttags['html'] = array( 'lang' => array(), );XSL
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> and <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="This file was dynamically generated using the WordPress content management system and XML Sitemap Generator for Google by Auctollo." /><html xmlns="http://www.w3.org/1999/xhtml" lang="en"> andIssue Description:
After testing the HTML version of the sitemap, it was observed that meta tags are not included in the final HTML document. This omission results in errors when checked by search engines, particularly Bing, which reports missing meta tags such as
<meta name="description">.Proposed Solution:
To resolve this issue, support for essential meta tags needs to be added to the XSL template used for converting XML to HTML, and a line of code should be added to the
sitemap-core.phpfile to ensure meta tags are correctly handled.Steps to Implement the Solution:
- Update the XSL Template File:
Ensure that your XSLT template (sitemap.xsl) includes rules for including meta tags. This will ensure that meta tags are preserved during the XML to HTML transformation. - Update the
sitemap-core.phpFile:
Add the line$allowedposttags['meta'] = $allowed_atts;to support meta tags in the HTML output. You can add this line in the part of the code that processes HTML. Here is how to do it:
// Add this line to your code insitemap-core.php$allowedposttags['meta'] = $allowed_atts;This change will allow
wp_ksesto handle meta tags and include them in the final HTML output.Additional Information:
Add this [] array to core
$allowedposttags['meta'] = array(
'name' => array(),
'content' => array(),
'http-equiv' => array(),
);Ensure that these changes are applied and that the HTML version of the sitemap now includes the meta tags. This will help prevent errors during checks by search engines like Bing.
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] CSS trafic script hackThis style add Opera (Chrome Ad_Block)
Please add lang=”en” too <html xmlns=”http://www.w3.org/1999/xhtml” lang=”en”>
for more supporting BING
WARNING : The META Language tag is missing
What is the problem?
There is no meta information about the language on the page. Metalanguage information is a hint that helps us determine the language and country/region for which a page’s content is intended. This information may be useful if your site is hosted outside of the country/region. The content-language meta tag allows you to embed the country/region code in the section of your page. For example, indicates that this is an English page for the United Kingdom. You can also use or tag.</p> - Pro Version: