• Resolved cjyabraham

    (@cjyabraham)


    I am finding that sometimes the meta block (the meta tags surrounded by <!– The SEO Framework by Sybre Waaijer –> in the header of the page) is not inserted and sometimes it is. I am observing this on the homepage of https://www.cncf.io/. I can’t currently figure out under what conditions it is present and what causes it to disappear. Currently it is there when I load the page but during two periods today it was not there (I’m pretty sure no one is messing with settings int he wp-admin.) Any ideas why this may be?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter cjyabraham

    (@cjyabraham)

    Excellent. Thanks for figuring this out. We’ll look forward to the patch when you can get to it.

    Perfect! Would be great if you can ping me here when the patch is available.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    Sorry for the wait. I wanted to release a fix the day I found the cause, but this issue is actually caused by missing checks within WordPress itself, about which I cannot share details (yet) for security reasons.

    Today I learned no fix would come to WordPress because nobody truly understands what the API we use is for (it’s also being misinterpreted by Automattic staff, whose plugins are affected most by this issue), so I’ll have to fix it myself in TSF. I’ll do this after Automattic’s staff have fixed their stuff. They deem it a “low” severity vulnerability — because no data can leak; only with caching enabled might one see incomplete/slightly-altered responses, as you are experiencing with TSF.

    Since my schedule has been upended due to a derailed project, I have no specific ETA for the patch.

    Thread Starter cjyabraham

    (@cjyabraham)

    Ok. Thanks for the update.

    Thread Starter cjyabraham

    (@cjyabraham)

    Hi Sybre. Any updates on this? When we run PageSpeed on our site it occasionally complains of there being no meta Description on the homepage, indicating that this is sometimes still a problem.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @cjyabraham,

    Have you not implemented the snippet I sent earlier?

    add_filter( 'the_seo_framework_query_supports_seo', '__return_true' );
    

    I’m sorry it’s been taking so long to resolve. There’s a development version with the bugfix in place, which I committed only recently after finding no workaround other than a patch in WordPress Core. I shared that issue publicly on WordPress’s Slack, and I still need to follow up on the implications via a ticket.

    Since I can’t fix the issue, I deleted some “Query Supports SEO” checks while still being compatible with most plugins.

    If you’d like, you can use the next update’s development version with the fix (at your own risk!). I still want to implement a few more things, but the code is already running live on my servers without anything amiss (as far as I and the logs can tell):
    https://github.com/sybrew/the-seo-framework/archive/3fe91dab74b220e166ed073eed8eb1b4972aee44.zip.

    Uploading that ZIP via WordPress’s plugin installer should automatically update The SEO Framework to the containing version. Still, it might accidentally create a second instance of The SEO Framework in a different folder.

    Still, the filter above should also work well temporarily. I hope to have the ‘official’ update out soon, but I don’t have a definite ETA yet. If I stop the development cycle right here, we could have a minor version released by next Tuesday.

    • This reply was modified 1 year, 4 months ago by Sybre Waaijer. Reason: typo
    Thread Starter cjyabraham

    (@cjyabraham)

    No I didn’t implement the filter. In your initial message you said it should be used only for debugging. Do you suggest now we run it on production?

    If you do decide to get a release out by Tuesday with the fix, we’d happily wait for that ??

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again @cjyabraham.

    Unfortunately, there are a few too many bugs in the update for me to warrant a public release.

    I’ve crafted for you a snippet that will mimic the upcoming intended functionality:

    add_filter(
    	'the_seo_framework_query_supports_seo',
    	function( $supported ) {
    
    		// If it's already supported, we didn't encounter the bug; circle back:
    		if ( $supported )
    			return $supported;
    
    		$tsf = tsf();
    
    		switch ( true ) {
    			case is_feed():
    			case wp_doing_ajax():
    			case wp_doing_cron():
    			case defined( 'REST_REQUEST' ) && REST_REQUEST:
    				$supported = false;
    				break;
    
    			case $tsf->is_singular():
    				// This is the most likely scenario, but may collide with is_feed() et al.
    				$supported = $tsf->is_post_type_supported() && $tsf->get_the_real_id();
    				break;
    
    			case is_post_type_archive():
    				$supported = $tsf->is_post_type_archive_supported();
    				break;
    
    			case $tsf->is_term_meta_capable():
    				// When a term has no posts attached, it'll not return a post type, and it returns a 404 late in the loop.
    				// This is because get_post_type() tries to assert the first post in the loop here.
    				// Thus, we test for is_taxonomy_supported() instead.
    				$supported = $tsf->is_taxonomy_supported() && $tsf->get_the_real_id();
    				break;
    
    			default:
    				// Everything else: homepage, 404, search, edge-cases.
    				$supported = true;
    		}
    
    		if ( ! $supported && $tsf->is_query_exploited() )
    			$supported = true;
    
    		return $supported;
    	}
    );
    Thread Starter cjyabraham

    (@cjyabraham)

    Ok, thanks Sybre. We’ll try it out.

    Thread Starter cjyabraham

    (@cjyabraham)

    Hi Sybre. I see you’ve released an update to the plugin. Has it addressed this issue? If so, I’ll upgrade and remove the snippet you had previously sent me.

    Thanks,
    Chris

    Thread Starter cjyabraham

    (@cjyabraham)

    Ah, I see that the plugin version hasn’t changed so maybe you were just updating the “Tested up to” version or something. In that case, nevermind… ??

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Chris,

    That’s right; I only updated the “Tested up to” number, so we’ll keep getting new users.

    Lots of back-office stuff inundated me last month (taxes, merging servers, migrating old customers from private email to Gmail (still not done…), Zenbleed, product relaunch, security fix in another plugin, etc.).

    So, I decided to move ahead with a major release with new functionality, like a better color scheme, different edit behavior of fields, Twitter Card tweaks, and small-screen support when editing for large titles (planned, not promised).

    A major release is easier for me than considering the current state a minor release. This is due to API changes for which I need to add deprecation notices and other fallbacks. Improved feature/compatibility parity with Extension Manager, writing less documentation, etc., will help me save time congealing the release.

    This is what has already been done. And this is what I’m still planning (I’m not a fan of creating thousands of tickets).

    Thread Starter cjyabraham

    (@cjyabraham)

    Ok, thanks for the update Sybre.

    Plugin Author Sybre Waaijer

    (@cybr)

    TSF v5.0 will launch within 24 hours if everything goes as planned.

    Sorry for the terribly long wait for the official fix.

    The metaphorical weather wasn’t kind to me before I decided to merge it with the major release, and then the amount of work required to complete the tasks kept increasing. The upcoming update is significant enough to warrant a major version number increase: The plugin’s code is unrecognizable yet somehow familiar.

    Thread Starter cjyabraham

    (@cjyabraham)

    That’s exciting! Thanks!

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Meta block sometimes not inserted?’ is closed to new replies.