Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60613 articles
Browse latest View live

Cannot delete topic that is assigned

$
0
0

@jomaxro wrote:

When a topic is assigned to a user via Discourse assign the topic can no longer be deleted.

Repro:

  1. Assign a topic to a staff member
  2. Attempt to delete a topic
  3. Topic is not deleted - no visible feedback

Error:

NoMethodError (undefined method `publish_change_to_clients!' for nil:NilClass)
/var/www/discourse/plugins/discourse-assign/lib/topic_assigner.rb:170:in `unassign'
Log Backtrace
/var/www/discourse/plugins/discourse-assign/lib/topic_assigner.rb:170:in `unassign'
/var/www/discourse/plugins/discourse-assign/plugin.rb:195:in `block (2 levels) in activate!'
/var/www/discourse/lib/plugin/instance.rb:258:in `block in on'
/var/www/discourse/lib/discourse_event.rb:12:in `block in trigger'
/usr/local/lib/ruby/2.4.0/set.rb:324:in `each_key'
/usr/local/lib/ruby/2.4.0/set.rb:324:in `each'
/var/www/discourse/lib/discourse_event.rb:11:in `trigger'
/var/www/discourse/app/models/post_action.rb:157:in `agree_flags!'
/var/www/discourse/lib/post_destroyer.rb:197:in `agree_with_flags'
/var/www/discourse/lib/post_destroyer.rb:115:in `block in perform_delete'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/var/www/discourse/lib/post_destroyer.rb:107:in `perform_delete'
/var/www/discourse/lib/post_destroyer.rb:50:in `destroy'
/var/www/discourse/app/controllers/topics_controller.rb:459:in `destroy'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/conditional_get.rb:38:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:149:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/lograge-0.7.1/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/plugins/discourse-prometheus/lib/middleware/metrics.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiler.rb:174:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/message_bus-2.1.2/lib/message_bus/rack/middleware.rb:63:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:176:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `<main>'

Posts: 1

Participants: 1

Read full topic


Found a workable CSS hack to show spinner/loader on slow initial load

$
0
0

@daveaevion wrote:

I’ve read a few posts about people wanting a spinner or loading image for the initial discourse load as it may be quite slower than subsequent loads. I realize this is a CSS hack and not a fancy or beautiful fix, but it is working well enough for my discourse needs.

If you want to use the discourse spinner on the initial load in addition to between page loads, follow the following steps.

Step 1:

Add the following code to your CSS:

#main {background: white;}

The main container is naturally a higher z-index than the header so this step ensures that once it loads, it will cover up the spinner.

Step 2:

Place this code in your header:

<div class="spinner" style="margin: 70px calc(50vw - 19px); position: absolute;"></div>

This loads the built-in discourse CSS spinner, but feel free to use another if you’d prefer.

This code will center the spinner on your screen and place it high up enough to not create a duplicate spinner when doing page loads later on. The calc is half of the 30px spinner width (15px), plus the 4px border.

Working example

If someone could create a javascript script that would delete the spinner div after the initial page load, it would simply disappear after serving its initial purpose, and there would be no need for step 1.


It’s definitely quick, but at least on the desktop, there should be a briefly visible spinner on the initial discourse page load vs. nothing but white on vanilla.

The header section is being loaded faster than the main container which explains why it shows up. I guess the slower the server, the more use this has.

Video comparison between this CSS hack and Vanilla Discourse

https://drive.google.com/file/d/1xkBZEfVQP_5-4_pIattqoTWe6uUiZl30/view

Posts: 4

Participants: 2

Read full topic

SSO redirect link

Issue with import script

$
0
0

@Cara wrote:

Hi,
I’m trying to import an old punBB. I have discourse installed and running, I can launch the script but it look fort first_post_id and I have only the last_post_id…

I tried to change the order of import but everything is upside down…

Any Idea on how I change the punBB import script to use the last_post_id?

Here it is the post part of the script I’m using:

def import_posts
    puts "", "creating topics and posts"

    total_count = mysql_query("SELECT count(*) count from boulette_posts").first["count"]

    batches(BATCH_SIZE) do |offset|
      results = mysql_query("
        SELECT p.id id,
               t.id topic_id,
               t.forum_id category_id,
               t.subject title,
               t.last_post_id first_post_id,
               p.poster_id user_id,
               p.message raw,
               p.posted created_at
        FROM boulette_posts p,
             boulette_topics t
        WHERE p.topic_id = t.id
        ORDER BY p.posted
        LIMIT #{BATCH_SIZE}
        OFFSET #{offset};
      ").to_a

      break if results.size < 1
      next if all_records_exist? :posts, results.map { |m| m['id'].to_i }

      create_posts(results, total: total_count, offset: offset) do |m|
        skip = false
        mapped = {}

        mapped[:id] = m['id']
        mapped[:user_id] = user_id_from_imported_user_id(m['user_id']) || -1
        mapped[:raw] = process_punbb_post(m['raw'], m['id'])
        mapped[:created_at] = Time.zone.at(m['created_at'])

        if m['id'] == m['first_post_id']
          mapped[:category] = category_id_from_imported_category_id("child##{m['category_id']}")
          mapped[:title] = CGI.unescapeHTML(m['title'])
        else
          parent = topic_lookup_from_imported_post_id(m['first_post_id'])
          if parent
            mapped[:topic_id] = parent[:topic_id]
          else
            puts "Parent post #{m['first_post_id']} doesn't exist. Skipping #{m["id"]}: #{m["title"][0..40]}"
            skip = true
          end
        end

        skip ? nil : mapped
      end
    end
  end

Thanks for your support

Posts: 2

Participants: 1

Read full topic

Notification emails of new users not being sent with SSO

$
0
0

@rtendesign wrote:

I have our forum set to where the staff must approve all new user accounts, but the notification emails of new users are not being sent. When we first set this up, it worked fine. Now the admin no longer receives emails letting us know a new user is awaiting approval. I think the problem is that the new users aren’t being sent to “Pending”, but I don’t know why. I have to go to users -> new to find the ones that haven’t been approved. I’m also not receiving notifications of new users within Discourse.

Using WP 4.9.4 running WPLMS
WP-Discourse v1.5.8
BuddyPress v2.9.3

Posts: 2

Participants: 1

Read full topic

Discourse loacl instance trying to connect to Wordpress

$
0
0

@guillaumeeb wrote:

Hi everyone,

I’ve installed a discourse forum on a private data center (VMWare based). It works fine, no problem with it, but my IT department is telling me that there are a lot of connection tries between my discourse VM and wordpress.com on 443 port, is this normal?

Posts: 1

Participants: 1

Read full topic

[Android] Topic control dropdown activates keyboard

$
0
0

@daath wrote:

One of my users notified me that when you use Android and activate the “topic control”-dropdown, the keyboard activates, even though you can’t input anything anywhere. I confirmed it on my S8+ with Oreo using Chrome.

Posts: 1

Participants: 1

Read full topic

Trust Level Requirements from API


Automatically update @mentions after renaming a group

$
0
0

@mcwumbly wrote:

I’ve been talking about getting groups going on our site for an embarrassingly long time now, but we’re finally doing it. At least, I publicly committed to it 3 weeks ago on our forum. One thing that was giving me a bit of anxiety was trying to establish some good naming conventions up front so we can have some more consistency and discoverability.

I was under the impression that if I were to choose a name like @foo and then later rename the group to @bar that it would break all previous mentions of that group.

But I just tested this out and it seemed to work.

  1. I created a group named @foo and made it mentionable
  2. I created a post and mentioned @foo within the post
  3. I changed the group name from @foo to @bar
  4. I went back to my post and was pleasantly surprised to see that @bar now showed up and went to the same group when I clicked it. Hmm… I can’t reproduce this anymore… the post still says @foo and is a broken link.

I’m still not quite over my anxiety though given the past conversations here about the difficulty of not breaking mentions when renaming users.

So help me out - is the existence of this feature for updating group mentions automatically on renames something I should believe in? Or did my eyes just play tricks on me?

Posts: 3

Participants: 2

Read full topic

Questions from a Newbie

$
0
0

@Irwin_Binamungu wrote:

I have got a couple of questions, hope this won’t sound weird as I am new to the forum world. Here I go:

  1. If a user is deleted, can their posts remain and instead of having his/her username, they get to have a generic name like user0058 ?
  2. How can someone setup private staff forums?
    3.Is it possible to remove dates for pre-launch content?
  3. Is it possible to limit a post creator from replying to their own post say 48 hours prior to receiving a response?
  4. Is it possible to have Discourse User Roles such that if someone signs up, they can pick their user role based on their profession.
    If it is also possible to have these user roles mentioned below their names; the way Admin User Role is shown below an Admin’s Name that would be great.
  5. Is there a way to hide a post before deleting it? This is such that it can be reviewed by staff or administrators.
  6. To what percentage should a language be translated and reviewed before it can be used as a Discourse Language Interface?
    Thanks…

Posts: 3

Participants: 2

Read full topic

How to correct change the forum

$
0
0

@nikitabytsko wrote:

I’m a noob in Discourse and ROR. But i should make a lot of tasks on Discourse forum like a rewriting login page, add menu, change categories and others. Please help me. Should i change the code in discourse folder or site admin page?

Posts: 3

Participants: 2

Read full topic

Discourse comments

Issue with upload avatar during import

$
0
0

@Cara wrote:

HI,
I’m trying to import avatar for users. I do this in the punbb.rb import file:

create_users(results, total: total_count, offset: offset) do |user|
        { id: user['id'],
          email: user['email'],
          username: user['username'],
          name: user['name'],
          created_at: Time.zone.at(user['created_at']),
          website: user['website'],
          registration_ip_address: user['registration_ip_address'],
          location: user['location'],
          moderator: user['group_id'] == 4,
          admin: user['group_id'] == 1 ,
          post_create_action: proc do |newuser|
            origname=user['avatar_file']
            path='var/www/discourse/avatars'
            upload = create_upload(newuser.id, path, origname)
            if @upload
              newuser.create_user_avatar
              newuser.user_avatar.update(custom_upload_id: upload.id)
              newuser.update(uploaded_avatar_id: upload.id)
            else
              puts "Upload failed."
            end
          end
        }

I’m noob regarding Ruby, I don’t understand where it doesn’t work. “Upload failed” even for user I know I have upload the correct file to ‘var/www/discourse/avatars’…

Thanks for your support

Posts: 1

Participants: 1

Read full topic

Suggestion: option to exclude tag group from max tags per topic

$
0
0

@tobiaseigen wrote:

As we roll out using admin tags to use discourse as a ticket system in our community, we’re bumping up against the max tags per topic feature. We like the default of 5 tags per topic to prevent members from overusing tags, however tickets have 3 tags (ticket, priority, status) which leaves only 2 for tagging.

My suggestion would be to add an admin setting to tag groups to exclude the tags in the group from this limit. Or at least to exclude staff tags from this limit.

Posts: 1

Participants: 1

Read full topic

Right way to customize login page and others things

$
0
0

@nikitabytsko wrote:

Good evening. I wanna know the right way of customization of the login page. I should made it like a plugin or from the admin page? And i wanna change the categories page, should i change it from the admin page, discourse core or plugin?

Posts: 6

Participants: 3

Read full topic


Ember errors when adding script to

$
0
0

@JohnONolan wrote:

Have searched (a lot) to try and make sure I’m not missing something, but I’m totally stumped. Currently adding any sort of <script> tag to any part of the theme editor is throwing a 403 error on Ember JQuery.

Anyone know what’s going on here? (Using a fresh Discourse install hosted on Discourse.org)

Followed instructions here - Add javascript from optimizely

Error below, which I can consistently reproduce. Saving anything other than a script works fine.

Posts: 5

Participants: 3

Read full topic

My forum blocked in Norton Security Toolbar

$
0
0

@yanokwa wrote:

We have a user who can’t access our website because the Norton “Security” Toolbar says the site is dangerous.

When I check on https://safeweb.norton.com/report/show?url=forum.opendatakit.org, it says that there is a phishing attack at https://forum.opendatakit.org/t/google-drive-sheets-as-server/12208.

The only thing that looks phishy to my eye on that topic is that a user has posted their email address. Seems absurd that Norton would flag that, but I’ve seen stranger things happen.

Has anyone else experienced this problem?

Posts: 2

Participants: 2

Read full topic

More-privacy: hide parts of user profiles

$
0
0

@JSey wrote:

Continuing the discussion from Restrict public viewing of user profile:

I have just released the very first version of a plugin that tries to accomplish what users from my community want: make the user profiles look like this:

public
when viewed from the anonymous account, and like this:

authenticated
after logging in. Settings are currently limited to this:

Note that currently, user cards are not yet altered (which is clearly missing because otherwise, this plugin is a bit pointless. I will add this ASAP). I am also looking for a better approach for the user.hbs copy I have to maintain within that plugin - any pointers are welcome. I found @neil’s remark here, but the link for the example is broken.

Here’s the plugin on GitHub:

Posts: 8

Participants: 5

Read full topic

Improvements to Custom Avatars UX

$
0
0

@BlackKnob wrote:

Currently, to add a custom set of avatars, you have to add links, one by one, to Settings/ Default Avatars.
It would be useful if we could upload the whole set of avatars to a new post, and then just copy the link to this post to Settings/ Default Avatars.

In addition to this, it would be great if users could pick an avatar from this custom pool, after an initial random allocation.

Posts: 1

Participants: 1

Read full topic

Using topic.destroy(id) to delete illegal content

$
0
0

@vikaskedia wrote:

My goal was to delete a topic from the DB due to legal reasons.

so I ran the command:

root@he-ps09-superstars:/var/www/discourse# echo “Topic.destroy(id)” | rails c

The topic was deleted :+1:

The category still thinks there is 1 topic and I cannot delete the category.

Posts: 5

Participants: 2

Read full topic

Viewing all 60613 articles
Browse latest View live




Latest Images