• After seeing this plugin recommended in the official WP docs, I figured it would be a cinch. Unfortunately, I got a ‘post_id is undefined’ error in the admin as soon as I saved my settings for the first time (I selected a single page, hit save).

    I’m trying to launch a client site within the next couple of days so this is an immediate no-go, which is a shame since it’s dead simple and exactly what I need.

    For the devs and posterity, here’s the error:
    Notice: Undefined index: post_id in /var/www/html/wp-content/plugins/pagerestrict/inc/admin.php on line 78 Call Stack: 0.0001 368216 1. {main}() /var/www/html/wp-admin/options-general.php:0 0.0001 368952 2. require_once('/var/www/html/wp-admin/admin.php') /var/www/html/wp-admin/options-general.php:10 1.1727 8360352 3. do_action($hook_name = 'settings_page_pagerestrict') /var/www/html/wp-admin/admin.php:259 1.1727 8360728 4. WP_Hook->do_action($args = [0 => '']) /var/www/html/wp-includes/plugin.php:470 1.1727 8360728 5. WP_Hook->apply_filters($value = '', $args = [0 => '']) /var/www/html/wp-includes/class-wp-hook.php:327 1.1727 8361856 6. pr_admin_page('') /var/www/html/wp-includes/class-wp-hook.php:303

    Running a custom theme, ACF Pro, Yoast, and a couple of small utility plugins that shouldn’t have any interaction with the rest. Also not running any custom code that would interfere with the functions of this plugin. Just template logic, front-end JS, and custom post types/taxes.

  • The topic ‘Error immediately upon activating and restricting a single page’ is closed to new replies.