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

How to configure the SSO Authorization URL via config (without using the admin panel)

$
0
0

@shahidmir wrote:

Hi

I need to deploy discourse on 3 environments, each pointing to a different SSO Authorization URL.
Is there a way to set the SSO authorization URL without having to login and go via the admin panel?

Regards

Posts: 3

Participants: 2

Read full topic


Staff tags available to apply by regular users

$
0
0

@Ivan_Rapekas wrote:

I read some old topics about Staff tags and found a phrase:


According this statement I expect that some staff-tag will be visible for everyone, but only staff will able to apply that tag to a topic. Currently that’s not true. As a regular user, I can choose staff tag in composer.

Discourse 1.9.4 stable

Posts: 1

Participants: 1

Read full topic

User still have TL4 after revoke admin grants

$
0
0

@Ivan_Rapekas wrote:

I registered in forum using Google account with TL1. Then I grant admin rights using rake admin:invite[******@gmail.com]. The user gets Admin+TL4 After that I revoke admin grants, but TL4 did not revert back to TL1.

Discourse 1.9.4

Posts: 3

Participants: 3

Read full topic

Why post count differs on admin page and about.json?

$
0
0

@Ivan_Rapekas wrote:

Hi, I found that post count for the latest 30 days in about.json and admin page are different 6242 vs 5562:

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5
%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Why? Topic count is equal. I tried to do some calculations but did not find any logic.

Discourse 1.9.4

Posts: 1

Participants: 1

Read full topic

Increase the size of the SSO Pop-up

Improving /admin/plugins

$
0
0

@steve_pd wrote:

So I’ve been helping a couple of communities troubleshoot and tidy up their instances. In both cases some of that housekeeping involved removing broken and/or redundant plugins.

It was pretty straightforward for me to do, but that’s only because I’m reasonably in tune with the changes which have occurred over the past 12-18 months, so when I see plugins such as presence I know that it has since been merged into core (although the link from /admin/plugins still refers back to the original empty repo).

Are there any plans to restructure the plugins page as a part of the /admin overhaul? It would be great if plugins which are actually part of core (such as discourse-details, discourse-narrative-bot, discourse-nginx-performance-report, discourse-presence, docker manager, lazyYT and poll) were grouped separately, and if a repo which is known to have been merged into the current version is also still in the config maybe chuck up an alert?

While I couldn’t find a current example, I can’t discount the possibility that there be cases of plugins which still have a repo whilst also being merged into core so as to support older versions of Discourse. How is that handled by Discourse today? How are less engaged admins meant to identify plugins which become core functionality?

Posts: 1

Participants: 1

Read full topic

Lead image not consistently showing in tweet

$
0
0

@David_Baker1 wrote:

When I post a link from my discourse onto Twitter and that topic has a lead image at the top the image used to always show in the Twitter post. But lately that behavior has stopped. Can someone advise if I’m missing a setting or something? It’s so much more enticing for people reading about us on Twitter to see a nice image drawing them to a topic in Discourse.

Posts: 3

Participants: 2

Read full topic

Avatars invisible after last update (Even after latest update)

$
0
0

@E20 wrote:

Hello, I know there have a been a couple of topics for this, but my Avatars are still missing.

Anyoneelse experiencing the same issues?

Avatars invisible after last update](Avatars invisible after last update)

Posts: 6

Participants: 3

Read full topic


Default backup frequency

$
0
0

@pfaffman wrote:

Why is the default to back up Discourse once a week?

Use case: I just goofed an upgrade (and an app.yml got cranked up instead of web_only.yml and I guessed wrong about which one had been running for the last two days) and lost a couple days of someone else’s data. It would have been considerably less painful if a backup had run in the past 24 hours.

I recommend daily backups and keeping 3. Digital Ocean’s 1GB droplet has only 25GB of disk and it’s easy to fill it up with backups.

Posts: 1

Participants: 1

Read full topic

Used Mailgun to register Discourse. Is using mailchimp redundant?

$
0
0

@therza wrote:

I signed up for mailgun to have a domain email address. Currently it is forwarding all emails to my personal email.

I want to start a newsletter, and was told mailchimp is the way to go to achieve this for ease of use and design.

I know there is a slight overlap between the two, but mailgun is mainly directed at developers (of which, I am not), while mailchimp is directed towards marketers (also, not a marketer).

Is it redundant to use both?

Is there a better workflow to achieve both a newsletter and an email service for my domain/discourse?

Posts: 3

Participants: 3

Read full topic

Is it possible to sync avatar and bio of Discourse in Wordpress when using Memberful?

Page view metrics from discourse compared to GA

