• Resolved PD

    (@peterdowney01)


    I noticed on one of my servers that the SEO section had totally disappeared. After server restart, clearing object cache and opcache, nothing brought it back. I realized that this server was different than the rest as the site on it had define( ‘THE_SEO_FRAMEWORK_HEADLESS’, false ); added to the wp-config.php file. I commented out that section and everything returned to normal. This, however, should not happen, as headless mode should only be triggered by the value of true.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    The constant accepts true or an array with specifics; it does not accept false or any other data type: anything that isn’t the specific array is read as true. So, if you wish to disable it, it’s best to leave the constant undefined. Please see https://tsf.fyi/kb/headless. Here’s the source.

    We should not add a defense clause for everything developers could push through our API; every clause makes a function up to 17% slower. We would also need to write out why a developer is “doing it wrong”, considering every error one could make. Still, we didn’t create a programming language, only a framework for SEO. So, instead, we expect exclusively what we lay out in our documentation. You can read my reasoning in vast detail within this ticket: https://core.trac.www.ads-software.com/ticket/49628#comment:23.

    Thread Starter PD

    (@peterdowney01)

    Thank you for your reply.

    I supposed I just read your site wrong when I originally found this setting. I entered the value based on this description on your site:

    Different modes

    The constant THE_SEO_FRAMEWORK_HEADLESS accepts boolean values (true/false) as well as array values.

    To me, reading that that suggests false is a valid option. I understand now that it isn’t, but specifically saying in your help text that it accepts this type of value and then listing one it doesn’t accept can be confusing to read.

    Plugin Author Sybre Waaijer

    (@cybr)

    Ah! I am entirely to blame for spreading conflicting information. Sorry about that.

    I have adjusted the KB entry to reflect the code’s intention more accurately.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Headless mode bug’ is closed to new replies.