Environment
Discourse Version : v3.5.0.beta1 +212
Plugin Commit : 495cac0e
Steps to Reproduce
Visiting a topic in a category with the lockdown enabled should redirect, but instead gives an error in the logs. I have several subcategories with the same setup, this category does redirect as expected: Abstract Nature Critiques - Nature Photographers Network but others like Avian Critiques - Nature Photographers Network does not.
FYI my instance is on a subdomain (community.naturephotographers.network) and the URL I’m trying to redirect to is on my primary domain which is on Wordpress (naturephotographers.network), I’m trying to redirect to Join NPN - Critique - Nature Photographers Network
Example
Should redirect but does not
Logs
Message (134 copies reported)
ActionController::Redirecting::UnsafeRedirectError (Unsafe redirect to “Join NPN - Critique - Nature Photographers Network ”, pass allow_other_host: true to redirect anyway.)
lib/middleware/omniauth_bypass_middleware.rb:35:in call' lib/content_security_policy/middleware.rb:12:in
call’
lib/middleware/anonymous_cache.rb:407:in call' lib/middleware/csp_script_nonce_injector.rb:12:in
call’
config/initializers/008-rack-cors.rb:26:in call' lib/middleware/default_headers.rb:13:in
call’
config/initializers/100-quiet_logger.rb:20:in call' config/initializers/100-silence_logger.rb:29:in
call’
lib/middleware/enforce_hostname.rb:24:in call' lib/middleware/processing_request.rb:12:in
call’
lib/middleware/request_tracker.rb:385:in `call’
Backtrace
actionpack (7.2.2.1) lib/action_controller/metal/redirecting.rb:226:in _enforce_open_redirect_protection' actionpack (7.2.2.1) lib/action_controller/metal/redirecting.rb:114:in
redirect_to’
actionpack (7.2.2.1) lib/action_controller/metal/flash.rb:64:in redirect_to' actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:52:in
block in redirect_to’
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in block in instrument' activesupport (7.2.2.1) lib/active_support/notifications/instrumenter.rb:58:in
instrument’
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in instrument' actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:51:in
redirect_to’
plugins/discourse-category-lockdown/plugin.rb:127:in block in <class:ApplicationController>' activesupport (7.2.2.1) lib/active_support/rescuable.rb:116:in
instance_exec’
activesupport (7.2.2.1) lib/active_support/rescuable.rb:116:in block in handler_for_rescue' activesupport (7.2.2.1) lib/active_support/rescuable.rb:94:in
rescue_with_handler’
activesupport (7.2.2.1) lib/active_support/rescuable.rb:167:in rescue_with_handler' actionpack (7.2.2.1) lib/action_controller/metal/rescue.rb:30:in
rescue in process_action’
actionpack (7.2.2.1) lib/action_controller/metal/rescue.rb:26:in process_action' actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:77:in
block in process_action’
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in block in instrument' activesupport (7.2.2.1) lib/active_support/notifications/instrumenter.rb:58:in
instrument’
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in instrument' actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:76:in
process_action’
actionpack (7.2.2.1) lib/action_controller/metal/params_wrapper.rb:259:in process_action' activerecord (7.2.2.1) lib/active_record/railties/controller_runtime.rb:39:in
process_action’
actionpack (7.2.2.1) lib/abstract_controller/base.rb:163:in process' actionview (7.2.2.1) lib/action_view/rendering.rb:40:in
process’
rack-mini-profiler (3.3.1) lib/mini_profiler/profiling_methods.rb:89:in block in profile_method' actionpack (7.2.2.1) lib/action_controller/metal.rb:252:in
dispatch’
actionpack (7.2.2.1) lib/action_controller/metal.rb:335:in dispatch' actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:67:in
dispatch’
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:50:in serve' actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:53:in
block in serve’
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:133:in block in find_routes' actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in
each’
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in find_routes' actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:34:in
serve’
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:896:in call' lib/middleware/omniauth_bypass_middleware.rb:35:in
call’
rack (2.2.12) lib/rack/tempfile_reaper.rb:15:in call' rack (2.2.12) lib/rack/conditional_get.rb:27:in
call’
rack (2.2.12) lib/rack/head.rb:12:in call' actionpack (7.2.2.1) lib/action_dispatch/http/permissions_policy.rb:38:in
call’
lib/content_security_policy/middleware.rb:12:in call' lib/middleware/anonymous_cache.rb:407:in
call’
lib/middleware/csp_script_nonce_injector.rb:12:in call' config/initializers/008-rack-cors.rb:26:in
call’
rack (2.2.12) lib/rack/session/abstract/id.rb:266:in context' rack (2.2.12) lib/rack/session/abstract/id.rb:260:in
call’
actionpack (7.2.2.1) lib/action_dispatch/middleware/cookies.rb:704:in call' actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:31:in
block in call’
activesupport (7.2.2.1) lib/active_support/callbacks.rb:101:in run_callbacks' actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:30:in
call’
actionpack (7.2.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:31:in call' actionpack (7.2.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in
call’
logster (2.20.1) lib/logster/middleware/reporter.rb:40:in call' lib/middleware/default_headers.rb:13:in
call’
railties (7.2.2.1) lib/rails/rack/logger.rb:41:in call_app' railties (7.2.2.1) lib/rails/rack/logger.rb:29:in
call’
config/initializers/100-quiet_logger.rb:20:in call' config/initializers/100-silence_logger.rb:29:in
call’
request_store (1.7.0) lib/request_store/middleware.rb:19:in call' actionpack (7.2.2.1) lib/action_dispatch/middleware/request_id.rb:33:in
call’
lib/middleware/enforce_hostname.rb:24:in call' rack (2.2.12) lib/rack/method_override.rb:24:in
call’
actionpack (7.2.2.1) lib/action_dispatch/middleware/executor.rb:16:in call' rack (2.2.12) lib/rack/sendfile.rb:110:in
call’
rack-mini-profiler (3.3.1) lib/mini_profiler.rb:191:in call' lib/middleware/processing_request.rb:12:in
call’
message_bus (4.3.9) lib/message_bus/rack/middleware.rb:60:in call' lib/middleware/request_tracker.rb:385:in
call’
actionpack (7.2.2.1) lib/action_dispatch/middleware/remote_ip.rb:96:in call' railties (7.2.2.1) lib/rails/engine.rb:535:in
call’
railties (7.2.2.1) lib/rails/railtie.rb:226:in public_send' railties (7.2.2.1) lib/rails/railtie.rb:226:in
method_missing’
rack (2.2.12) lib/rack/urlmap.rb:74:in block in call' rack (2.2.12) lib/rack/urlmap.rb:58:in
each’
rack (2.2.12) lib/rack/urlmap.rb:58:in call' unicorn (6.1.0) lib/unicorn/http_server.rb:634:in
process_client’
unicorn (6.1.0) lib/unicorn/http_server.rb:739:in worker_loop' unicorn (6.1.0) lib/unicorn/http_server.rb:547:in
spawn_missing_workers’
unicorn (6.1.0) lib/unicorn/http_server.rb:143:in start' unicorn (6.1.0) bin/unicorn:128:in
<top (required)>’
vendor/bundle/ruby/3.3.0/bin/unicorn:25:in load' vendor/bundle/ruby/3.3.0/bin/unicorn:25:in
’
Env
HTTP HOSTS: community.naturephotographers.network
Can you please rebuild with this fork and see if the issue went away?
https://github.com/communiteq/discourse-category-lockdown
Thanks Richard, unfortunately that did not fix the problem. The error is no longer in the logs, but it does not redirect.
And all security settings of those two categories are identical?
Yes, here is the category that’s working:
and another that is not:
It seems the plugin is now disabled?
I am unable to 100% verify this but this is my theory:
Off site redirects are not supported by this plugin.
So why did it work?
There are two ways the plugin redirects, depending on whether a topic page is requested as the first page in the session.
via a client side redirect (works for off-site redirects)
via a server side redirect (doesn’t work for off-site redirects)
The redirects are also cached by the browser. So if the request caused a client side redirect when it was first made, then it worked.
@davidkingham can you please rebuild with the original repository https://github.com/paviliondev/discourse-category-lockdow and see if the issue has been resolved?
1 Like
I rebuilt with that one and it still doesn’t work. So I created a published page thinking that would be the solution, well now that doesn’t work either. I’m redirecting to /pub/image-critiques-join-npn
Plus, getting all sort of errors now:
Message (260 copies reported)
ActionView::Template::Error (unexpected return)
lib/plugin/instance.rb:729:in `block in register_html_builder'
lib/discourse_plugin_registry.rb:230:in `block in build_html'
lib/discourse_plugin_registry.rb:230:in `map'
lib/discourse_plugin_registry.rb:230:in `build_html'
app/helpers/application_helper.rb:572:in `build_plugin_html'
app/views/layouts/crawler.html.erb:12
app/controllers/topics_controller.rb:1384:in `block (2 levels) in perform_show_response'
app/controllers/topics_controller.rb:1377:in `perform_show_response'
app/controllers/topics_controller.rb:191:in `show'
app/controllers/application_controller.rb:427:in `block in with_resolved_locale'
app/controllers/application_controller.rb:427:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:35:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:407:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:26:in `call'
lib/middleware/default_headers.rb:13:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/processing_request.rb:12:in `call'
lib/middleware/request_tracker.rb:385:in `call'
Backtrace
plugins/discourse-category-lockdown/plugin.rb:22:in `block (2 levels) in activate!'
lib/plugin/instance.rb:729:in `block in register_html_builder'
lib/discourse_plugin_registry.rb:230:in `block in build_html'
lib/discourse_plugin_registry.rb:230:in `map'
lib/discourse_plugin_registry.rb:230:in `build_html'
app/helpers/application_helper.rb:572:in `build_plugin_html'
app/views/layouts/crawler.html.erb:12
actionview (7.2.2.1) lib/action_view/base.rb:281:in `public_send'
actionview (7.2.2.1) lib/action_view/base.rb:281:in `_run'
actionview (7.2.2.1) lib/action_view/template.rb:285:in `block in render'
activesupport (7.2.2.1) lib/active_support/notifications.rb:212:in `instrument'
actionview (7.2.2.1) lib/action_view/template.rb:584:in `instrument_render_template'
actionview (7.2.2.1) lib/action_view/template.rb:273:in `render'
rack-mini-profiler (3.3.1) lib/mini_profiler/profiling_methods.rb:89:in `block in profile_method'
actionview (7.2.2.1) lib/action_view/renderer/template_renderer.rb:77:in `block in render_with_layout'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `block in instrument'
activesupport (7.2.2.1) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `instrument'
actionview (7.2.2.1) lib/action_view/renderer/template_renderer.rb:75:in `render_with_layout'
actionview (7.2.2.1) lib/action_view/renderer/template_renderer.rb:59:in `render_template'
actionview (7.2.2.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (7.2.2.1) lib/action_view/renderer/renderer.rb:58:in `render_template_to_object'
actionview (7.2.2.1) lib/action_view/renderer/renderer.rb:31:in `render_to_object'
actionview (7.2.2.1) lib/action_view/rendering.rb:135:in `block in _render_template'
actionview (7.2.2.1) lib/action_view/base.rb:308:in `in_rendering_context'
actionview (7.2.2.1) lib/action_view/rendering.rb:134:in `_render_template'
actionpack (7.2.2.1) lib/action_controller/metal/streaming.rb:258:in `_render_template'
actionview (7.2.2.1) lib/action_view/rendering.rb:121:in `render_to_body'
actionpack (7.2.2.1) lib/action_controller/metal/rendering.rb:186:in `render_to_body'
actionpack (7.2.2.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (7.2.2.1) lib/abstract_controller/rendering.rb:29:in `render'
actionpack (7.2.2.1) lib/action_controller/metal/rendering.rb:167:in `render'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block (2 levels) in render'
benchmark (0.4.0) lib/benchmark.rb:323:in `realtime'
activesupport (7.2.2.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block in render'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:101:in `cleanup_view_runtime'
activerecord (7.2.2.1) lib/active_record/railties/controller_runtime.rb:46:in `cleanup_view_runtime'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:31:in `render'
app/controllers/topics_controller.rb:1384:in `block (2 levels) in perform_show_response'
actionpack (7.2.2.1) lib/action_controller/metal/mime_responds.rb:224:in `respond_to'
app/controllers/topics_controller.rb:1377:in `perform_show_response'
app/controllers/topics_controller.rb:191:in `show'
plugins/discourse-category-lockdown/lib/category_lockdown/topics_controller_extension.rb:4:in `show'
actionpack (7.2.2.1) lib/action_controller/metal/basic_implicit_render.rb:8:in `send_action'
actionpack (7.2.2.1) lib/abstract_controller/base.rb:226:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/rendering.rb:193:in `process_action'
actionpack (7.2.2.1) lib/abstract_controller/callbacks.rb:261:in `block in process_action'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
app/controllers/application_controller.rb:427:in `block in with_resolved_locale'
i18n (1.14.7) lib/i18n.rb:353:in `with_locale'
app/controllers/application_controller.rb:427:in `with_resolved_locale'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:141:in `run_callbacks'
actionpack (7.2.2.1) lib/abstract_controller/callbacks.rb:260:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/rescue.rb:27:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:77:in `block in process_action'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `block in instrument'
activesupport (7.2.2.1) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `instrument'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:76:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.2.2.1) lib/active_record/railties/controller_runtime.rb:39:in `process_action'
actionpack (7.2.2.1) lib/abstract_controller/base.rb:163:in `process'
actionview (7.2.2.1) lib/action_view/rendering.rb:40:in `process'
rack-mini-profiler (3.3.1) lib/mini_profiler/profiling_methods.rb:89:in `block in profile_method'
actionpack (7.2.2.1) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (7.2.2.1) lib/action_controller/metal.rb:335:in `dispatch'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:50:in `serve'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:53:in `block in serve'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:133:in `block in find_routes'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in `each'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in `find_routes'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:34:in `serve'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:896:in `call'
lib/middleware/omniauth_bypass_middleware.rb:35:in `call'
rack (2.2.13) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.13) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.13) lib/rack/head.rb:12:in `call'
actionpack (7.2.2.1) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:407:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:26:in `call'
rack (2.2.13) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.13) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/cookies.rb:704:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:30:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
logster (2.20.1) lib/logster/middleware/reporter.rb:40:in `call'
lib/middleware/default_headers.rb:13:in `call'
railties (7.2.2.1) lib/rails/rack/logger.rb:41:in `call_app'
railties (7.2.2.1) lib/rails/rack/logger.rb:29:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
request_store (1.7.0) lib/request_store/middleware.rb:19:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/request_id.rb:33:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
rack (2.2.13) lib/rack/method_override.rb:24:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/executor.rb:16:in `call'
rack (2.2.13) lib/rack/sendfile.rb:110:in `call'
rack-mini-profiler (3.3.1) lib/mini_profiler.rb:191:in `call'
lib/middleware/processing_request.rb:12:in `call'
message_bus (4.3.9) lib/message_bus/rack/middleware.rb:60:in `call'
lib/middleware/request_tracker.rb:385:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/remote_ip.rb:96:in `call'
railties (7.2.2.1) lib/rails/engine.rb:535:in `call'
railties (7.2.2.1) lib/rails/railtie.rb:226:in `public_send'
railties (7.2.2.1) lib/rails/railtie.rb:226:in `method_missing'
rack (2.2
Env
HTTP HOSTS: community.naturephotographers.network
angus
March 11, 2025, 9:35am
21
Hey @davidkingham sorry you’ve been having issues with this plugin.
In response to your issue report I’ve completely overhauled this plugin so it’s compatible with the latest version of Discourse, including adding various stability tests and checks. The issue you just reported was addressed in an additional fix I pushed this morning.
I’ve deployed this to our internal testing environments and it’s working as expected. Please try updating again now. Thanks for your patience with this as we bring this plugin up-to-date and let me know if you experience any other issues.
Here’s a video of me demonstrating the working functionality on our test instance
Thanks Angus! The first time I tested this it worked perfectly, but now it doesn’t work at all, and nothing in the logs
Only this shows up in the console, not sure it’s related.
[Error] ResizeObserver loop completed with undelivered notifications. (45796, line 0)
angus
March 11, 2025, 4:59pm
23
davidkingham:
Only this shows up in the console, not sure it’s related.
[Error] ResizeObserver loop completed with undelivered notifications. (45796, line 0)
This could be an issue, but it’s not coming from this plugin.
Could you elaborate on this? Walk me through what you tried, what worked and then what didn’t work.
Sorry, by not working I mean it’s not redirecting, just going to the topic. Now I’m back to the original problem where it only redirects in one category, the rest go to the topic despite having the same settings. See links in my original post.
angus
March 11, 2025, 6:59pm
25
Are the lockdown settings applied on the Flora Critiques category or the Image Critiques category? Could you share a screenshot of the settings? e.g.
Please also share a screenshot of the plugin’s site settings, e.g.
Just the subcategory of flora critiques:
angus
March 12, 2025, 3:23pm
27
@davidkingham Hey David, I’m still unable to repro the issue. Here’s a live test setup I created where you can see it working:
https://test.pavilion.tech/t/this-is-a-topic-that-will-be-locked/418
Here’s a video overview of my current thinking
Please share your full list of plugins so I can try to repro.
Sorry, there’s quite a few. Later today I can try to repro on my sandbox too.
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-zoom.git
- git clone https://github.com/discourse/discourse-adplugin
- git clone https://github.com/discourse/discourse-user-notes.git
- git clone https://github.com/discourse/discourse-reactions.git
- git clone https://github.com/discourse/discourse-calendar.git
- git clone https://github.com/discourse/discourse-whos-online.git
- git clone https://github.com/discourse/discourse-follow.git
- git clone https://github.com/discourse/discourse-gamification.git
- git clone https://github.com/discourse/discourse-templates.git
- git clone https://github.com/discourse/discourse-fontawesome-pro.git
- git clone https://github.com/discourse/discourse-data-explorer.git
- git clone https://github.com/discourse/discourse-ai.git
- git clone https://github.com/discourse/discourse-translator.git
- git clone https://github.com/discourse/discourse-docs.git
## Non Official
- git clone https://github.com/paviliondev/discourse-locations.git
- git clone https://github.com/paviliondev/discourse-custom-wizard.git
- git clone https://github.com/Ahmedgagan/discourse-custom-email-digest.git
- git clone https://github.com/Ebsy/discourse-nationalflags.git
- git clone https://github.com/communiteq/discourse-private-topics.git
- git clone https://github.com/paviliondev/discourse-category-lockdown.git
- git clone https://github.com/merefield/discourse-chatbot.git
- exec:
cd: $home/plugins/discourse-fontawesome-pro
raise_on_fail: false
cmd:
- $home/plugins/discourse-fontawesome-pro/scripts/install.sh
I was unable to repro on another instance with all the same plugins Any ideas where to go from here? I desparetly need this and would be happy to pay for your time to troubleshoot if you’re willing…
Hi @davidkingham
I’d like to help figure out why some categories aren’t working as expected. Since you have the Data Explorer plugin installed, we can use it to peek at some settings in your site’s database.
Category Lockdown stores two pieces of info for each category:
lockdown_enabled : lockdown is turned on for the category
lockdown_allowed_groups : list the groups allowed
We’ll check if these settings look right for the categories that are giving you trouble. That is IF the data fetched matches what you have configured on each category security settings.
Step 1: Run Two Simple Checks
Check 1: See Which Categories Have Lockdown Turned On, paste this text exactly as it is:
SELECT
c.name AS category_name,
ccf.value AS lockdown_enabled
FROM
categories c
INNER JOIN
category_custom_fields ccf
ON
c.id = ccf.category_id
WHERE
ccf.name = 'lockdown_enabled'
ORDER BY
c.name
Check 2: See Which Categories Have Allowed Groups Set
SELECT
c.name AS category_name,
ccf.value AS lockdown_allowed_groups
FROM
categories c
INNER JOIN
category_custom_fields ccf
ON
c.id = ccf.category_id
WHERE
ccf.name = 'lockdown_allowed_groups'
ORDER BY
c.name
Are the problematic categories showing up in both lists the way you expect?
Thanks for taking the time to check this—If anything’s unclear or you run into trouble running the queries, just let me know, and I’ll help you out.
Thank you! There is something odd in the first test. The categories that are working as expected return t
and the categories that are not redirecting are returning true
.
The second test only returns this:
?column?
1
1 Like
Can you try to toggle one of those that is set to true
? Disable the lockdown setting on the category, save, enable it again, save, and see if it makes a difference.
1 Like