$
0
0

@communitygal wrote:

hi all,
Does anyone have any insight into page views metrics?

Discourse total page views is about double what google analytics is reporting. I’m brainstorming on possible causes. I’m guessing because we have told google to ignore internal IPs. But still, double seems a bit high.

Any ideas?

Thanks,
Emma

Posts: 2

Participants: 2

Read full topic

Might have to ask for help during install. Can be paid if going out your way

$
0
0

@subtenko wrote:

Not sure if this is the right place to ask but I might need help, so I’m scopingout this place for anyone whos willing to help me over chat on Discord (text or voice chat) for getting discourse installrd with cloudflare ssl on a subdomain WordPress site:

Note: I have discourse install with wordpress on a seperate site but I jad to turn cloudflare off and that sites doesnt have ssl either.

So I need help with

  1. Installing discourse via the SSL method (because I’m using cloudflare dsl I’m confused because people just talk about lets encrypt and i already have cloudflare

  2. Configuring the nginx sites-available properly, and note I’m using wordpress site and discourse for subdomain for forums.

So any possible takers? What ya think? (Im just too frustrated so i need help now lol)

Posts: 2

Participants: 2

Read full topic

Date range issue for Posts and New Topics report

$
0
0

@BenLeong wrote:

There seem to be a few differences between the data that’s displayed via the Graph and Table views for the admin panel reports, and the version available for export via CSV.

This example is from the Table view of /admin/reports/posts, which seems to be including the date immediately after the selected range (April 1st, instead of ending on March 31).

The Graph view of that page shows the same range, also ending with “zero posts” on April 1.

However, the data export for this range doesn’t include the additional date, ending on Mar 31, with a value of zero for that day:
12%20am

It’s also worth noting that the last day in the range (both the “extra” day in the Admin/Reports view, and the actual last day from the CSV export) always seems to show zero posts/topics. Selecting a broader range shows that there actually were posts made on that day, though:

@neil & @travis - this is the issue we discussed earlier today.

Posts: 2

Participants: 2

Read full topic

Repackaging a markdown.it extension as a Discourse plugin

$
0
0

@sam wrote:

markdown.it the CommonMark engine used by Discourse has a wide array of plugins

Header anchors, definition lists, smartarrows and the list goes on and on.

First a warning

:warning: CommonMark is meant to be … Common. The further you move away from the spec the less Common your Markdown becomes. It can make it harder to port to other solutions and, if not careful, cause internal inconsistencies in parsing. Before repackaging anything be sure to answer the question “do I really want to repackage this?”

I just finished repackaging Discourse footnote and have some lessons to share about how to do this right.

Steps for the lazy

If you are lazy and just want to get started the easiest way is just to fork footnotes and swap files and var names. I was pretty careful to make sure it follows best practices so you should have solid example.

Opening moves, a minimal repackage

From what I can tell the majority of markdown.it plugins are shipped as vanilla js files. In many cases plugins are simply shipped as a single js file, like this: markdown-it-mark/markdown-it-mark.js at 00a122a726d91316fab66a452b495d3b14cf1615 · markdown-it/markdown-it-mark · GitHub

Ideally you want to leave the original intact, that means you can simply copy an updated version of the file into your plugin without needing to mess with the existing plugin.

The first problem you will hit is that you have to teach your plugin to load this JavaScript on the server cause the Markdown engine runs on the server as well. To do though you can simply copy the file as is into assets/javascripts/vendor/original-plugin.js then in your plugin.rb file you would add:

# this teaches our markdown engine to load your vanilla js file
register_asset "javascripts/vendor/original-plugin.js", :vendored_pretty_text

Once you have the actual body of the plugin included you need to teach our pipeline how to load and initialize it:

Create a file called assets/javascripts/lib/discourse-markdown/your-extension.js.es6

This file will be auto loaded cause it ends with .es6 AND in the discourse-markdown directory.

A simple example can be:

export function setup(helper) {

  # this allows you only to load your extension if a site setting is enabled 
  helper.registerOptions((opts, siteSettings) => {
    opts.features["your-extension"] = !!siteSettings.enable_my_plugin;
  });

  # whitelist any attributes that you need to support, 
  # otherwise our sanitizer will strip them
  helper.whiteList([
    'div.amazingness',
  ]);

  # you can also do fancy stuff like this
  helper.whiteList({  
    custom(tag, name, value) {
      if ((tag === 'a' || tag === 'li') && name === 'id') {
        return !!value.match(/^fn(ref)?\d+$/);
      }
    }
  });

  # finally this is the magic that you would use to register the extension in 
  # our pipeline. whateverGlobal is the name of global the plugin exposes
  # it takes in a single (md) var that is then used to amend the pipeline
  helper.registerPlugin(window.whateverGlobal);
}

Always be testing

Discourse’s bin/rake autospec is plugin aware :innocent:

This means that when you add the file spec/pretty_text_spec.rb every time you save it the plugin test file will run.

I use this extensively cause it makes work so much faster.

Say you added a plugin that changes every number in a post to 8 circle, you can call it discourse-magic-8-ball.

Here is how I would structure the tests:

require 'rails_helper'

describe PrettyText do

  it "can be disabled" do
    SiteSetting.enable_magic_8_ball = false

    markdown = <<~MD
      1 thing
    MD

    html = <<~HTML
      <p>1 thing</p>
    HTML

    cooked = PrettyText.cook markdown.strip
    expect(cooked).to eq(html.strip)
  end

  it "supports magic 8 ball" do
    markdown = <<~MD
      1 thing
    MD

    html = <<~HTML
      <p>8 circle thing</p>
    HTML

    cooked = PrettyText.cook markdown.strip
    expect(cooked).to eq(html.strip)
  end
end

You may need to “decorate posts”

In some cases plugins work best when they add extra “dynamic” features to your posts. Examples of that are the poll plugin or the footnotes plugin that adds a “…” that dynamically shows a tooltip.

if you need to “decorate” posts add assets/javascripts/initializers/your-initializer.js.es6


function magicUpTheElement($elem) {
   // your amazing magic goes here
}

export default {
  name: 'inline-footnotes',

  initialize(container) {

    if (!container.lookup('site-settings:main').enable_magic_8_ball) {
      return;
    }

    withPluginApi('0.8.9', api => {
      api.decorateCooked($elem => {
        magicUpTheElement($elem);
      });
    });
  }
};

You may need to “post process” the posts

In some cases you may need to “post process” posts, the markdown rendering engine, by-design is not aware of certain information like, for example post_id. In some cases you may want server side access to the post and “cooked” html, this can let you do things like trigger background jobs, synchronized custom fields or “correct” auto generated HTML.

For footnotes I needed a distinct id for each footnote, which meant I needed access to post_id, so I was forced to make changes to the HTML in the post processor (which runs in sidekiq)

To hook in you would add the following to your plugin.rb file:

DiscourseEvent.on(:before_post_process_cooked) do |doc, post|
  doc.css('a.always-bing).each do |a|
      # this should always go to bing
      a["href"] = "https://bing.com"
  end
end

You may need some custom CSS

If you want to ship custom css, be sure to register the file in plugin.rb

Add your css to assets/stylesheets/magic.scss and then run

register_asset "stylesheets/magic.scss"

Remember that we “auto-reload” changes so you can amend your plugin CSS and see changes on the fly in development.

Good luck with your repackaging adventures :four_leaf_clover:

Posts: 1

Participants: 1

Read full topic


Might need help with discourse SSL install with Cloudflare & nginx. Can be paid

$
0
0

@subtenko wrote:

What would you like done?
[In a nutshell: Help configuring discourse setup with cloudflare and nginx(sites-available) file correctly]

I might need help, so I’m scoping out this place for anyone whos willing to help me over chat on Discord (text or voice chat) for getting discourse installed with cloudflare ssl on a subdomain WordPress site:

Note: I have discourse install with wordpress on a seperate test site but I had to turn cloudflare off and that site doesnt have ssl either.

So I need help with

  1. Installing discourse via the SSL method (because I’m using cloudflare ssl & I’m confused because people just talk about lets encrypt and i already have cloudflare)

    1. Configuring the nginx sites-available properly. Note I’m using wordpress site and discourse subdomain for forums.

So any possible takers? What ya think? (Im just too frustrated/confused so i need help now lol)

When do you need it done?

Within 2 weeks from the “ok deal lets do this” phase

What is your budget, in $ USD that you can offer for this task?

$60

Posts: 1

Participants: 1

Read full topic

Bingbot is default blacklisted!

$
0
0

@sam wrote:

Recently @neil added built-in support for crawler traffic analysis and blacklisting.

One thing that immediately popped up is that bing, consistently, across multiple sites is generating significantly more load than any other crawler.

For example on meta we have the following over about a week:

User Agent Pageviews
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) 183236
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) 16117
Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) 15959
Mozilla/5.0 (compatible; AhrefsBot/5.2; +http://ahrefs.com/robot/) 9450
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) 5022
Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com) 4498
Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07) 3976

