- This topic has 17 replies, 2 voices, and was last updated 2 years, 9 months ago by Maarten.
-
AuthorPosts
-
April 23, 2020 at 7:43 pm #1252469Maarten
Dear support,
Normally when my homepage or any page I made is done, I view source to get the HTML code then copy and paste that into the following tool:
https://validator.w3.org/ and use the source option.9 out of 10 when it comes to WordPress I get the errors about not needing inline “type=” errors.
I know this is not an error of GeneratePress but WordPress code – Yes, I have made a post for them about this now for 3 times and they keep saying they will fix it but that was last told me 6 months ago. I have no time now to make a new post about this issue, maybe some time later as Tom gave me code to put in functions to remove all type=”….” lines from all the source code. It does use buffers so it might slow down first site load (no idea) but it does remove the errors.
When I run this code it will remove the errors and all HTML is 100% valid like it should be.
But since the theme update I also check all CSS created by GP in this tool for CSS check, and after the last update of GP or maybe it is the latest GP Premium version, I get errors.
Only 2 and some notices about not needed code for the browsers.
I do all these tests on my own server with no traffic before I deploy my website just to make sure my site is running as good and clean as it could be.
I know W3C is not that important for SEO but if one day it might be it would be nice to have someone look at the error.
As I am not at home or able to make a screenshot I hope this info could help.
Just open source and copy all data from – all.min.css from head block into W3C
https://jigsaw.w3.org/css-validator/It also gives the error when I do this with the code from GP homepage.
You can in the source code of your homepage just double click the mouse to have the whole line to CSS blue color and then press the middle mouse button to open this code in a new TAB. Then go to the next CSS line and do the same untill you get to <body> TAG. You do not need to check body, just the head-block that gets loaded before the body (hope this helps when someone like to check this as well)I have this even without GP Premium if I remember so could be in the code of GP theme.
Hope this helps!
Regards!
April 24, 2020 at 9:36 am #1253773TomLead DeveloperLead DeveloperHi there,
The
speak
error is fixed in GP 2.5.0 – is that the one you’re noticing?Let me know π
April 25, 2020 at 1:35 pm #1255528MaartenHello Tom,
Thanks for the reply. I made some screenshots that might help to show what I did.
They should be in correct order and uploaded them.
First image is the settings in GP that are activated fot the theme.
Not upgraded to version 10 yet.Link
I have to check if this image is to big, if not I will post more or just paste the direct link
Next is first found CSS code in Home selected
Paste into CSS validator
Result
Link
Next found CSS in Home selected
Paste into CSS validator
Result
Link
Next found CSS (See URL) selected
Past into CSS validator
Result (See this CSS 100% perfect)
Link
First found inline CSS in Home selected
Paste into CSS validator
Result (100% perfect)
Final found inline CSS in Home selected
Paste into CSS validator
Result (Again 100% perfect)
Link
Conclusion:
So, it seems to be this URL and CSS giving the following result
https://i.ibb.co/k5k3Lx1/002-1st-part.png
https://i.ibb.co/tZcDBNL/004-1st-part.pngAnd this URL CSS
https://i.ibb.co/1bBVKXM/005-2nd-part.png
https://i.ibb.co/GxXk086/007-2nd-part.pngHope this helps,
Regards!
April 25, 2020 at 5:43 pm #1255736TomLead DeveloperLead DeveloperHi there,
Those “errors” are just because W3C doesn’t recognize those old vendor prefixes. Those are necessary for older browsers as of right now, but we will be able to remove them eventually when more people ditch older browsers.
I agree it will be much cleaner once we’re able to ditch them.
Thanks for the screenshots! Appreciate it π
April 26, 2020 at 12:29 pm #1256827MaartenAh thanks so also the first notice about: .load-more:not (.has-svg-icon) is just because of the browser.
I think I have seen more theme generate the notices below the first one.
But if this is normal and will be removed some time in the future that would be great of course.
Thanks again for all your great work, love GeneratePress !!
Regards!
April 26, 2020 at 4:16 pm #1256990TomLead DeveloperLead DeveloperThe
speak
property needs to be updated – we’ll get that done in the next update.I’ll run the theme through these tests to clean up anything that might have made its way in since the last time we checked as well π
Thanks!
April 26, 2020 at 6:41 pm #1257075MaartenThanks so much Tom.
Could you also confirm if the following code for source HTML will not slow down Pagespeed because of using buffers, this is what I got from you to get rid off “type=” errors:
/////////////////////////////////
// Core
/////////////////////////////////define( ‘remove_w3c_notices’, ‘yes’ );
/////////////////////////////////
// Begin
/////////////////////////////////if ( remove_w3c_notices == ‘yes’ ) {
function output_buffer_start() {
ob_start( ‘output_callback’ );
}
add_action( ‘wp_loaded’, ‘output_buffer_start’ );
function output_buffer_end() {
if ( ob_get_contents() ) ob_end_flush();
}
add_action( ‘shutdown’, ‘output_buffer_end’ );
function output_callback( $buffer ) {
return preg_replace( “%[ ]type=[\’\”]text\/(javascript|css)[\’\”]%”, ”, $buffer );
}
}If this does have effect on speed, I will post an other post at WP to ask for a fix like I did last year.
Have a great day.
Regards!
April 27, 2020 at 8:51 am #1258129TomLead DeveloperLead DeveloperAny sort of function will affect performance, especially something like
preg_replace
. However, benchmarks would have to be run to find out whether the difference is significant or not.April 28, 2020 at 10:12 pm #1260568MaartenThanks Tom,
Well, maybe because of page caching like WP Rocket or WP super cache it might after page load not be a big problem anymore as if I understand it correctly the code has ben converted to raw HTML after first page load.
But yeah I have no other way than using preg_replace.
I will post an new issue at WP to ask them to have a look at it again for a update but I still think caching could solve the performance hit after first page visit (hopefully)
Thanks for your support!
Regards.
April 29, 2020 at 9:09 am #1261514TomLead DeveloperLead DeveloperNo problem! π
June 20, 2021 at 4:58 pm #1828981MaartenDear Tom, The Speak notice is back. Did I have to turn some setting on or off in GP Premium?
June 21, 2021 at 8:11 pm #1830362TomLead DeveloperLead DeveloperI’ve made a note to completely remove it in GPP 2.1.0. Sorry about that!
June 22, 2021 at 6:55 pm #1831645MaartenAh okay, I wanted to see if it was some other script but yeah it seems to be the theme.
Also there are some notices about the comment section, about a label not needed in a reply link.When I am back home at my PC, I will test it again and will make a screenshot for you.
It is so nice to tell anyone that ask me what Theme to buy, that I can tell them it is error free, even if this might not have effect om performance, is is just a great selling point!
And I always want to support a great developer like you so, yeah.
If you have the time maybe add a option in GP premium customizer to have links be underlined on hover.
And the site browser is a bit complex with juist the close button in full screen.
Other than that I think it is zo great!
Thanks.
June 22, 2021 at 8:10 pm #1831672TomLead DeveloperLead DeveloperGeneratePress 3.1 has an underlined link option enabled by default.
Thank you! Really appreciate the kind words and the feedback π
June 23, 2021 at 9:16 am #1832559MaartenThanks for that. Looking forward to 3.1 when it is released.
Tom, I seem to not find the speak error in GP but I am using your great social icons and I think it is in that.
isi-con class and isi-social-icons, see arrow.As for HTML, warning number 7 (with arrow) comes up when a comment reply is below a article somehow.
Below that, number 8, is again the social icons.I tested it with and without Autoptimize.
Note on Lighthouse:
If you use the default theme and no change to fonts you will see some notice in Lighthouse about contrast ratio, you can check it not only in a test in Chrome but also the color picker in chrome can show some info about it.
I find it harder to debug and ask myself does Google need more darker fonts or what, it is still a bit unclear to me.For the rest, your theme and plugin is the best! I am now getting used to working with Blocks plugin.
And the message about the social icons, if I need to post that somewhere else let me know.Hope this helps!
-
AuthorPosts
- You must be logged in to reply to this topic.