• Resolved Alexander Guskov

    (@forcesail)


    Hi,
    the plugin used to change <title> tag to the value of title-SEO-field, but gave up to do it any more.

    My investigation came to endOutputBuffering() where ( ob_get_level() !== $this->bufferLevel ) never equivalent, because since WP 6.9 between startOutputBuffering() that calls from action template_redirect and endOutputBuffering() that calls from action wp_head appeared wp_start_template_enhancement_output_buffer() that calls some other actions where calls ob_start().

    So, if to change hook template_redirect to get_header or wp_before_load_template (better, because it definitely calls, opposite to get_header) in registerTitleHooks() the issue fixes.

    Hope it helps you to fix it in the next update.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support MM Aurangajeb

    (@aurangajeb)

    Hi @forcesail ,

    Thanks for reaching out!

    To properly investigate the issue where the title-tag is not being supported, could you please let me know which theme you are currently using? Knowing the theme will allow us to replicate the issue accurately.

    I’ve created an internal issue for our Development team to look into this, but sharing the theme details is crucial for us to reproduce and address the issue efficiently.

    I look forward to your response.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @forcesail,

    I’ve been able to reproduce this issue and have applied the fix you suggested. We’ll include this in our 4.9.5 maintenance release.

    Thank you for the valuable feedback!

    Thread Starter Alexander Guskov

    (@forcesail)

    Hi,
    it seems that there is one error more with <title> tag.

    Independently of if a theme supports title-tag the plugin adds <title> tag in registerTitleHooks():
    1) if a theme supports title-tag the plugin change <title> through pre_get_document_title (and wp_title) hooks (it’s ok)
    2) if a theme doesn’t supports title-tag but adds <title> by another way – the plugin change <title> through hooking startOutputBuffering() (it’s ok)

    3) if a theme doesn’t supports title-tag and doesn’t adds <title> by another way – the plugin anyway adds <title> through hooking startOutputBuffering() (it’s doubtfully behavior !!)

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @forcesail,

    The third scenario is intended behaviour. There never really is any reason why you would not want a title tag, especially if you install an SEO plugin. So that’s why we add it in case is using a theme (usually a poorly developed one) where it’s entirely missing.

    Thread Starter Alexander Guskov

    (@forcesail)

    Hi,

    It’s very strange behavior for WordPress that the <title> tag must be requested separately and isn’t activated by default, but it’s even more questionable behavior for a plugin that disrupts the theme’s logic. There are always a million unexplained reasons why someone would do something that doesn’t make sense at first glance.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.