• Resolved kwbrayton

    (@kwbrayton)


    Pretty amazing collection of very useful items. Thanks!

    When I attempted to turn on the “Manage robots.txt” in the Custom Code section, I got this warning displayed:

    Warning: Undefined variable $field_option_value in /[hidden path]/wp-content/plugins/admin-site-enhancements/classes/class-settings-fields-render.php on line 324

    The textbox was empty, even though I do have a robots.txt file on my host. When I added my robots.txt file to the textbox, save changes, then toggle the switch on/off, I don’t get the error. My instincts are telling me that the robots.txt file didn’t pre-load into the textbox object and that’s causing the warning message.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bowo

    (@qriouslad)

    @kwbrayton thanks for reporting. Your instinct was partially right. The other part of the error has to do with simply insufficient logic to handle the various scenarios possible. To begin with, the feature assumed there are no actual robots.txt file that exists, only a virtual one created by WordPress core.

    So, the logic has now been updated in v3.9.2 to handle existing, actual robots.txt file, which will be renamed to robots_txt_backup__{date_time_stamp}.txt upon enabling this feature, and renamed back to robots.txt upon disabling the feature, so the file will be in use again.

    By now, you’ve probably realized that the plugin/feature saves the custom content for robots.txt inside it’s options in the wp_options table, not in an actual robots.txt file. It will be dynamically loaded onto the robots.txt URL.

    Thanks again for reporting!… and I’d really appreciate if you can quickly post that comment of yours, “Pretty amazing collection of very useful items. Thanks!” as a quick review at https://www.ads-software.com/support/plugin/admin-site-enhancements/reviews/#new-post. Thanks!

    • This reply was modified 2 years, 2 months ago by Bowo.
    Plugin Author Bowo

    (@qriouslad)

    p.s. marking this as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefine variable $field_option_value’ is closed to new replies.