bing is crawling meta at more than 10x the rate of any other crawler. Looking at our richer logs the trend is very clear (and also cross checked):

Looking at a geomap we can see the traffic is very likely coming from Microsoft

image

Looking at specific ips I can see this is indeed coming from Microsoft using reverse IP lookups.

bing has no qualms hitting meta more than 5000 times in a 3 hour period, Google will not spike at over 800 and usually runs much slower.

Following this commit, bing is default blocked:

You can easily re-enable bing by editing your blacklisted_crawler_user_agents.

We decided to take this drastic measure to protect Discourse sites out there from being attacked by Microsoft crawlers.

I have no idea why bing behaves so badly, my theory is that part of the reason it is crawling so aggressively is cause it is constantly trying to re-validate canonical links. In the logs I can see that 3 times a week it will try to figure out what the canonical page is for a post link. So, for example:

Even though we tell bing the canonical for https://meta.discourse.org/t/topic-stopwatch-theme-component/83939/20 is https://meta.discourse.org/t/topic-stopwatch-theme-component/83939 it does not appear to “trust” us and has to check back 3 times a week.

Apologies for the drastic measure here but bing need to change something.

If any Microsoft engineers are looking at this I am happy to enable indexing on select properties so we can check to see if this is corrected, but the current default rate of indexing is oppressive and something needs to change.

