Topic Restriction

The problem with the "New Topic" button - Topic Restriction

The problem with the "New Topic" button

by tapioka » Mon Feb 15, 2021 2:36 pm

After installing the "Topic Restriction" extension, when a site/forum guest clicks on the "New Topic" button, instead of a page asking to register on the site, a page appears with the message "You do not have access to view posts in this forum."
How to fix it?
User avatar
tapioka
Registered User
Posts: 4
Joined: Sat Feb 06, 2021 5:32 pm

Re: The problem with the "New Topic" button

by tapioka » Fri Feb 19, 2021 12:57 pm

Hello.

I figured out how to do it myself:
Here "…/public_html/ext/rmcgirr83/topicrestriction/event/listener.php"

Code: Select all

60	static public function getSubscribedEvents()
61	{
62		return array(
63			'core.user_setup'				=> 'user_setup',
64			'core.permissions'				=> 'add_permission',
65			'core.viewtopic_before_f_read_check'		=> 'forum_id_check',
66			'core.viewforum_get_topic_data'			=> 'modify_template_vars',
67			'core.search_modify_param_before'		=> 'search_modify_param_before',
68			'core.ucp_pm_compose_quotepost_query_after'	=> 'ucp_pm_compose_quotepost_query_after',
69			'core.modify_posting_auth'			=> 'forum_id_check',
70		);
71	}
You need to comment out line 69:

Code: Select all

60	static public function getSubscribedEvents()
61	{
62		return array(
63			'core.user_setup'				=> 'user_setup',
64			'core.permissions'				=> 'add_permission',
65			'core.viewtopic_before_f_read_check'		=> 'forum_id_check',
66			'core.viewforum_get_topic_data'			=> 'modify_template_vars',
67			'core.search_modify_param_before'		=> 'search_modify_param_before',
68			'core.ucp_pm_compose_quotepost_query_after'	=> 'ucp_pm_compose_quotepost_query_after',
			/*
69			'core.modify_posting_auth'			=> 'forum_id_check',
			*/
70		);
71	}
User avatar
tapioka
Registered User
Posts: 4
Joined: Sat Feb 06, 2021 5:32 pm