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

Discourse fails to rebuild after changed SMTP password because of Postgres

$
0
0

@Kovah wrote:

Hello,
due to changed SMTP credentials I had to alter the app.yml and rebuild the Discourse instance of InvoicePlane. Sadly, the rebuild failed multiple times and I'm not able to run the instance anymore.

The error thrown at me is the following:

Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 75 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"

A longer part of the last output can be found in this pastebin: http://pastebin.com/NdDTbVCa
It seems that Postgres is killing the instance.


Version is Discourse 1.6.0, branch is stable.

$ git status
On branch stable
nothing to commit, working tree clean

I hope you can help me fast, a large community is waiting for the forums to get back online. :frowning:

Posts: 4

Participants: 3

Read full topic


Email Settings - Mailgun, Namecheap, Discourse

$
0
0

@mizko1 wrote:

I've spent the last 2 days trying to figure out how to configure Namecheap with Mailgun.
It was a nightmare but I've finally got it to work.

The servers are all verified and active now.

The problem is, emails are still not being sent.. but being skipped.
I have a feeling it's because of the user_name being postmaster@www.domain.com

The only way for me to get the domain verfied etc was to add a new domain in Mailgun as 'domain.com' instead of 'www.domain.com' - Namecheap support said they only configure the MX records for 'domain.com'.

So my question is - how can I change my user_name in admin panel to postmaster@domain.com

Thanks!

Posts: 10

Participants: 4

Read full topic

Not detecting first time reply by email

$
0
0

@Black_Blade wrote:

I am not 100% sure where to put it, as i never really got into the Discourse code
How ever i am using the forums at community.father.io , and they have a badge that is granted for "First Reply By Email"
But as it seem for one reason or other it dose not detect that a reply was made by email making it impossible to get that badge
Its a minor issue, but i was thinking il just rise it
From my understanding from the guys that run the forums at community.father.io , the fourms are on Discourse and these bug is a Discourse issue
If any one can confirm or deny that will be great :slight_smile:
Also if i post in the wrong place please do let me know

P.S. i just notice that the last to get these badge here was from Jun 1, so possible its a bug with a latest version? or maybe its just on community.father.io forums? (anyone want to reply to test)
P.S.S i did search the forums but did not find a topic on the matter

Thanks Drak

Source:
Topic on the matter of been unable to get badge:

Posts: 6

Participants: 4

Read full topic

Minor: unable to update category settings

I installed Discourse/Vagrant on Fedora 23

$
0
0

@JimmyX wrote:

Disclosure: When I do something I like to do it properly. This is why I am a complete idiot. Other people may not need these hints.

I am running Fedora 23.

I followed these instructions:

I had to downgrade to Virtual Box 5.0 from 5.1.

When I got to "vagrant up", which will provision the virtual machine, the required download crashed on my poor connection. It does not resume. I took a few days to get it all downloaded with one lucky uninterrupted spell of internet connection.

To get vagrant to provision (download) all the way I had to add this to the "Vagrantfile" file

It goes after this line - "v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]"

v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

You need to run this command in the background as mail is needed to verify a new account.

bundle exec sidekiq >& /dev/null & # sends the output to null

I had to follow these instructions to get mailcatcher working

From your PC you connect to the VM thusly:
http://localhost:4080/ # Mailcatcher (You need to open this to verify your account with mail)
http://localhost:4000/ # The Discourse BBS itself

Posts: 1

Participants: 1

Read full topic

Failed to rebuild Discourse with the following information

$
0
0

@snakeninny wrote:

./launcher rebuild app returns:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development' failed with return #<Process::Status: pid 312 exit 7>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
c942f5ad4f821729df4b23454a6df318e2c52a85dc203699068c13f832a236d5
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What does that mean and how do I fix it? Thanks!

Posts: 2

Participants: 2

Read full topic

How to upload files in root directory?

$
0
0

@SMT wrote:

Hi, I am trying to integrate onesignal push notifications with discourse and it requires to upload some SDK files in root directory - Link.

Can anyone guide me on how to upload these files in root directory?

Posts: 5

Participants: 3

Read full topic

Restoring Discourse from another server

$
0
0

@slackmoehrle wrote:

We have a Discourse installation of version 1.2 and we are upgrading to to a new box with Discourse 1.6.

I followed these instructions for setting up the new server: https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

I backed-up all the data and copied it to the new server in /var/discourse/shared/standalone/backups/default. This is about 3.5gb

I did a restore using the web interface and after 16 hours it still says Migrating Database. I tried to refresh and I then get a Page Not Found and no user id's exist anymore. I can still create a new one.

