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

Missing migration / sharing a fix

$
0
0

@RGJ wrote:

After updating a customer to latest, the customer reported losing the customized email templates for the blocked (now silenced) user.

In order to fix this, we had to run

update translation_overrides set translation_key = 'system_messages.silenced_by_staff.subject_template' where translation_key = 'system_messages.blocked_by_staff.subject_template';
update translation_overrides set translation_key = 'system_messages.silenced_by_staff.text_body_template' where translation_key = 'system_messages.blocked_by_staff.text_body_template';

Maybe it’s handy to add this as a migration? (first check if there is no existing silenced_by key already)

Posts: 1

Participants: 1

Read full topic


Restrict access for specific user

$
0
0

@Bas wrote:

Is it possible to restrict access of a specific user?

My use case is that I want to create a “product feedback bot”-user, that will post in a specific category once people fill in a form embedded in our product.
The API key of this bot would most likely be visible to a determined (trusted) product user. I’d like to restrict the use to posting in a specific category.

Is there a way to strip them of any trust level? I can then grant them posting rights to a specific category

Posts: 6

Participants: 2

Read full topic

My forum is a white page

$
0
0

@remy_dev wrote:

Since last night, I have problems with my forum.

The page is well generated because I have html code on the page, but nothing in the body tag, so there is nothing to display.

In the logs ( /var/discourse/shared/standalone/log/ ) , I don’t find anything interesting, I don’t know where to look, because I don’t know what I am looking for …

I did several rebuildings with no result.
In the doubt I added 1 GB of ram (current total of 4.80 GB) whereas 3.8 was enough until now to launch the forum.

The actual result forum

Thanks

Posts: 4

Participants: 4

Read full topic

When will I be a TL2

