Read more:
]]>hi,
i moved /wp-login.php to just /login. now when someone tries to go to /wp-login.php, a 404 page shows (which is expected) with this error at the bottom of the page:
Notice: Trying to get property ‘ID’ of non-object in /code/wp-content/plugins/pagerestrict/pagerestrict.php on line 155 Notice: Trying to get property ‘ID’ of non-object in /code/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
any idea why i get this error and how do i fix it?
thanks!
]]>Hey guys
I have a problem on my site that no error messages are displayed when login fails. For example in the cases “Wrong user”, “Wrong Password” or similar.
I found out that these are displayed correctly when the “Page Restrict” plugin is disabled.
Have you guys noticed this as well? Is this behavior known?
If so, is there a workaround for it?
Thanks a lot, cheers
Stephan
Using PHP 8.1, we get these PHP errors:
PHP Warning: Attempt to read property "ID" on null in */wp-content/plugins/pagerestrict/pagerestrict.php on line 155
*/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
We are using latest version of the plugin.
Both are fixed by changing line 152 of the pagerestrict.php file from
if ( !\is_user_logged_in() && $pr_check ) :
to
if ( !\is_user_logged_in() && $pr_check && !is_null($post) ) :
I hope this fix gets rolled out soon since PHP 7 is nearing its end of life and a lot of people will be changing to PHP8 soon. (January 1st, 2023)
]]>Has anyone confirmed whether this plugin works with WordPress 6.0?
]]>Hello,
When using you plugin, error_log is filled with tons of notices like those:
[07-Jul-2022 09:00:47 UTC] PHP Notice: Trying to get property 'ID' of non-object in /public/wp-content/plugins/pagerestrict/pagerestrict.php on line 155
[07-Jul-2022 09:00:47 UTC] PHP Notice: Trying to get property 'ID' of non-object in /public/wp-content/plugins/pagerestrict/pagerestrict.php on line 155
[07-Jul-2022 09:00:47 UTC] PHP Notice: Trying to get property 'ID' of non-object in /public/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
[07-Jul-2022 09:00:47 UTC] PHP Notice: Trying to get property 'ID' of non-object in /public/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
You could avoid those replacing in lines 155 and 163 all following occurrences
$post->ID
with $post->ID ?? ''
it worked fine for me but now it only directs admins correctly and not other users
]]>Hi ??
Using PHP 8.1 we get these PHP errors:
[21-Mar-2022 11:11:56 UTC] PHP Warning: Attempt to read property "ID" on null in /home/xxxxxxxxx/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 155
[21-Mar-2022 11:11:56 UTC] PHP Warning: Attempt to read property "ID" on null in /home/xxxxxxxxx/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
We are using latest version of the plugin.
Can you fix this?
Thank you ??
]]>Hello,
I have activated Page restrict and reCaptcha on my website.
If and when a restricted page is accessed, the user is directed to the Page restrict login form (in the plugin parameters, option Show login form is Yes)
On that form, no sign of reCaptcha is visible. As a consequence, when trying to login, the user gets a message: reCpatcha failed!
Therefore, in reCaptcha parameters, I had to uncheck the protection of the login form, which is not best practice to protect the website. I am using reCaptcha v2 with robot or invisible and I am having this issue with both options.
Is this normal? Do I miss something?
Thank you and kind regards.
]]>Hello page restrict experts,
how can I translate the login form labels in french ?
Username, Password, Log in, Remember me, Lost your password?
Thanks
Jacques
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.
]]>I need to add a simple shortcode to the Restriction Message section. I have tried to just add it and it doesn’t show the actual content of the plugin; it just shows the shortcode as text. e.g. [this-is-shortcode] instead of the content that the shortcode is supposed to show. How can I add shortcode to the restriction message section?
]]>Hi,
Yesterday I tried logging into my wp-admin and instead of taking me to log in, it takes me to a screen with the following message:
Warning: Creating default object from empty value in /home/customer/www/filamlearners.com/public_html/wp-content/plugins/wooenhancer/admin/redux-framework/inc/class.redux_filesystem.php on line 29
Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/filamlearners.com/public_html/wp-content/plugins/wooenhancer/admin/redux-framework/inc/class.redux_filesystem.php:29) in /home/customer/www/filamlearners.com/public_html/wp-includes/pluggable.php on line 1329
It’s frustrating that I am unable to log into my own site to manage it.
When I visit my site (not as an admin), I am able get to my site, but it also gives that same warning in the header.
Does anyone know what could be the issue? Thanks for your help!
]]>edit: I’m thinking the problem is actually with the email-subscribers plugin. I’ll post on their forum.
Logged in as a user with admin privileges
Clicked “deactivate” on pagerestrict plugin.
Got this and continue to get this now just going to the site:
Fatal error: Uncaught RuntimeException: Error saving action: Error saving
action: Database error. in /home/myaccount/public_html/mydomain.com/wp-
content/plugins/email-subscribers/lite/includes/libraries/action-
scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44 Stack trace: #0 /home/myaccount/public_html/mydomain.com/wp-content/plugins/email-
subscribers/lite/includes/libraries/action-scheduler/classes/data-
stores/ActionScheduler_HybridStore.php(242): ActionScheduler_DBStoreMigrator-
>save_action(Object(ActionScheduler_Action), NULL) #1
/home/myaccount/public_html/mydomain.com/wp-content/plugins/email-
subscribers/lite/includes/libraries/action-
scheduler/classes/ActionScheduler_ActionFactory.php(177):
ActionScheduler_HybridStore->save_action(Object(ActionScheduler_Action)) #2
/home/myaccount/public_html/mydomain.com/wp-content/plugins/email-
subscribers/lite/includes/libraries/action-
scheduler/classes/ActionScheduler_ActionFactory.php(84):
ActionScheduler_ActionFactory->store(Object(ActionScheduler_ in
/home/myaccount/public_html/mydomain.com/wp-content/plugins/email-
subscribers/lite/includes/libraries/action-
scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php on line 44
There has been a critical error on this website. Please check your site admin
email inbox for instructions.
`
]]>Hello developers,
I am using a plugin namely “Page Restrict”. The plugin by default displays its own version of a login form and redirects user to that login form page. However, I want to modify the plugin such that when user tries to access restricted page, they are redirected to my URL of my custom registration form page. I have been trying to modify the code but to no avail.Can someone please help me out and guide me in the right direction? I’ll be really thankful.
Best regards
Fariha Rehman
I am getting the following error whenever anybody logs in. I am running the latest WordPress 5.7.1, so likely a compatibility issue. When will the plugin be updated?
PHP Notice: Undefined index: log in /home2/altapalm/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 245
PS. Great plugin, btw!
]]>Hello,
I have already installed the plugin Page Restrict it’s working fine and help my site, but because this plugin on the wp-login page it’s showing an error like this. Can you help me?
Notice: Trying to get property ‘ID’ of non-object in /home/mvahubca/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 148
Notice: Trying to get property ‘ID’ of non-object in /home/mvahubca/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 156
Thank You
]]>The plugin auto updated from wordpress. I have a monitoring server and 10 min later it told me the site was down and about 1-2 hours after that I got this from WordPress….
Howdy!
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Page Restrict.
——————-
I have contacted our developer who will look at this tonight. But I cant get into the front or back end of our site so he is going to have to look at it.
Once I have more info from him I can update this.
]]>I would like to be able to tell the plugin to restrict access to content if it is page X and also a child of page X, this way I do not need to go into the plugin to add new pages to be restricted.
]]>I was wondering if you could add a toggle selection to hide the comments section as well.
Id like to keep visitor can comments on for the non restricted pages and posts.
Currently if someone finds their way to the page they are able to leave a comment and I would like them to be blocked from that as well.
Hello,
I was wondering if anyone could help me with how to remove the “Lost your Password?” text that appears at the bottom of the login form. I don’t want my users to get a password that way.
Thank you,
Phil
I am trying to restrict the mentioned URL to only logged in users using your plugin but since this page wasnt generated via wordpress i have been finding it difficult to add it to the list of restricted pages. Do you have any recommendations on how to work around this?
]]>Hello,
I’m wondering if it’s possible to have a user & pass through URL so that we can login to another site with the same USR & PWD previously used.
Example:
If I login with user: AAAA & pwd:XXXX and create a link to another system that share the same usr & pwd info.
Example: https://www.domain.com/userid=AAAA&password=YYYY
Or something similar?
]]>On the store account sign-in page when this extension is enabled, this creates a login issue.
How to fix it.
Hello
I am having following issue with my wordpress website and i am unable to login to my webiste.
Notice: Undefined index: log in /var/www/wp-content/plugins/pagerestrict/pagerestrict.php on line 177
Please suggest solutions.
]]>Looking to have a Members only page on our website https://www.norfolkflyfishersclub.co.uk
But I need it to be able to be accessed simply by one password for everyone.Is that possible on your plugin.
I am very new to all of this so am looking for a simple solution.
Thanks.
]]>I have 2 posts (golfreis st. andrews links and wedstrijd 31 augustus), but 1 post is resticted.
What setting must I have to have all the posts not restricted for loged in users?
I want all the posts not restricted.
Hello,
Your plugin is preventing login errors from showing in wp-login.php page and also in custom login pages. When I disable the plugin the default wordpress login starts to show.
]]>It doesn’t look like you guys are responding to support requests, but here goes. The plugin is restricting access to some pages, but not all. In particular it doesn’t seem to handle pages that are created by Buddypress.
]]>Hello,
Please how can I change the username label to (Email Address) I disables username login on my site and enabled login with email address for better security, but the username label is misleading. How can I change it without editing the plugin directly.
Also How can I remove the labels username and password and replace it with placeholders inside the input text fields.
Thanks
]]>