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

Confirmation Field Type in User Fields not showing Field Name in Interface

$
0
0

@chi wrote:

I don’t know if it’s a bug, but the confirmation field type in the User Field doesn’t show the Field Name in the modal view, only the description or checkbox.

Posts: 2

Participants: 2

Read full topic


Bootstrap fails on clean CentOS 7 install

$
0
0

@Dan_Healy wrote:

Steps for reproduction:

  1. Install CentOS 7
  2. yum install curl wget nano zip unzip open-vm-tools -y
  3. yum update -y
  4. Disable SELinux and reboot
  5. Install Docker-CE (using instructions from Docker.com Get Docker CE for CentOS | Docker Documentation)
  6. Test that Docker is install and running properly. Add root and local user to docker usergroup.
  7. Install Discourse per instructions:
    As root:
    mkdir /var/discourse
    git clone https://github.com/discourse/discourse_docker.git /var/discourse
    cd /var/discourse
    ./discourse-setup

Sitename: forum.example.com
Admin email: admin@example.com
SMTP server: mailrelay.example.com
Username: [Enter]
Password: [Enter]
Let’s Encrypt: [Enter]

(Message displayed that ./launcher can’t run with default user/pass and to edit containers/app.yml

  1. nano containers/app.yml
    Add DISCOURSE_SMTP_AUTHENTICATION: 'none' to end of STMP section
    Uncomment TLS and change to false
    Change user/pass to something other than default - shouldn’t matter since I configured authentication to be off.

  2. Bootstrap app ./launcher bootstrap app

Log output:

I, [2017-08-25T07:32:38.278610 #13]  INFO -- : > cd /var/www/discourse && gem update bundler
I, [2017-08-25T07:32:42.411593 #13]  INFO -- : Updating installed gems
Updating bundler
Successfully installed bundler-1.15.4
Gems updated: bundler

I, [2017-08-25T07:32:42.411707 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse /var/www/discourse
chown: cannot access '/var/www/discourse/app/assets/javascripts/admin/components/expanding-text-area.js.es6': No such file or directory
chown: cannot access '/var/www/discourse/app/assets/javascripts/discourse/components/small-action.js.es6': No such file or directory
chown: cannot access '/var/www/discourse/app/assets/javascripts/discourse/templates/components/small-action.hbs': No such file or directory
chown: cannot access '/var/www/discourse/lib/autospec/spork_runner.rb': No such file or directory
chown: cannot access '/var/www/discourse/lib/plugin/theme.rb': No such file or directory
chown: cannot access '/var/www/discourse/lib/site_setting_validations.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/controllers/admin/flags_controller_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/fixtures/site_settings/env.yml': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/admin/backups_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/admin/emojis_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/admin/groups_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/groups_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/managing_topic_status_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/omniauth_callbacks_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/safe_mode_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/tags_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/integration/users_spec.rb': No such file or directory
chown: cannot access '/var/www/discourse/spec/jobs/clean_up_unused_staged_users.rb': No such file or directory
chown: cannot access '/var/www/discourse/test/javascripts/controllers/flag-test.js.es6': No such file or directory
I, [2017-08-25T07:32:46.116337 #13]  INFO -- :
196:signal-handler (1503646366) Received SIGTERM scheduling shutdown...
I, [2017-08-25T07:32:46.116739 #13]  INFO -- : Terminating async processes
I, [2017-08-25T07:32:46.116810 #13]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 83
I, [2017-08-25T07:32:46.116918 #13]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 196
2017-08-25 07:32:46.117 UTC [83] LOG:  received fast shutdown request
2017-08-25 07:32:46.117 UTC [83] LOG:  aborting any active transactions
2017-08-25 07:32:46.117 UTC [90] LOG:  autovacuum launcher shutting down
2017-08-25 07:32:46.132 UTC [87] LOG:  shutting down
196:M 25 Aug 07:32:46.380 # User requested shutdown...
196:M 25 Aug 07:32:46.380 * Saving the final RDB snapshot before exiting.
196:M 25 Aug 07:32:46.389 * DB saved on disk
196:M 25 Aug 07:32:46.389 # Redis is now ready to exit, bye bye...
2017-08-25 07:32:46.690 UTC [87] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && chown -R discourse /var/www/discourse failed with return #<Process::Status: pid 313 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "chown -R discourse $home"]}
3c4a42f8102bc22506745ded18e64c6d739db17d676ab3192573ff399a083c52
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Posts: 2

Participants: 2

Read full topic

Export a list of people who replied to a specific topic

$
0
0

@alefattorini wrote:

Sometimes I need to mention a specific group of people who replied to a specific topic into a new one.
That’s because I’d like to involve them into a similar discussion
image

How can I do that quickly? Is there any particular query for that?

Posts: 8

Participants: 4

Read full topic

New user tutorial :heart:

$
0
0

@elberet wrote:

So, I haven’t visited this forum in almost two years now, after I for all intents and purposes fell off the face of the earth for personal reasons…

Anyways, I’ve just now seen the new new user experience over at GitLab’s Community Discourse, and what you fine gentlemen have done here over the years still impresses the hell out of me. :slight_smile: :clap:

Posts: 7

Participants: 5

Read full topic

Reddit new algorithm

$
0
0

@Ham wrote:

Not sure if this is a good place for it but just an idea. Reddit is working on a new algorithm that tracks what you are not reading and when you refresh the home page or our “latest” it gives you new content you haven’t seen.

Is this even possible via a plugin or something?

Posts: 3

Participants: 3

Read full topic

Redis not able to persist to disk while running import?

$
0
0

@pfaffman wrote:

I’m running an importer that I’ve written and get an error complaining about Redis. I’ve never seen this. I’ve not had a chance to look more closely at the message yet for clues there. Any ideas on this?

This is on a development instance.

  228021 / 944571 ( 24.1%)  [732 items/min]  Exception while creating post comment#276417. Skipping.
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.3/lib/redis/client.rb:121:in `call'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.3/lib/redis.rb:494:in `block in del'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.3/lib/redis.rb:58:in `block in synchronize'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.3/lib/redis.rb:58:in `synchronize'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.3/lib/redis.rb:493:in `del'
/home/pfaffman/src/discourse/lib/discourse_redis.rb:192:in `block in del'
/home/pfaffman/src/discourse/lib/discourse_redis.rb:146:in `ignore_readonly'
/home/pfaffman/src/discourse/lib/discourse_redis.rb:190:in `del'
/home/pfaffman/src/discourse/lib/distributed_mutex.rb:24:in `ensure in synchronize'
/home/pfaffman/src/discourse/lib/distributed_mutex.rb:25:in `synchronize'
/home/pfaffman/src/discourse/lib/distributed_mutex.rb:5:in `synchronize'
/home/pfaffman/src/discourse/lib/post_creator.rb:297:in `block in transaction'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/transactions.rb:220:in `transaction'
/home/pfaffman/src/discourse/lib/post_creator.rb:291:in `transaction'
/home/pfaffman/src/discourse/lib/post_creator.rb:140:in `create'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:491:in `create_post'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:444:in `block in create_posts'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-mini-profiler-0.10.5/lib/patches/db/mysql2.rb:6:in `each'
/home/pfaffman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-mini-profiler-0.10.5/lib/patches/db/mysql2.rb:6:in `each'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:431:in `create_posts'
script/import_scripts/ipboard.rb:747:in `block in import_posts'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:784:in `block in batches'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:783:in `loop'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:783:in `batches'
script/import_scripts/ipboard.rb:725:in `import_posts'
script/import_scripts/ipboard.rb:145:in `execute'
/home/pfaffman/src/discourse/script/import_scripts/base.rb:45:in `perform'
script/import_scripts/ipboard.rb:995:in `<main>'

Posts: 4

Participants: 2

Read full topic

Bad user experience when quoting an entire post via toolbar button

$
0
0

@ralight wrote:

I was just writing a post over at community.badvoltage.org in reply to a topic that had already been created. After I’d finished a chunk of what I wanted to write, I decided that it needed to be block quoted. I selected the text to be quoted, then accidentally clicked “Quote whole post” rather than “Blockquote”. The end result is that my text was deleted and replaced with the whole post. At this point I realised my error and tried to undo. Nothing happened. I saw the “saved” text appear, exactly as when I’d been writing the original text. As far as I can tell, there is one draft and one alone, so once that “saved” appeared my text was lost for good.

I accept that this was my mistake, but it’s not a great user experience. I do not think that “Quote whole post” should be a destructive operation with no chance for return.

This is my first complaint in otherwise very satisfactory use of Discourse, thanks for making it.

Posts: 11

Participants: 5

Read full topic

Korean translation mistake


Solution: How to add forum search results to Wordpress search

$
0
0

@lkramer wrote:

Hello all. I finally found a little slice of time to try pulling search results from Discourse into Wordpress’s search. The gist is that I created a separate script which uses the Discourse API to do a search query and then I just include this as an iframe in the Wordpress search template.

This may not be the ideal solution for everyone because it show the Discourse results in a separate column from the Wordpress results, not all mixed together.

Here’s a screenshot of how it looks. The forum results are in the grey column next to the Wordpress results:

Step 1:

Create a standalone php script called something like discoursesearch.php and upload it wherever you want to your server:

<?php

define('WP_USE_THEMES', false);
require_once('./wp-blog-header.php');

if (isset($_GET['s'])) {
    $search_term = str_replace('+',' ',$_GET['s']);
    $search_term = str_replace('\"','"',$_GET['s']);
}else{
    exit;
}

// change this to your forum's info
$api_key="YOURAPIKEY";
$api_user="system";
$url_base="https://www.yourforum.com/";
$api_auth="api_key=" . $api_key . "&api_username=" . $api_user;

$ch = curl_init();
$url = $url_base . "search/query.json?term=".urlencode($search_term)."&" . $api_auth;

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);

$response = curl_exec($ch);

$response_data = json_decode($response, true);

if ( !isset($response_data['errors']) )	{

	$all_posts = $response_data['posts'];
	$all_topics = $response_data['topics'];

	$num_results = count($all_posts);

	if ( $num_results > 0 )
		echo '<h3>Forum Discussions</h3>';

	for ( $i=0; $i<$num_results; $i++ ) {

		// see here for all the fields that can be parsed from the search results http://docs.discourse.org/#tag/Search
		$topic_title = $all_topics[$i]['title'];
		$result_url = $url_base . 't/' . $all_topics[$i]['slug'] . '/' . $all_posts[$i]['topic_id'] . '/' . $all_posts[$i]['post_number'];
		$blurb = str_ireplace($search_term,'<b>'.$search_term.'</b>',$all_posts[$i]['blurb']);
		$username = $all_posts[$i]['username'];
		$avatar = $url_base . str_replace('{size}','30',$all_posts[$i]['avatar_template']);
		echo '<p><a href="'.$url_base.'u/'.$username.'/summary"><img src="'.$avatar.'" align="left"></a><a href="'.$result_url.'">' . $topic_title . '</a>' . '</p><p>' . $blurb . '</p>';

	}

	echo '<p><a href="'.$url_base.'search?q='.$search_term.'">See all forum discussions about: '.$search_term.'</a></p>';
}
?>

Step 2:

Then open up the search template file for your Wordpress theme and put this where ever you’d like the search results to appear:

<iframe src="./discoursesearch.php?s=<?php echo get_search_query();?>" height="1000" width="100%" style="height:1000px;width:100%;"></iframe>

That’s it. A bit quick and dirty but it does the job. Hopefully this will be helpful to someone! :slight_smile:

Posts: 5

Participants: 2

Read full topic

Getting basic database table, size and count statistics

$
0
0

@sam wrote:

The task rake db:stats will print out basic database stats.

./launcher enter app
rake db:stats

table_name                 | row_estimate | size
---------------------------------------------------
email_logs                 | 4027838      | 611 MB
post_timings               | 9193590      | 388 MB
posts                      | 285127       | 266 MB
post_search_data           | 285127       | 194 MB
topic_views                | 4177774      | 185 MB
optimized_images           | 683840       | 136 MB
topic_users                | 1450648      | 134 MB
topic_links                | 647432       | 111 MB
unsubscribe_keys           | 905960       | 109 MB
incoming_links             | 1828047      | 107 MB
notifications              | 404150       | 91 MB
topics                     | 142508       | 80 MB
topic_search_data          | 142913       | 72 MB
topic_link_clicks          | 1159317      | 70 MB
directory_items            | 701916       | 51 MB
user_actions               | 629565       | 46 MB
users                      | 116988       | 35 MB
user_visits                | 519360       | 26 MB
post_stats                 | 284715       | 19 MB
topic_allowed_users        | 245966       | 14 MB
post_revisions             | 17369        | 14 MB
uploads                    | 52288        | 14 MB
email_tokens               | 119044       | 13 MB
user_options               | 116988       | 12 MB
scheduler_stats            | 101012       | 12 MB
user_search_data           | 116988       | 12 MB
draft_sequences            | 219310       | 11 MB
user_stats                 | 116988       | 11 MB
group_users                | 144370       | 9632 kB
user_emails                | 116988       | 9104 kB
github_user_infos          | 113617       | 7808 kB
user_profiles              | 116988       | 7464 kB
user_avatars               | 116988       | 7144 kB
user_profile_views         | 129138       | 7000 kB
user_archived_messages     | 106711       | 6280 kB
post_actions               | 81849        | 6136 kB
user_badges                | 78525        | 5240 kB
user_auth_tokens           | 20396        | 5096 kB
user_histories             | 46810        | 4552 kB
top_topics                 | 18387        | 3136 kB
etc...

You can use this to provide us some extra information about the size of your db when asking for help that may be related to db size.

Posts: 5

Participants: 3

Read full topic

Category from /new-topic route not displayed in composer

$
0
0

@LeoMcA wrote:

Steps to reproduce:

The bug happens on this commit, but not the one before: FEATURE: improves select-box to support category selection on new topic · discourse/discourse@7b4e302 · GitHub, so it looks like something was lost in the change from category-choosercategory-select-box, @joffreyjaffeux

Posts: 4

Participants: 2

Read full topic

How to recover from a very slow database

$
0
0

@sam wrote:

Rarely, the database can get into a state where it is so slow it appears broken (I have seen 3 instances of this issue in the last 4 years)

How can you tell you are impacted?

It is quite easy to tell the difference between database is under load, or database is under-provisioned to a broken state.

Likely symptoms:

  • Everything suddenly got extremely slow

  • A rebuild does not fix the problem

  • You see multiple postgres threads consuming 100% CPU when you run top

Definate diagnosis

To ensure 100% you are impacted by this, stop the app and run a search:

./launcher restart app
./launcher enter app
sv stop unicorn
% rails c
> Search.new('testing').execute
> Search.new('testing').execute
> Search.new('testing').execute

On a functioning DB a search will take under a second. On a DB that is gone into :crazy_face: mode expect this to take more than 20 seconds

How to repair

The consistent way we were able to repair this was by dumping the database to disk and restoring:

./launcher enter app
sv stop unicorn
cd /shared
sudo -u postgres pg_dump discourse > db.dump
sudo -u postgres dropdb discourse
sudo -u postgres createdb discourse
sudo -u postgres psql discourse < db.dump

:alarm_clock: :warning: :man_farmer:t3: note

It is very unlikely you are experiencing this issue, we saw it about 3 times in 4 years. However, if you just ran a GIANT import I would strongly recommend following this so you start from a proper clean slate.

Posts: 3

Participants: 2

Read full topic

Sidekiq Crashing

$
0
0

@Seighten wrote:

For some reason Sidekiq keeps crashing on my website. Sometimes it could be hours before it crashes, sometimes it will crash within a few minutes of restarting. I don’t think it is anything to do with the server power, but it could be. The server has 2gb of ram and 6 cores. The community only has around 350 members, but we are gaining around new 100 members / day.

edit: In my terminal when I ssh into the server it says this
[56047.215069] Out of memory: Kill process 31507 (.ruby.bin) score 115 or sacrifice child


[57594.217344] Killed process 31507 (.ruby.bin) total-vm:4719372kB, anon-rss:356292kB, file-rss:0kb

Makes me think it is running out of ram, but I don’t see how it would use it all

Posts: 5

Participants: 2

Read full topic

Wordpress blog, comments and manually copying it to Discourse

$
0
0

@Quintin_Par wrote:

I am setting up a discourse forum for my blog and as I understand, there is no way to sync migrate existing wordpress comments to discourse topics and as its replies.
Since that is the case, I was thinking of doing this task manually.
i.e.

  1. Create A discourse topic backdating it to the creation of the blog post
  2. Copy over each of the blog post’s comments to the topic, creating/migrating a user account in the process

I have around 2,000 comments.

Question:

  1. Is this a good workflow? Potential flaws?
  2. Can I go an embedded an old blog post and the new back-dates forum top created? Does this mean I’ll have to use the WP-discourse plugin and the WP-discourse-JavaScript plugin together? Is it even possible? Will this conflict?
  3. Do you have a better approach?

Posts: 5

Participants: 3

Read full topic

Unbolding partial selection removes two first selected characters instead of asterisks

$
0
0

@jooize wrote:

  1. Write one two three.
  2. Select the words.
  3. Press bold.
  4. Result: **one two three**
  5. Select: one two three**
  6. Press bold.
  7. Result: **e two three
  8. Expected: one two three

Selecting two three** and pressing bold produces **one o three.

Posts: 1

Participants: 1

Read full topic


What web URL link will generate OneBox's and what won't?

$
0
0

@schungx wrote:

Not sure if this has been asked or not. Hard to search for keywords regarding this.

Certain URL’s I include in a post turns up with a digest format in a box with descriptions etc., such as:

www.microsoft.com

meta.discourse.org

image

image

Notice that meta.discourse.org here doesn’t seem to generate the digest, but my installation does.

Other URL’s do not generate such digest boxes and remain a simple link:

www.ibm.com

Is the something a website must do in order for the digest box to show up?

Posts: 5

Participants: 4

Read full topic

&hellip is shown as text in choosing the category

Minio instead of S3?

$
0
0

@tophee wrote:

Has anyone tried to use minio instead of S3 storage?

https://www.minio.io

Minio is a distributed object storage server compatible with Amazon S3, but I don’t know what that means in relation to discourse…

Posts: 2

Participants: 2

Read full topic

Queries's list for Data-Explorer

$
0
0

@SidV wrote:

Hello Super Discourse Users

I wanted to tell you that I started to “play” with the Data-Explorer plugin and I was impressed by the possibilities it offers, I’m super happy with the tool.

I am grateful to the genius who has come up with the creation of the plugin.

As I’m debugging almost every query I’ve been reading, I’ve created a repository and a list of queries.

When I can, I add improvements to the query as parameters, to make it more dynamic.

You can check the list here:

I have maintained the sources of each query in each file, so that when in doubt about the queries, they can send their doubts to the user who created it.

Thank you for any contributions you want to make, we can also use the repository as a backup of the queries you have.

Thank you in advance for making this possible.

A hug from Argentina,
SidV

Posts: 3

Participants: 3

Read full topic

When site require approvals for users, email replies do not get sent to staged users

$
0
0

@schungx wrote:

In notification_emailer.rb:

    def perform_enqueue(type, delay)
      user = notification.user
      return unless user.active? || user.staged?
      return if SiteSetting.must_approve_users? && !user.approved?

      return unless EMAILABLE_POST_TYPES.include?(post_type)

      Jobs.enqueue_in(delay, :user_email, self.class.notification_params(notification, type))
    end

The line:

return if SiteSetting.must_approve_users? && !user.approved?

is suspect because staged users are obviously NOT approved… it would be rather strange for a user to be staged but then approved.

Therefore the whole thing falls apart if the forum is set to require approval.

I’m pretty sure the code should be:

return if SiteSetting.must_approve_users? && !user.staged? && !user.approved?

Posts: 3

Participants: 3

Read full topic

Viewing all 60613 articles
Browse latest View live


Latest Images