I tried to restore via the command-line using: https://meta.discourse.org/t/is-there-any-way-to-restore-your-site-from-backup-in-the-terminal/42377/2

But script/discourse doesn't seem to exist. I have a scripts in my root but it only contains docker-gc and mk_swapfile

Any ideas?

Posts: 6

Participants: 3

Read full topic


How to get the current_user details in Discourse.Dialect.postProcessText for both client and server side?

$
0
0

@krishnau2 wrote:

Hi,

In my discourse app, I want to mask sensitive content inside posts (email/phone numbers etc.)

I wrote a plugin by following ALL CAPS plugin by @sam.

This is what I came up with

function mask_sensitive_content (text){
  var emailRegex = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/ig;
  var mobileRegex = /\b\+?\d[\d ]{8,12}\d/g;

  var emailReplaceWith = ' ---@---.--- ';
  var mobileReplaceWith = ' ########## ';

  return text.replace(mobileRegex, mobileReplaceWith)
    .replace(emailRegex, emailReplaceWith);
}

Discourse.Dialect.postProcessText(function (text) {
  return mask_sensitive_content(text);
});

This masking works both on the client-side and server-side (the data is being written into db after masking).

But I now need to exclude admins and moderators from masking. I looked through several plugins and discussions in meta.discourse and made this:

Discourse.Dialect.postProcessText(function (text) {

  var current_user = null
  if(Discourse.User && Discourse.User.current()){
    current_user = Discourse.User.current();
  }

  // Not masking the content if its an admin or moderator
  if(current_user != null && (current_user.admin == false || current_user.moderato == false)){
    return mask_sensitive_content(text);
  }
});

This works perfectly in the editor, but when I save the content, it is not getting masked. Seems like my code doesn't have any effect.

On further investigation I found Discourse.User.current() is causing a problem in the backend while trying to cook the content, since Discourse.User is not available there.

Do you have any hints on how I should go about this?

Posts: 1

Participants: 1

Read full topic

External SSO provider login link

$
0
0

@Dominic_Hargreaves wrote:

In order to improve the user experience when moving between our main site and discourse, we are considering detecting how the user has logged into our main site and customizing the link to the community site to initiate a login using the relevant SSO provider (Google and Github, so far).

I couldn't find any evidence of a suitable URL which automatically triggers said login process. Is this feasible to add (or did I miss it already being there)?

Ideally it would recognise which identity was used at the original site and pass that along to prevent the account chooser from appearing (this applies to Google, but probably not Github) but that would be the icing on the cake.

Thanks!
Dominic.

Posts: 2

Participants: 2

Read full topic

Sidekiq is consuming too much memory, restarting

$
0
0

@gkln wrote:

Hi,

We get this message in the logs about twice a day since the update to Discourse 1.6.0:

Sidekiq is consuming too much memory (using: 532.09M) for 'forum.detendusdupad.com', restarting

Is it a normal behaviour, a misconfiguration or is Sidekiq actually leaking?

The UNICORN_WORKERS value is set to 4 on a 16GB install. The 1.6.0 update was applied by doing a clean rebuild of our split containers setup.

Thank you.

Posts: 5

Participants: 4

Read full topic

Tags become unusable if used once and then topic is deleted

$
0
0

@jamesmarkcook wrote:

I have successfully set up Tag Groups on my Discourse but in doing so ran into some weird issues which I mentioned here.

At the time I couldn't figure out what was going on, but since playing with Tags and investigating I can successfully recreate the issue.

If you create a topic, add tags but then delete that topic before anyone else has used any of the tags, those tags become unusable site wide.

I can confirm this applies to any topic and any tag for any user.

This isn't so much a problem if you lock down tag creation and create a topic in the Staff section to list your usable tags on, but it's obviously a bug that will need fixing. The only solution I've found is to destroy those Tags using the Rails console. They then become selectable again.

Posts: 3

Participants: 2

Read full topic

Tons of Redis Errors

$
0
0

@jamesmarkcook wrote:

I've recently been seeing this in my log files.

