- This topic has 3 replies, 3 voices, and was last updated 4 years, 4 months ago by Tom.
-
AuthorPosts
-
November 25, 2019 at 10:40 pm #1077377Lilia
Dear GeneratePress Team,
recently i got the following errors
https://validator.w3.org/nu/?doc=https://www.eu-rights.com/“A script element with a src attribute must not have a type attribute whose value is anything other than the empty string, a JavaScript MIME type, or module.”
<script type=”639d96b90d2f2cf2eac55d1e-text/javascript” defer src=’https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’>
<script type=”639d96b90d2f2cf2eac55d1e-text/javascript” defer src=”https://www.eu-rights.com/wp-content/cache/autoptimize/js/autoptimize_85d7577838028ed016043e03a0c8bdef.js”>
Do you have any idea how I can straighten this error info?
Thank you in advance for your efforts.
liliNovember 26, 2019 at 4:42 am #1077736DavidStaffCustomer SupportHi there,
did you fix this as i am not seeing the error in the Validator?
November 26, 2019 at 6:44 am #1077896LiliaHy, Tom, Autoptimize brake allot of Code ;/
for all autoptimize user !!
for any Mobile Menu Problems!
Exclude CSS from Autoptimize:wp-content/cache/, wp-content/uploads/, /wp-content/plugins/mobile-menu/, admin-bar.min.css, dashicons.min.css, /wp-includes/css/dist/block-library/editor.min.css
Exclude scripts from Autoptimize:
seal.js, js/jquery/jquery.js, wp-content/themes/generatepress/js/menu.min.jsEnd you need!
autoptimize filter !
add_filter(‘autoptimize_html_after_minify’, function($content) {
$site_url = ‘https://eu-rights.com’;
$content = str_replace(“type=’text/javascript'”, ‘ ‘, $content);
$content = str_replace(‘type=”text/javascript”‘, ‘ ‘, $content);$content = str_replace(“type=’text/css'”, ‘ ‘, $content);
$content = str_replace(‘type=”text/css”‘, ‘ ‘, $content);$content = str_replace($site_url . ‘/wp-includes/js’, ‘/wp-includes/js’, $content);
$content = str_replace($site_url . ‘/wp-content/cache/autoptimize’, ‘/wp-content/cache/autoptimize’, $content);
$content = str_replace($site_url . ‘/wp-content/themes/’, ‘/wp-content/themes/’, $content);
$content = str_replace($site_url . ‘/wp-content/uploads/’, ‘/wp-content/uploads/’, $content);
$content = str_replace($site_url . ‘/wp-content/plugins/’, ‘/wp-content/plugins/’, $content);
return $content; }, 10, 1);after this codes was everythink normaly !
and now : Document checking completed. No errors or warnings to show. https://validator.w3.org/nu/?doc=https://www.eu-rights.com/
for https://www.eu-rights.com/ and for https://www.betreuer24.com/
After Generatpress update I was to fix the bugs with these codes ๐
dear Tom many thanks for your massage
November 26, 2019 at 5:41 pm #1078863TomLead DeveloperLead DeveloperHi there,
Autoptimize should work pretty much out of the box with GP. Here’s a look at the options we use frequently: https://generatepress.com/fastest-wordpress-theme/
Glad you got everything working on your end ๐
-
AuthorPosts
- You must be logged in to reply to this topic.