Support » Plugin: Termly | GDPR/CCPA Cookie Consent Banner » [BUG] Call to undefined function get_home_path() in […]class-robots-txt.php:52

  • Meta

    • WP: 5.7.2
    • PHP:
      PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )
      Copyright (c) 1997-2018 The PHP Group
      Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
          with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
    • Plugin: 3.0
    • The latest version caused our website to fail totally and displaying a white page with a link “How to trouble shoot wordpress”.

      The servers logs show the following error message:

      [Tue Jul 20 07:27:45.345625 2021] [php7:error] [pid 29562] [client] PHP Fatal error:  Uncaught Error: Call to undefined function get_home_path() in /srv/\nStack trace:\n#0 /srv/ termly\\Robots_Txt::check_file(Object(WP_Rewrite))\n#1 /srv/ WP_Hook->apply_filters('', Array)\n#2 /srv/ WP_Hook->do_action(Array)\n#3 /srv/ do_action_ref_array('generate_rewrit...', Array)\n#4 /srv/ WP_Rewrite->rewrite_rules()\n#5 /srv/ WP_Rewrite->wp_rewrite_rules()\n#6 /srv/ WP_Rewrite->flush_rules(true)\n#7 /srv/ WP_Hook->apply_filters(NULL, Array)\n#8 /srv/ in /srv/ on line 52

      I could “solve” the issue with replacing line 52 in class-robots-txt.php:

      $robots_path = \get_home_path() . '/robots.txt';


      $robots_path = ABSPATH . '/robots.txt';

      I followed this article:–

      Hope this helps in will be fixed in the next release of this plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Termly


    Thank you for the bug report. We are looking into the issue with urgency.

    Plugin Contributor Termly


    Hello, while we haven’t been able to reproduce the issue, we just released a post-release patch that we hope has addressed this bug.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.