«Beginners Guide to Install Discourse on Ubuntu for Development» fails on the `bundle exec rake autospec` step: «~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib/rspec/support.rb:28:in `require_relative': cannot load such file --»

$
0
0

@dmitry_fedyuk wrote:

@techAPJ

«Beginners Guide to Install Discourse on Ubuntu for Development».
I use the latest stock version of Ubuntu Desktop (16.04.3 LTS) which is unmodified, without any extra packages previously installed apart from the guide’s previous steps packages .

The bundle exec rake autospec guide’s step fails:

~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib/rspec/support.rb:28:in `require_relative': cannot load such file -- ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib/rspec/support/source (LoadError)
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib/rspec/support.rb:28:in `block in <module:Support>'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.6.0/lib/rspec/support.rb:19:in `block in define_optimized_require_for_rspec'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/world.rb:135:in `source_from_file'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/snippet_extractor.rb:18:in `source_from_file'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/snippet_extractor.rb:30:in `extract_expression_lines_at'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:218:in `read_failed_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:163:in `failure_slash_error_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:150:in `block in failure_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:149:in `tap'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:149:in `failure_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:34:in `colorized_message_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:240:in `formatted_message_and_backtrace'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:86:in `fully_formatted_lines'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:78:in `fully_formatted'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:200:in `fully_formatted'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:114:in `block in fully_formatted_failed_examples'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `each'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `each_with_index'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `fully_formatted_failed_examples'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_text_formatter.rb:32:in `dump_failures'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:206:in `block in notify'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:205:in `each'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:205:in `notify'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:175:in `block in finish'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:191:in `close_after'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:171:in `finish'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:81:in `ensure in report'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:81:in `report'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:112:in `run_specs'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:87:in `run'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:71:in `run'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:45:in `invoke'
	from ~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/exe/rspec:4:in `<top (required)>'
	from bin/rspec:16:in `load'
	from bin/rspec:16:in `<main>'

Posts: 1

Participants: 1

Read full topic

Sign up/suspended account info

Self install? Free forum

Migrating from a different platform to Discourse

$
0
0

@jerdog wrote:

So I’ve made the decision to move my company’s support forum from AnswerHub back to Discourse which we had before. I am looking for anyone who has gone from one platform to Discourse to see their path, steps, pitfalls, things they wish they had remembered, etc.

Posts: 1

Participants: 1

Read full topic


400 Bad Request Error

Installed Discourse in 30 minutes with no prior knowledge

$
0
0

@gerald wrote:

Hey,

Wanted to send big thanks to the devs, i was initially scared of all the ssh stuff and the Droplet configuration, but i followed the official guide and set up a self hosted Discourse in 30 minutes.
I have little idea what i actually did there, but bottom line it works :slight_smile:

Thanks!

Posts: 2

Participants: 2

Read full topic

Discourse not able to run through calculate average timings on a low resource environment

$
0
0

@axfelix wrote:

I originally made this thread about the issue I’m having but it wound up being sidetracked about IP header forwarding from a host nginx to the container (which was also a problem in my environment that I was happy to get resolved, though it seems like it was only exacerbating the issue, not the root cause):

Basically, I’m running Discourse on minimum spec (1GB of memory plus 2GB of swap) and the site would go down or very nearly go down, chugging a lot about once a day. If I looked at top while this was happening I noticed that a bit of swap had been released (like 200-300M) and inevitably a single postmaster process would be running for about two minutes, after which it would be killed and things would gradually return to normal.

I’ve just noticed that this happens when the container nginx logs rotate (i.e., access.log.1 is created), which seems like a big clue. Is your internal messaging queue (n.b. I don’t really know how Discourse works at all internally) somehow not handling this gracefully?

Posts: 26

Participants: 5

Read full topic

"There has been an error publishing this post to Discourse."

$
0
0

@gerald wrote:

The publishing worked 1 time. Since then I am getting this “There has been an error publishing this post to Discourse.” in Wordpress when trying to update a post with the publish to Discourse box checked.
I have wordpress 4.9.1, Discourse plugin 1.5.5 (it didn’t work on 1.5.4 either) and latest Discourse installed.

I looked at the log as suggested in another post, i get something like that when trying to publish:
[27/Dec/2017:21:46:51 +0000] “chat.example.com” 172.131.131.131 “POST /posts HTTP/1.1” “WordPress/4.9.1; https://www.example.com” “-” 403 459 “https://chat.example.com/posts” 0.059 0.063 “-”

It seems alright to me…

What else can I do?

Posts: 14

Participants: 2

Read full topic

"composer was opened without a draft key"

Importing from Google Groups

$
0
0

@yanokwa wrote:

@pacharanero’s fantastic post on Migration of Google Groups to Discourse only works with Discourse v1.7.2, so I wanted to share the steps I followed to import Google Groups into the Discourse v1.8.x (the latest stable version).

If you’ve installed and configured Discourse before and are comfortable on the command line, I hope this guide will be as helpful to you as @pacharanero’s guide has been to me.

If you run into any problems with these steps, just ask below and I’m glad to help. And if you have suggestions on how I can improve the guide, please share so we can make this process easier for everyone!

A few warnings before we start

Moving a community from Google Groups to Discourse is time-consuming, fragile, and annoying. If you can find someone who has done it before to do it for you, I’d strongly recommend that option!

If you’d like to try it yourself, then please read through all the steps first before attempting it. And please try it on a test server before actually moving your community. Again, it’s a fragile process.

The rough steps are to install and configure Discourse, install some prerequisites, scrape all your Google Groups messages (you’ll need to be a “Manager” to do this) into mbox files on the server, then import those mbox files into Discourse.

The download of the messages from Google Groups is slow so give yourself a few hours. I’d also recommend you put the Google Group in read-only mode so you don’t miss any new messages while doing the import.

The import is CPU and RAM intensive, I’d recommend using the biggest machine you can find, backup the Discourse data after the import, and then restore it to a production machine.

I’ve had trouble getting this guide to work on recent versions of Discourse v1.9.x, but it does work great on v1.8.x. On your import machine, edit /var/discourse/containers/app.yaml, set version to version: stable, do a rebuild, and use that version to be safe.

1. Install and configure Discourse

  1. Install Discourse!

  2. Skip Setup by clicking Maybe Later. Then in Settings…

    • Disable emails so you don’t spam anyone with a digest email
      • If you do a backup, you won’t get the notification to download
    • Grant yourself trust level 4 and moderator

2. Install prerequisites inside Docker

  1. Log into the server. You might want to use mosh/tmux instead of SSH since the import requires many long running tasks.

    ssh user@your-discourse-server
    cd /var/discourse
    ./launcher enter app
    
  2. Install pngout and pngquant. This is needed to compress images on import.

    cd /tmp
    wget http://static.jonof.id.au/dl/kenutils/pngout-20150319-linux-static.tar.gz
    tar zxvf pngout-20150319-linux-static.tar.gz
    cp pngout-20150319-linux-static/i686/pngout-static /usr/local/bin/pngout
    
    apt-get install build-essential libpng16-dev -y
    git clone --recursive https://github.com/pornel/pngquant.git
    cd pngquant
    make && make install
    
  3. Install sqlite3 for mbox import.

    apt-get install sqlite3 libsqlite3-dev -y
    
  4. Prep the Gemfile.

    cp /var/www/discourse/Gemfile /tmp/Gemfile
    
  5. Add sqlite3 to /tmp/Gemfile. The beginning of the file will look like this:

    source 'https://rubygems.org'
    # if there is a super emergency and rubygems is playing up, try
    #source 'http://production.cf.rubygems.org'
    
    gem 'sqlite3'
    
    # does not install in linux ATM, so hack this for now
    gem 'bootsnap', require: false
    
  6. Install the needed gems. There’s likely a better way of installing gems in deployment mode, but this is how I did it.

    cd /tmp/
    bundle install
    cp /tmp/Gemfile /var/www/discourse/Gemfile
    cp /tmp/Gemfile.lock /var/www/discourse/Gemfile.lock
    cd /var/www/discourse/
    bundle install
    
  7. Edit /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/discourse_image_optim-0.24.5/lib/image_optim/worker/jhead.rb to fix compression errors during import. The beginning of the file will look like this:

    require 'image_optim/worker'
    require 'exifr/jpeg'
    

Scrape messages from Google Groups

  1. Download @pacharanero’s awesome google_group.to_discourse script.

    cd /var/www/discourse/script/import_scripts/
    wget https://raw.githubusercontent.com/pacharanero/google-group-to-discourse-migration-script/master/googlegroup.rb
    
  2. Edit /var/www/discourse/script/import_scripts/googlegroup.rb to comment out import_to_discourse. The end of the file will look like this:

    setup
    scrape_google_group_to_mbox
    # import_to_discourse
    
  3. To scrape the emails from Google Groups, you will need a Google account with a “Manager” level access to the Google Group.

    Use Chrome to log into the Google Group using that manager account. Then with the cookies.txt extension, get a valid cookie file.

    SID, HSID, SSID from .google.com are all that is needed, so trim the large cookie file and put the resulting three lines at /var/www/discourse/script/import_scripts/cookies.txt. The file will look like this:

    .google.com TRUE  / FALSE 1568431805  HSID  gwB8B0z7IH8QPgYVz
    .google.com TRUE  / TRUE  1568431805  SSID  MPo7SOfkphRl9uqG0
    .google.com TRUE  / FALSE 1569505294  SID mEGqexZoGBVnTyO1NgPkdKI3zl10O6MmEGqexZoGBVnTyO1NgPkdKI3zl10O6MmGmDcN3G2
    
  4. Scrape messages from the Google Group. Depending on the size of your group, this step will take a few hours. Since it is a long process, it might be wise to backup the googlegroup-export folder after the scrape has finished.

    cd /var/www/discourse/script/import_scripts/
    RAILS_ENV=production bundle exec ruby googlegroup.rb my-list /var/www/discourse/script/import_scripts/cookies.txt
    
  5. Setup your data directory for the import.

    mkdir -p /var/www/discourse/script/import_scripts/mbox-import
    cd /var/www/discourse/script/import_scripts/mbox-import
    
  6. Edit /var/www/discourse/script/import_scripts/mbox/settings.yml to point to data directory. The file will look like this:

    data_dir: /var/www/discourse/script/import_scripts/mbox-import
    default_trust_level: 1
    split_regex: "/^From (.*) at/"
    
  7. Move all the my-list emails into a my-category folder. my-category will be created by the import script automatically.

    cp -r /var/www/discourse/script/import_scripts/googlegroup-export/my-list/mbox my-category
    chmod -R 777 /var/www/discourse/script/import_scripts/mbox-import
    
  8. Edit /var/www/discourse/script/import_scripts/mbox/importer.rb to make sure users are not staged. The create_users method will look like this:

    create_users(rows, total: total_count, offset: offset) do |row|
      {
        id: row['email'],
        email: row['email'],
        name: row['name'],
        trust_level: @settings.trust_level,
        staged: false,
        created_at: to_time(row['date_of_first_message'])
      }
    end
    

3. Import mbox files into Discourse

  1. Run the import. Depending on the size of your group, this step will take a few hours. The driver seems to be how many images need to be compressed by pngquant/pngout.

    su - discourse
    cd /var/www/discourse/script/import_scripts/
    RAILS_ENV=production bundle exec ruby mbox-experimental.rb mbox/settings.yml
    
  2. That’s it! All the messages from my-list should now be in my-category!

Frequently asked questions

  • Import is failing on a particular topic, how do I recover?

    The import may fail when creating a particular topic. Usually, it’s because there are some HTML or Unicode characters that can’t be parsed. Make a note of the number (e.g., 123) where the import failed, then run sqlite3 index.db to get into the import database. A query like this, will show you the bad message.

    SELECT msg_id, from_email, from_name, subject, email_date, attachment_count
    FROM email
    WHERE in_reply_to IS NULL
    ORDER BY DATE(email_date)
    LIMIT 1
    OFFSET 123;
    

    Remove the bad message from /var/www/discourse/script/import_scripts/mbox-import, delete the index.db and re-run the import.

  • How do I add members who signed up for the Google Group, but didn’t send messages?

    The scrape only creates accounts for members who have sent messages to the Google Group.

    If you’d like to create accounts for your “silent” members, you’ll need to copy and paste the names, emails, and sign up dates from the Google Group’s member list. You must copy and paste because Export Members doesn’t work on large groups, so scroll to the bottom of the member list and then copy all.

    Then clean up the data as you see fit, add load data into the users table. The data should look like this:

    ssmith@gmail.com, "Sally Smith", 2012-05-18T00:00:01-00:00
    molly.mathers@gmail.com, "Molly Mathers", 2010-01-05T00:00:01-00:00
    

    Finally, edit /var/www/discourse/script/import_scripts/mbox/importer.rb to only import users.

    def execute
      # index_messages
      # import_categories
      import_users
      # import_posts
    end
    
  • How do I update the Google Group scrape with new messages?

    Modify the googlegroup.rb script so instead of running the wget command, you run the update command. The file will look like this:

    puts "This stage takes longer than the first pass and can take hours, depending on the size of your Google Group\n\n".blue
    
    system './crawler.sh -rss > update.sh'
    system 'chmod +x ./update.sh'
    system './update.sh'
    
    system "chmod -R 777 #{ENV["_GROUP"]}"
    

Posts: 1

Participants: 1

Read full topic

Top sorting in categories does not respect sticky posts


Cannot assign subcategory for embedding

$
0
0

@quimgil wrote:

In /admin/customize/embedding, when adding a host there is an option to select the category where embedded topics will be created. As far as I can see, only categories are offered in the dropdown, not subcategories.

Posts: 4

Participants: 3

Read full topic

Apply category notification preferences to existing users

$
0
0

@quimgil wrote:

I have created a new category. Then I have set its notifications to Muted by default via “default categories muted” at /admin/site_settings/category/user_preferences.

These settings will be inherited by new users, but… I see that existing users will receive notifications until they manually change their preferences. I fear many of these users will not even know they can do that, they will only feel overwhelmed about the new incoming traffic and they will unsubscribe from notifications altogether.

Is there a way to change this setting for all existing users at once. I see that I could do it one by one manually…

Posts: 2

Participants: 2

Read full topic

Existing Tags don't appear the "optional tags" list and cannot be used

$
0
0

@dalerka wrote:

I have a list of about 100 tags added in Tag-Group-A, some of them have been used to tag posts (active), some of them never used.

For unknown reason some of the existing tags (used and never used) stop appearing in the optional tags list when trying to add them to a topic (either new or when editing old topic).

Any ideas how to fix the weird things described below?

Observation 1:

As an admin I can create a copy of such a broken tag and add it to a topic, i.e.:

  • Suppose I have a broken “tagX”, when I type the “tagX” into the tag-chooser, I get the No matches found note (although it is in “Tag-Group-A” and category has no tag restrictions).
  • But if I add a " " (space), then the “tagX” gets added to the list of tags (in the input box).
  • However, when I hit save button the tagX appears in the tags list under the title of the topic, but immediately disappears. :crazy_face: (looks like optimistic updates)

Observation 2:

  • I removed the broken tags from “Tag-Group-A” and added them to a new “Tag-Group-B”.
  • Now I can successfully add those tags to new and old topics, as expected.
  • The reverse doesn’t work, i.e. if I move those tags back to “Tag-Group-A” - same problem. :frowning:

Observation 3:

I’ve looked at number of topics about tags (including Tag gets broken if the first topic to use it is deleted) and:

  • going to my.site/latest?status=deleted for the first time, I saw the list of previously deleted topics.
  • I opened one deleted topic and removed some tags (although those tags weren’t among broken ones) and saved the post (and deleted it again).
  • after that going to the same my.site/latest?status=deleted, I repeatedly get the 404 page (Page doesn’t exist or not public) although I’m the Admin :upside_down_face:

EDIT: This is single-container Discourse-only VPS, at (5ad1709)

Posts: 1

Participants: 1

Read full topic

"Solved" onebox does not display images

$
0
0

@Stefan_Fairphone wrote:

Hi there,

we have the issue that solutions that contain images are not displayed with the image in the first post. The solution onebox only contains the words [image]. See a screenshot:

Direct link:

Our Discourse version is 1.8.10

Best, Stefan

Posts: 1

Participants: 1

Read full topic

How to change authentication method?

$
0
0

@Stefan_Fairphone wrote:

Hi everyone,

I’m at the moment logging in to meta.discourse.org via my Twitter account, but I want to delete that account. That’s the reason why I would like to change to a native authentication method (e.g. log in to meta.discourse.org via email + pw). Is this possible or will I have to create a new account?

Best, Stefan

Posts: 3

Participants: 2

Read full topic

Viewing all 60707 articles
Browse latest View live




Latest Images