The issue was originally reported 10 years ago with a proposed fix that does work:
https://wordpress.org/support/topic/restrict-path-logic-does-not-work-correctly/
Hi @lucasw89 ,
Thanks for following up, and you’re right to hold us to account on this one.
Some honest context first: Table of Contents Plus was abandoned by its original author, and our team took the plugin over more recently to keep it alive. We do plan to maintain and support it going forward.
On your report specifically: it is reproduced and logged in our internal tracker, and I’ve updated it this week with a full technical write-up and a proposed fix for our developers. For what it’s worth, the root cause turned out to be that the path check compares against the full request URI from the domain root, so on sites running WordPress in a subdirectory the option can never match. The older patch you linked unfortunately isn’t the right fix. It effectively disables the restriction rather than repairing it, which is part of why this lingered.
I can’t promise an exact release date, but this is now in front of our development team with the fix worked out, not sitting at the bottom of a backlog. A year is longer than this should have taken, and I appreciate you staying on it.
Hey @lucasw89,
Thank you for bringing this to our attention. I’m Arnaud, the Product Manager for AIOSEO.
I’m currently working on an update for the plugin and will make sure this gets resolved in that update. Expect it to land later this week or next week by the latest.
If you have any other feedback for us, let me know!