Failed to report error: 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.
4 ActionView::Template::Error (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.)
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:199:in `call_pipelined' web-exception

Has anybody come across this recently?

Posts: 15

Participants: 3

Read full topic

Help with hiding content until someone registers

$
0
0

@panionios wrote:

A long time ago, when I got into forum software, using other software I was able to make it so the forum looks alive with threads and titles but when the user clicked to read the thread, he was asked to register.

I would like to do the same with discourse.

basically, allow unregistered users to see the forum but not able to read the threads

Do you guys think its possible to do without major modifications?

thank you for the best forum engine out there

Nikos

Posts: 5

Participants: 4

Read full topic

Restrict certain Tags to a category, but still allow that category to use all other Tags

$
0
0

@jamesmarkcook wrote:

Correct me if I'm wrong, but at the moment, if you create Tag Group A for exclusive use in Category A, Category A is then unable to use any other tags being used on the site. Is this intentional?

If it is it seems a little odd to me, particularly with how the option is worded Tags that can only be used in this category: or Tags Groups that can only be used in this category:

The way it's actually functioning is:

Tags that can only be used in this category AND Only these Tags can be used in this Category

It should be one or the other in my opinion.

I would like to create a group of Tags that can only be used in Category A. However I don't want that to prevent Category A from being able to use the 20 other tags on the site.

Long term, it would make more sense to have a Tag configuration page that takes care of selecting where the Groups and individual Tags can be used rather than doing it from a Category perspective.

For example select a tag from a drop down list. Say we select tag-a. We then have a page with all categories on the side and the tag at the top. You can then quick select all categories to use tag-a in, or you can individually select which categories to restrict it to by placing a check next to each category. You could do the same with Tag Groups. Granted it might be technically difficult if a tag belongs to a group and they have different settings, but it needs to be properly thought out.

In the short term, wouldn't it make sense to change the behaviour slightly. By default, all Tags should be available in all categories. As soon as a Category sets something on a Tag, the tag and only the tag becomes either:

  1. Only available in this category (and other categories that have it selected). It leaves other Tags unaffected in this Category and all other Categories. In other words the Tag needs to be included wherever you want it available. OR:

  2. Unavailable in this Category. It leaves other Tags unaffected in this Category and all other Categories. If you want to also exclude this Tag from another Category it needs to be explicitly set as unavailable in that Category also.

Interested to hear your thoughts.

Posts: 5

Participants: 2

Read full topic


Should inviting someone really add me to the list of users involved in a thread?

$
0
0

@carlokok wrote:

should inviting someone to a post really add me as last user to the "users" list?

We're using that mostly to see if a thread still needs to be replied to, if one of us shows as last user we know the thread is dealt with. But when inviting someone it also does that and it looks handled.

Posts: 1

Participants: 1

Read full topic

URGENT: FATAL: Peer authentication failed for user "discourse"

$
0
0

@slackmoehrle wrote:

I tried to restore a backup on a new server and realized I needed to install thor. After installing, I get:

URGENT: FATAL:  Peer authentication failed for user "discourse"
 Failed to initialize site default
Starting restore: public/backups/default/cocos2d-x-forum-2016-08-03-164447.tar.gz
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize': FATAL:  Peer authentication failed for user "discourse" (PG::ConnectionBad)
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
    from /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
    from /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/connection_handling.rb:87:in `connection'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/attributes.rb:93:in `columns'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/attributes.rb:98:in `columns_hash'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/core.rb:173:in `block in find_by'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/core.rb:173:in `each'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/core.rb:173:in `all?'
    from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7/lib/active_record/core.rb:173:in `find_by'
    from /var/www/discourse/lib/discourse.rb:282:in `system_user'
    from script/discourse:77:in `restore'
    from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from script/discourse:227:in `<main>'

I'm researching a solution, starting with this: https://meta.discourse.org/t/fatal-peer-authentication-failed-for-user-discourse/28111/4 but I'm not well versed in Postgres. I had followed this to setup the new server: https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

Posts: 8

Participants: 2

Read full topic

Custom content localization

$
0
0

@foloex wrote:

Hello Discourse,

I'm trying to create a multi-languages forum based on Discourse. I'm trying to localize the custom content for the main languages that the forum will handle (english and french at first). I cannot figure out how to make the translation for all the custom content such as badge's name, short and long descriptions, categories' name and descriptions, tags ...

I saw the topic https://meta.discourse.org/t/customize-all-text-in-discourse/36092 but was deceived by it's claim "customize all text". I'm aware of /admin/customize/site_texts but it doesn't seem to handle custom content.

Is there a way to do that in Discourse ? Without hacking the forum and loosing everything at the next update ?

Posts: 5

Participants: 3

Read full topic

Should I use a subdomain or can I install Discourse at the root domain?

$
0
0

@Turko wrote:

Hi

İ got example.com domain. but when i read insttallation guideline it says "example.example.com " i should registered new domain like this ?

Posts: 2

Participants: 2

Read full topic

Is there an option to prevent all posts or turn login off?

$
0
0

@jamesmarkcook wrote:

I need to stop all activity on a Discourse instance in order to transfer everything over to a new instance. Any setting to do this quickly?

Posts: 6

Participants: 3

Read full topic

Viewing all 60707 articles
Browse latest View live




Latest Images