Posts: 1

Participants: 1

Read full topic

How to use staff tags properly?

$
0
0

@Ivan_Rapekas wrote:

Hi, I would like to be learned how to use staff tags…

As an admin, I created staff tag:
%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Then I tried to create another tag with the similar name and it does not show me matches:
%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Next, I created a tag community, then go to the main page, refresh it and open composer. There is no community tag in the field tag until it was used at least once:

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Questions:

  1. It allows me to set name with a space which is not allowed in composer. Should be the same behavior, isn’t it? Discourse automatically replaced space into minus, but did not do that on admin page.
  2. What tags are matched during tag creation? Why I don’t see any variants?
  3. As a staff (I use the same user, both admin and moderator), I cannot see just created tag until it was used at least once?

Discourse 2.0b5

Posts: 1

Participants: 1

Read full topic

/var/lib/docker/overlay2 took all the disk space

$
0
0

@joshm wrote:

Hi, I installed discourse today (my first time using discourse :grinning:) and I’ve installed 3 sites in 3 different containers. I had some troubles and had to rebuild a site several times. My disk is full now. I’ve run this to clean space:
apt autoclean
apt autoremove
./launcher cleanup
docker system prune

But it’s still full. Almost all the disk space is take by this folder: /var/lib/docker/overlay2

As I only have 3 sites and in the mentioned folder and there are 8 folders taking more than 1GB: are there folders in /var/lib/docker/overlay2 that are not needed anymore? Can I delete them?

Thanks!

--- /var/lib/docker/overlay2 -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    2.6 GiB [##########] /ec2fd5ec97616ecf81beadaa2054db614d023a137ae7a7356cf045164bdba296                                                                                                    
    2.6 GiB [######### ] /89dedb46c2b9c52d3fef241c5e1f2dba8e01af5ec5ddaa3fdca386b1ae2985d6
    2.0 GiB [#######   ] /474cf98c95c5c8532bacc11bec063fa0d51b6924e08a2375e30db79705f60e50
    1.8 GiB [######    ] /b9d8e6b857365ebbe0c0515f85f5961568563bbbdf9585a83ec4d4a65d06d489
    1.7 GiB [######    ] /486137a6ffef2ee5a0425a82dc637c0c60fc30eda7e577f2ba1cadb188163d4c
    1.3 GiB [####      ] /8daad3bdd055d98d5b91df87f1f7480de14b94be1834a383539dabc1a205abe8
    1.3 GiB [####      ] /73a33569960048127de37171666689d5514e31fdbf5d8b6d049d288c377d5de3
    1.0 GiB [###       ] /23b849361f6cd3b8fc2c41fb9fd11d1a203af41263f67a6d55ca241e142ef0b5

Posts: 9

Participants: 4

Read full topic

Understanding the issues/risks with changing owner of posts

$
0
0

@tobiaseigen wrote:

Changing owner of posts is a crucial part of our workflow in our community. We get alot of inquiries from members via other channels, which we then post in the forum on their behalf. Yesterday I noticed what I think is a new warning, or one I had never noticed before. Can someone explain it to me? I think I don’t understand the issues/risks with using this feature which I depend on so much. Thanks! :seedling:

Note that any notifications about this post will not be transferred to the new user retroactively.
Warning: Currently, no post-dependent data is transferred over to the new user. Use with caution.

Posts: 4

Participants: 2

Read full topic

Viewing all 60690 articles
Browse latest View live




Latest Images