Unable to access one of our categories

https://meta.discourse.org/t/discourse-2-6-0-beta5-release-notes/168756

Wondering about no longer being able to access one of our categories as of updating to beta5. Let me know on any logs needed. I’m an admin, but when I attempt to click and select this one specific category by name I see:
cannot-edit

All other categories open just fine as far as I can tell.

Does this category have unusual characters in its name?

1 Like

“Community Calendar”

Checking back in on if anyone has advice for getting this category, “Community Calendar”, merged with another category. Still cannot access it by selecting the category, individual posts are still available and not seeing any error logs popping up either.

Oops! That page doesn’t exist or is private. :thinking:

1 Like

Here is the rails output for this category.

Summary

#<Category:0x000055cde93db078
id: 36,
name: “Community Calendar”,
color: “ED207B”,
topic_id: 419,
topic_count: 15,
created_at: Sun, 24 Mar 2019 18:10:42 UTC +00:00,
updated_at: Sun, 20 Dec 2020 08:27:45 UTC +00:00,
user_id: 2,
topics_year: 5,
topics_month: 0,
topics_week: 0,
slug: “Unofficial-events”,
description: “This <a href=“https://discuss.noisebridge.info/calendar”>unofficial, community calendar is for any event you wish to share! Life outside Noisebridge.”,
text_color: “FFFFFF”,
read_restricted: false,
auto_close_hours: nil,
post_count: 26,
latest_post_id: 8837,
latest_topic_id: 2105,
position: 20,
parent_category_id: nil,
posts_year: 9,
posts_month: 0,
posts_week: 0,
email_in: nil,
email_in_allow_strangers: false,
topics_day: 0,
posts_day: 0,
allow_badges: true,
name_lower: “community calendar”,
auto_close_based_on_last_post: false,
topic_template: “This Calendar is for any event you want to share!\nEvents do not have to involve Noisebridge!\n”,
contains_messages: nil,
sort_order: “”,
sort_ascending: nil,
uploaded_logo_id: 504,
uploaded_background_id: nil,
topic_featured_link_allowed: true,
all_topics_wiki: false,
show_subcategory_list: false,
num_featured_topics: 3,
default_view: “calendar”,
subcategory_list_style: “rows_with_featured_topics”,
default_top_period: “all”,
mailinglist_mirror: false,
minimum_required_tags: 0,
navigate_to_first_post_after_read: false,
search_priority: 0,
allow_global_tags: false,
reviewable_by_group_id: nil,
required_tag_group_id: nil,
min_tags_from_required_group: 1,
read_only_banner: nil,
default_list_filter: “all”>

1 Like

It may have something to do with this:

1 Like

Thanks, seems I’ll need to apply the default_view fix from the rails console. Unclear on how to fix category “Unofficial-events” with id 36 to use latest view.

I attempted to follow these instructions. Unclear of if I need to re-write myCategory as Unofficial-events along with id 36.

Still a noob on rails console. Summary of my attempt

$ ./launcher enter app

rails c

[1] pry(main)> Unofficial-events = Category.find_by(id: 36)
NameError: uninitialized constant Unofficial
from (pry):1:in __pry__' [2] pry(main)> Unofficial-events.default_view = "latest" NameError: uninitialized constant Unofficial from (pry):2:in pry
[3] pry(main)> Unofficial-events.save!
NameError: uninitialized constant Unofficial
from (pry):3:in __pry__' [4] pry(main)> myCategory = Category.find_by(id 36) NoMethodError: undefined method id’ for main:Object
from (pry):4:in `pry
[5] pry(main)>

2 Likes

:thinking: I’m not sure about the dash in Unofficial-event, myCategory as var name should work.

from (pry):3:in __pry__' [4] pry(main)> myCategory = Category.find_by(id 36) NoMethodError: undefined method id’ for main:Object
from (pry):4:in ` pry
[5] pry(main)>

Thank you @Benjamin_D. If anyone has to do this, just note there is a small typo in this post on the last step and you save with myCategory.save!

2 Likes

you’re missing : between id and 36

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.