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

WP Discourse plugin installation and setup

$
0
0

@Simon_Cossar wrote:

Installation

From your WordPress dashboard

  1. Visit 'Plugins > Add New'
  2. Search for 'WP Discourse'
  3. Activate WP Discourse from your Plugins page

From wordpress.org

  1. Download WP Discourse
  2. Upload the 'wp-discourse' directory to your '/wp-content/plugins/' directory
  3. Activate WP Discourse from your Plugins page

With Composer

If you're using Composer to manage WordPress, add WP-Discourse to your project's dependencies. Run:

composer require discourse/wp-discourse dev-beta

Or manually add it to your composer.json:

{
  "require": {
    "php": ">=5.4.0",
    "discourse/wp-discourse": "dev-beta"
  }
}

Note: requiring 'dev-beta' will soon be changed to '1.0.0', I'll update the instructions here and on the plugin's README when that happens.

Upgrading from earlier versions

Upgrading the plugin from earlier versions should be seamless. Follow the normal WordPress upgrade procedure through your WordPress dashboard. Your previous settings should be transferred to the new options tabs. If you have any issues with upgrading the plugin, please let me know.

Plugin setup

TL;DR install and activate the plugin. Click on the 'Discourse' menu item. Read the setting's descriptions and configure them as you like. Don't enable SSO unless you have a good reason to do it.

Connection

When you activate the plugin a 'Discourse' menu item will be added to your WordPress admin menu. Selecting it will bring you to this menu page:

The notice at the top of the page will indicate that you are not connected to your Discourse forum. To establish a connection, enter the URL of your forum into the 'Discourse URL' settings field, and your forum's API key (the API key for 'All Users', found at /admin/api in your forum's admin section) in the 'API Key' settings field. The 'Publishing username' setting defaults to 'system'. Unless you have changed that name on your forum, you can leave the default value, or change it to the username of any admin user on your forum.

Now click the 'Save Options' button. If everything is correctly configured, you should see a notice that 'You are connected to Discourse' at the top of the page.

Note: the API key in these screenshots is from my local development environment. Be careful to keep your API key private!

Publishing settings

Next click on the 'Publishing' Settings tab. This section is for configuring how the plugin publishes posts to Discourse.

The 'Display subcategories' checkbox indicates whether or not you want to your forum's subcategories to be available as categories that you can publish to from WordPress.

The 'Published category' setting selects a default Discourse category to publish to. This setting can be overridden when you create a new WordPress post.

The 'Force category update' setting is useful if you have added new categories to your forum and would like them to be immediately available on your WordPress site. Don't leave this setting permanently enabled, it will force your site to make unnecessary requests to Discourse.

Select the 'Use full post content' setting if you would like to publish full WordPress posts, rather than excerpts, to your Discourse forum. Note: to keep the 'Show Full Post' button from appearing under your post on Discourse, you must unselect the 'embed truncate' setting on Discourse (found at yourforum.com/admin/site_settings/category/posting.)

If you have not selected the 'Use full post content' setting, the 'Custom excerpt length' setting will create excerpts of that length to be published to Discourse. You can also manually create excerpts when you create a WordPress post by adding the excerpt to the 'Excerpt' meta-box.

The 'Post types to publish to Discourse' setting must be set. It defaults to 'post', but pages and custom post types may also be selected.

Click the 'Save Options' button to save your settings.

Commenting settings

Next, click on the 'Commenting' settings tab. This section is for configuring how comments are published on your WordPress site.

To have Discourse comments show up on your WordPress site, you must select the 'Use Discourse Comments' setting.

To also show existing WordPress comments for posts that have also been published to Discourse, select the 'Show Existing WP Comments' setting.

If you are showing existing comments, The 'Existing Comments Heading' setting will add a heading above the WordPress comments.

The next group of settings, from 'Max visible comments' to 'Only import comments liked by a moderator' (excluding 'Custom Datetime Format', which I now see should be moved) is for configuring which comments from Discourse should be published on your WordPress site. The default values are a reasonable place to start. If you would like to have complete control over which comments are published, select the 'Only import comments liked by a moderator' setting. (Note: comments must be liked by a forum moderator, not an admin.)

The 'Custom Datetime Format' setting formats the date that is displayed for each Discourse comment that appears on your WordPress site. Start with the default value. If you find you want to change the date format, click on the link in the settings description for details on how to do that.

The 'Debug mode' setting is useful if you are testing the plugin in a development environment, or when you are fist testing the plugin on your site. When this setting is not enabled, comments from your forum will not be synced more often than once every 10 minutes. When this setting is enabled, comments are refreshed on each request. Note: Enabling this setting in a production environment may put a very heavy load on your server.

Click the 'Save Options' button to save your settings.

Text Content Settings

Next, click on the 'Text Content' settings tab. This section is for configuring the plugin's user facing text. If you like, you can leave the default values for this setting in place.

Note: if your site is in a language other than English, you can use this section to translate the plugin's user facing text.

The 'Discourse link text', 'Start discussion text', and 'Continue discussion text' settings work together to create the text for links from your WordPress site to your Discourse form.

As an example, my forum has the title 'The Constructive Learning Space'. I would like the 'Start discussion' link, that occurs under published posts when there are no comments, and the 'Continue discussion' link, that occurs under published posts when there are comments, to read:

'Start the discussion on the Constructive Learning Space'

and

'Continue the discussion on the Constructive Learning Space'

To do that I add the text 'Constructive Learning Space' to the 'Discourse link text' setting, the text 'Start the discussion on the' to the 'Start discussion text' setting, and the text 'Continue the discussion on the' to the 'Continue discussion text' setting.

SSO settings

Next click on the 'SSO Settings' tab. This section is for configuring WordPress as the Single Sign On provider for Discourse. Unless you have a need to manage your forum's users through your WordPress site, you can leave this setting alone.

To enable SSO, select the 'Enable SSO' setting.
Note: don't enable SSO on your Discourse forum until you have all the SSO settings configured on your WordPress site.

The 'Path to your login page' setting is useful if your login page is somewhere other than the default WordPress login at /wp-login.php. You can check this on your WordPress site by adding login to your site's root URL in your browser's address bar. If you are taken to yourdomain.com/wp-login.php you have the default setup and can leave this setting alone. If your login page is somewhere else, enter the relative path to your login page, starting with a '/', in this setting.

The SSO Secret key is set on your Discourse forum. Go to yourforum.com/admin/site-settings/category/login. Look for the 'sso secret' setting and either retrieve or create a key. Copy this value and paste it into the wp-discourse *'SSO Secret key'** setting field.

By default, enabling SSO in the plugin will turn all links to Discourse that are created by the plugin on your site into SSO links. Clicking on one of these links will force a user to either login or register before they can visit the Discourse site. If you would like users to be able to visit your forum without first having to login or register, enable the 'Redirect Without Login' setting.

SSO setup on Discourse

Once you have your SSO setup configured on WordPress, go to yourforum.com/admin/site-settings/category/login on your Discourse forum. Look for the SSO settings fields on that page (they begin with 'enable sso'.)

You should already have set the 'sso secret' key setting field.

You now need to enter the path to your login page in the 'sso url' setting. In all cases this should be yourdomain.com/login. WordPress will redirect from that to the correct login path for your site.

You then need to select the 'enable sso provider' setting and the 'enable sso' setting. After doing that, SSO should work between your forum and your WordPress site.

There are additional SSO settings on Discourse. The setting 'sso overrides username' will change the users Discourse username to match their WordPress username. The setting 'sso overrides avatar' will change the user's Discourse avatar to match their WordPress user avatar.

Note: enabling the setting 'sso overrides email' is not recommended at this point. If a user changes their email on WordPress it will not be revalidated by Discourse. Instead, for now, if your WordPress users change their email address, have them visit their Discourse users profile page and update their email address there.

Customizing the plugin's HTML templates

For details on how to customize the plugin's HTML templates see the WP Discourse template customization #howto

Tips and Tricks

For tips and tricks on customizing the plugin in your theme's functions.php file see WP Discourse Plugin tips and tricks

Posts: 1

Participants: 1

Read full topic


WP Discourse 1.0.0 release

$
0
0

@Simon_Cossar wrote:

The wp-discourse plugin 1.0.0 has just been added to the WordPress plugin repository.

Changes from version 0.9 include:

  • Breaking the settings page into tabbed sections
  • Adding a 'Text Content' option for customizing all user-facing text
  • Improving the plugin's options descriptions
  • Moving WooCommerce support into a separate plugin
  • Displaying the Discourse username, instead of the full name, in the comments template
  • Syncing post title changes from WordPress to Discourse
  • Improving support for displaying the Discourse comments number on WordPress
  • Adding a longer sync period for syncing the comments number on WordPress archive pages (this can be configured in your functions.php file)

You can install the new version from the WordPress plugin repository, download it from github, or install it with Composer.

For complete instructions on installing, upgrading, and setting up the plugin, see the WP Discourse plugin installation and setup #howto.

For details on how to customize the plugin's HTML templates see the WP Discourse template customization #howto

Posts: 1

Participants: 1

Read full topic

WP Discourse template customization

$
0
0

@Simon_Cossar wrote:

The WP Discourse plugin uses HTML templates to add markup to Discourse comments for publishing on WordPress and to WordPress posts for publishing on Discourse. The text content of these templates can be customized on the plugin's options page. To change the structure of a templates requires you to add a function to your theme's functions.php file This #howto will explain how to do that.

The templates

In the plugin's code, the templates are static functions that return a mixture of html and template tags.

Available templates:
- replies_html - the outer wrapper for the comments section
- no_replies_html - creates a 'start the discussion' link that links back to the Discourse forum
- bad_response_html - displayed when there is a configuration error with Discourse
- comment_html - formats each comment as a list item
- participant_html - displays the user avatars for the participants in the topic
- publish_format_html - used to format the WordPress post for publishing on Discourse

The template code can be found in the html-templates.php file in the the plugin's github repo // todo: update when this branch is merged

The filters

At the end of each template function, the markup that is about to be output by the function is filtered through a WordPress hook. This makes it possible for a WordPress theme to grab the HTML and alter or replace it, and then return it to the function.

Available filters:
- discourse_replies_html - filters replies_html
- discourse_no_replies_html - filters no_replies_html
- discourse_bad_response_html - filters bad_response_html
- discourse_comment_html - filters comment_html
- discourse_participant_html - filters participant_html
- discourse_publish_format_html - filters publish_format_html

How to use the filters to customize a template

Customizing each of the templates follows the exact same pattern. First, create a function in your theme's functions.php file to generate the new or altered template:

// Customizes the no_replies_html template.

function my_namespace_no_replies_html( $input ) {
    ob_start();

    ?>

    // The content you want to output goes here.
    // This function just echoes its input, it will be returned unchanged.
    echo $input;

    <?php
    $output = ob_get_clean();

    return $output;
}
// Hook into the function from the plugin's code.
add_filter(  'discourse_no_replies_html', 'my_namespace_no_replies_html' );

In the above function, $input is that value that is passed to your function from the wp-discourse no_replies_html() function. The calls to ob_start() and ob_get_clean() are used for output buffering. What output buffering does is store the HTML that is generated by the function in a variable that is then passed to $output with the call to ob_get_clean. Output buffering has to be used for these functions so that the markup's template tags are returned in a way that allows them to be processed later.

The call to add_filter( 'discourse_no_replies_html', 'my_namespace_no_replies_html' ); is used to hook the plugin's no_replies_html() function. What 'hook' means is that your function will be called from inside the plugin's no_replies_html() function when it is run. The $input argument that your function takes is passed to it from inside the plugin's no_replies_html() function.

You can hook into any of plugin's template functions by adding a call to:

add_filter( 'discourse_filter_name', 'your_function_name' );

Note: replace my_namespace in the example functions with your namespace. It's a convention used in WordPress to avoid function name collisions.

Template tags

The templates use 'tags' to insert information from the database into the markup. You can use these tags in your custom templates.

The default publish_format_html template returns the markup for the post that is to be published to Discourse. The template has the following template tags available to it: {excerpt}, {blogurl}, {author}, {thumbnail}, {featuredimage}.

The post's featured image can be added to the template with the {featuredimage} template tag. This can be done in a custom template by copy and pasting the publish_format_html() function from it's github page, renaming the function by adding a namespace, adding the {featuredimage} template tag, removing the call to apply_filters from the function's return statement, and then hooking into the new function.

// Adds the featured image to the post that is published to Discourse.
function my_namespace_publish_format( $input ) {
    ob_start();
    ?>

    Originally published at: {blogurl}<br><br>
    {featuredimage}<!-- The new tag. -->
    {excerpt}

    <?php
    $output = ob_get_clean();

    // Note: the call to apply_filters() that was in the original function has been removed.
    return $output;
}

add_filter( 'discourse_publish_format_html', 'my_namespace_publish_format' );

An example that removes the avatar image from the comments_html template

The default comments_html template displays a user avatar for each comment that is published. If you are publishing many comments on your WordPress site, this will result in many http requests to Discourse to retrieve the avatar images. To remove the avatar image from the template, first copy and paste the code from the github repo into your theme's functions.php file and rename it. Then, remove the img tag that displays the avatar. Then add a filter hook for your new function by making a call to add_filter() that references the 'discourse_comment_html' hook and your function name. In your new function's return statement, remove the call to apply_filter that is in the plugin's comment_html() function.

function my_namespace_comment_html_without_avatar( $input ) {
    ob_start();
    ?>
    <li class="comment even thread-even depth-1">
        <article class="comment-body">
            <footer class="comment-meta">
                <div class="comment-author vcard">
                    <b class="fn"><a href="{topic_url}" rel="external"
                                     class="url">{username}</a></b>
                    <span class="says">says:</span><!-- screen reader text -->
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                    <time pubdate="" datetime="{comment_created_at}">{comment_created_at}</time>
                </div>
                <!-- .comment-metadata -->
            </footer>
            <!-- .comment-meta -->
            <div class="comment-content">{comment_body}</div>
            <!-- .comment-content -->
        </article>
        <!-- .comment-body -->
    </li>
    <?php
    $output = ob_get_clean();

    return $output;
}

add_filter( 'discourse_comment_html', 'my_namespace_comment_html_without_avatar' );

Note: the plugin's template functions are using a static function self::get_text_options() to get text options that have been configured on the plugin's options page. This function is not available to you in your custom templates. If you are customizing the templates by copying the plugin's code, be sure to remove these function calls from your templates. A simple approach would be to replace them with the text that you would like to appear in that section.

An example that removes the 'participants' section

This removes the 'participants' section from the replies_html template.

function my_namespace_remove_participants_html( $input ) {
    ob_start();
    ?>
    <div id="comments" class="comments-area discourse-comments-area">
        <h2 class="comments-title discourse-comments-title">Notable Replies</h2><!-- Your 'Notable Replies' heading -->
        <ol class="comment-list">{comments}</ol>
        <div class="respond comment-respond">
            <h3 id="reply-title" class="comment-reply-title">
                Continue the discussion at <!-- Your 'Continue the discussion' text -->
                <a href="{topic_url}">
                    {discourse_url_name}
                </a>
            </h3>
            <p class="more-replies">{more_replies}</p>
        </div>
    </div>
    <?php
    $output = ob_get_clean();

    return $output;
}
add_filter( 'discourse_replies_html', 'my_namespace_remove_participants_html' );

Look at the source code

To see the HTML that is in each template, and get a list of template tags that can be each template, please look at the html-templates.php source code on github.

For tips and tricks on customizing the plugin in your theme's functions.php file see WP Discourse Plugin tips and tricks

Posts: 1

Participants: 1

Read full topic

WP Discourse Plugin Tips and Tricks

$
0
0

@Simon_Cossar wrote:

Adjusting the comments_number sync period for WordPress archive pages

To get the correct number of Discourse comments for a post, the plugin needs to periodically make an HTTP request to Discourse to get the current comments number. On single pages this period is set to be no more often than every 10 minutes. For archive pages the period is set to no more than once every 24 hours. The reason for this is to avoid making multiple request to Discourse every time an archive page is accessed.

If you still find that the plugin is making too many request to Discourse when displaying your site's archive pages, you can adjust the archive_page_sync_period by hooking into the 'discourse_archive_page_sync_period' filter. You do that by adding something like this to your theme's functions.php file:

add_filter( 'discourse_archive_page_sync_period', 'my_namespace_archive_page_sync_period' );
function my_namespace_archive_page_sync_period( $sync_period ) {
    // This will change to sync_period for archived posts to once a week.
    return WEEK_IN_SECONDS;
}

If you find that the plugin is not making enough requests to Discourse to retrieve the current comment numbers for archive pages, you can add something like this to your theme's functions.php file. This will set the archive_page_sync_period to 10 minutes.
Note: on a busy site this could place a heavy load on your server.

add_filter( 'discourse_archive_page_sync_period', 'my_namespace_archive_page_sync_period' );
function my_namespace_archive_page_sync_period( $sync_period ) {
    // This will change to sync_period for archived posts to once a week.
    return 10 * MINUTE_IN_SECONDS;
}

Dealing with comment number issues when displaying both Discourse and WordPress comments for a post.

The wp-discourse plugin uses the WordPress get_comments_number filter hook so that the number of Discourse comments that have been created for a post can be displayed throughout your theme. This creates a conflict when both Discourse and WordPress comments are being displayed for a post. The plugin is able to resolve that conflict in most places. One place where it can't be resolved is in the comment title that WordPress themes often display at the head of the comment section. This is the section that begins with something like "2 thoughts on...."

Todo: _for this to work requires a small change to the plugin's css__ it will be in the next update.

The easiest way to do this is to add a rule to your theme's css file.

.discourse-comments-area ~ .comments-area .comments-title  {
	display: none;
}

Enable posting by XMLRPC

XML-RPC is a remote procedure call that is often used by blogging software for sending posts to WordPress. Apps that use this procedure include the wordpress.com blogging apps.

By default, WP Discourse will not publish posts to Discourse that are created through XML-RPC. The reason for this is that there is no great way to indicate whether a post published through blogging software is meant to be published on Discourse.

If you would like to use blogging software for creating posts that are directly published to Discourse, you need to add some code to your theme's functions.php file that hooks into the 'wp_discourse_before_xmlrpc_publish' filter. The 'wp_discourse_before_xmlrpc_publish'filter passes two arguments to functions that hook into it. The first argument,$publish_to_discourseis a boolean that is set tofalseto disable publishing by XML-RPC. The second argument is thepost` object.

To have all XML-RPC posts automatically published by Discourse you need to write a function that will always return true. Use something like the following code:

Warning: this will cause all posts published through XML-RPC to be published to Discourse, this will include old posts that are edited on blogging software.

add_filter('wp_discourse_before_xmlrpc_publish', 'my_namespace_xmlrpc_publish', 10, 2 );
function my_namespace_xmlrpc_publish( $publish_to_discourse, $post ) {

    return true;
}

To only publish posts that have a 'discourse' tag, use something like this:

//add_filter('wp_discourse_before_xmlrpc_publish', 'my_namespace_xmlrpc_publish_by_tag', 10, 2 );
function my_namespace_xmlrpc_publish_tag( $publish_to_discourse, $post ) {
    if ( has_tag( 'discourse', $post ) ) {
        return true;
    }
    return false;
}

Dealing with WordPress shortcodes

The WP Discourse plugin does not process shortcodes before the content is published to Discourse. If your WordPress posts must include shortcodes in the content that is published to Discourse, those shortcode will be published as [shortcode_name] . Here are three different approaches for dealing with shortcodes that may be in your posts. The first two functions remove the shortcodes, the last function 'does' the shortcodes. Note: 'doing' the shortcodes will generally result in the output being processed by Discourse as code. This is because of whitespace that gets added to the output.

// Removes anything that looks like a shortcode. This will remove anything in the post that
// occurs inside of brackets `[...]`.
add_filter( 'wp_discourse_excerpt', 'testeleven_remove_shortcodes' );
function testeleven_remove_shortcodes( $excerpt ) {
    $excerpt = preg_replace( '/\[.*\]/', '', $excerpt );

    return $excerpt;
}

// Strips any shortcodes from the post content. If  theme is wrapping content between
// opening and closing shortcodes, that content will be removed as well.
add_filter( 'wp_discourse_excerpt', 'testeleven_strip_shortcodes' );
function testeleven_strip_shortcodes( $excerpt ) {
    $excerpt = strip_shortcodes( $excerpt );

    return $excerpt;
}

// Searches the content for shortcodes and filter shortcodes through their hooks.
add_filter( 'wp_discourse_excerpt', 'testeleven_do_shortcodes' );
function testeleven_do_shortcodes( $excerpt ) {
    $excerpt = do_shortcode( $excerpt );

    return $excerpt;
}

Posts: 1

Participants: 1

Read full topic

Docker rebuild failed updating Postgresql: Signature verification failed

$
0
0

@zachwlewis wrote:

I'm attempting to update my install. The admin panel informed me that I needed to update through SSH, and rebuild told me that I needed to migrate my database. Following the instructions, I updated my app.yaml file to point to templates/postgres.9.3.template.yml. Running launcher rebuild app again results in the following failure:

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
From https://github.com/SamSaffron/pups
   2b8776d..7bde3d3  master     -> origin/master
Updating 2b8776d..7bde3d3
Fast-forward
 README.md          | 2 +-
 lib/pups/config.rb | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
I, [2016-09-27T21:19:44.510780 #17]  INFO -- : Loading --stdin
I, [2016-09-27T21:19:44.523709 #17]  INFO -- : > echo cron is now included in base image, remove from templates
I, [2016-09-27T21:19:44.527893 #17]  INFO -- : cron is now included in base image, remove from templates

I, [2016-09-27T21:19:44.529276 #17]  INFO -- : > apt-get remove -y postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5
I, [2016-09-27T21:19:46.930960 #17]  INFO -- : Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 26.0 MB disk space will be freed.
(Reading database ... 34207 files and directories currently installed.)
Removing postgresql-contrib-9.5 (9.5.3-1.pgdg16.04+1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken
Removing postgresql-9.5 (9.5.3-1.pgdg16.04+1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing postgresql-client-9.5 (9.5.3-1.pgdg16.04+1) ...
Processing triggers for postgresql-common (174.pgdg16.04+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:

I, [2016-09-27T21:19:46.931767 #17]  INFO -- : > apt-get update && apt-get install -y postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.nodesource.com/node_4.x xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu xenial-updates InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu xenial-security InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch https://deb.nodesource.com/node_4.x/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-9.3/postgresql-client-9.3_9.3.13-1.pgdg16.04+1_amd64.deb  404  Not Found [IP: 174.143.35.246 80]

E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-9.3/postgresql-9.3_9.3.13-1.pgdg16.04+1_amd64.deb  404  Not Found [IP: 174.143.35.246 80]

E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-9.3/postgresql-contrib-9.3_9.3.13-1.pgdg16.04+1_amd64.deb  404  Not Found [IP: 174.143.35.246 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I, [2016-09-27T21:19:50.443609 #17]  INFO -- : Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [36.5 kB]
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Err:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:3 https://deb.nodesource.com/node_4.x xenial InRelease [3,914 B]
Err:3 https://deb.nodesource.com/node_4.x xenial InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Err:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Err:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Fetched 231 kB in 0s (373 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libossp-uuid16
Suggested packages:
  uuid locales-all postgresql-doc-9.3 libdbd-pg-perl
The following NEW packages will be installed:
  libossp-uuid16 postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,990 kB of archives.
After this operation, 23.9 MB of additional disk space will be used.
Err:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-client-9.3 amd64 9.3.13-1.pgdg16.04+1
  404  Not Found [IP: 174.143.35.246 80]
Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libossp-uuid16 amd64 1.6.2-1.5build2 [28.6 kB]
Err:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-9.3 amd64 9.3.13-1.pgdg16.04+1
  404  Not Found [IP: 174.143.35.246 80]
Err:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-contrib-9.3 amd64 9.3.13-1.pgdg16.04+1
  404  Not Found [IP: 174.143.35.246 80]
Fetched 28.6 kB in 0s (115 kB/s)



FAILED
--------------------
Pups::ExecError: apt-get update && apt-get install -y postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 failed with return #<Process::Status: pid 171 exit 100>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "apt-get update && apt-get install -y postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3"
7ca18c151c47eb492259b85215913a2ff69bebde4a9cb81320b55a822bc76f41
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

How can I successfully update Discourse?

Posts: 1

Participants: 1

Read full topic

Hearing people are having trouble signing up / logging in to my new Discourse community

$
0
0

@Meredith_of_Bevoya wrote:

I keep getting messages from friends like "I've had issues logging in here" or the following:

"I'm trying to sign up and clicked create but it's hanging and has been stuck for the last 10 mins"

Any insight on this, anyone? Is login or sign up acting up?

Posts: 8

Participants: 3

Read full topic

Unable to link to the raw markup of this forum post

$
0
0

@DavidEGrayson wrote:

I would like to report a bug in discourse that is preventing me from linking to the raw markup of a post from within the post itself.

When I left-click on this link in Google Chrome on Windows 10 64-bit, I would expect it to go to the raw markup for this post. It does change the URL bar of my browser to the expected URL, but it displays "Oops! That page doesn’t exist or is private." instead of displaying the raw text. Opening the link in a new tab does work.

The only workaround I know of is to use an external URL redirection service like TinyURL.com.

Also, there is a similar bug for links to RSS feeds that was never fixed.

--David

Posts: 7

Participants: 2

Read full topic

What will members see if we remove some badges?

$
0
0

@hross wrote:

Hi there -

We are working on redefining the badges we want to award our community. As part of the process, we are considering not using some of the standard badges in Discourse. I know I can turn these off by un-toggling the "Enable Badge" field. However, we have many community members who have already earned these badges. My assumption is that anyone who already earned a badge will keep it, but no more badges will be issued for badges we have disabled.

Can anyone confirm that this is the behavior? We don't want to disable a badge, have it disappear from a member's profile and possibly ruffle feathers.

Thanks,
Holly

Posts: 2

Participants: 2

Read full topic


Discourse Login & Registeration

$
0
0

@ErHarinderSingh wrote:

Hello everyone,
I am building an mobile app for discourse. How I can manage users within the app?
I want to register the user and login. Only register user can login and post new topics like in this forum. I have done lots of research but in every rest api, there is api_key required? How a user knows his api_key without registration? Anyone help please regarding registration and login. I don't find any solution from last 10 days. I want to do it fast. Please let me know if there is any api where username and password parameters are passed and then login successful. On successful user may get a token or something like api_key. Using which user can access topics, create new topics etc. under his username. Please let me know about it's solution.
Thanks in advance for everyone.

Posts: 5

Participants: 2

Read full topic

Setting to include excluded categories in homepage on mobile

$
0
0

@pmusaraj wrote:

Would it make sense to add a setting that only excludes categories from the homepage on desktop clients? Or would this be something that should be handled in a plugin?

Some context: I am building a Discourse site with an un-Discourse-like layout for the topic lists. My layout has a sidebar that lists the latest posts from several categories that are excluded from the homepage. Since the sidebar is only for desktop, topics from the sidebar categories are excluded from mobile as well, and I would like to show them in mobile.

I would be happy to do this within my plugin, if it is doable. I am a newbie in Ruby, but I did find where the filtering of excluded categories is done and I tested quickly adding a check for mobile_view there, and it works. I just added the unless statement below:

if filter.to_s == current_homepage
  unless view_context.mobile_view?
    list_opts[:exclude_category_ids] = get_excluded_category_ids(list_opts[:category])
  end
end

But, help, I don't know how to do this from within the plugin.

Posts: 1

Participants: 1

Read full topic

Can discourse be installed On Hostgator shared hosting?

$
0
0

@kudos wrote:

Can discourse be installed On Hostgator shared hosting where my Wordpress is hosted?

Posts: 3

Participants: 2

Read full topic

Tag suggestion problem in Persian

$
0
0

@Pad_Pors wrote:

when as a user, I type "a", it shows me all the tags that have "a" alphabet rather than showing me the tags that start with "a".

point 1: if the number of tags are more than 10 and your desired tag starts with a common alphabet, you will see a long list.
point 2: in Persian, the suggesting system doesn't work, and you always see all the tags as you start typing your desired tag.

Posts: 1

Participants: 1

Read full topic

Couple Of Questions Before Choosing Discourse for my WP

$
0
0

@kudos wrote:

I am planning to install Discourse on my new business i.e. Blogeto.com

Questions →

  1. What I understand is Discourse codes are installed on 3rd party somewhere else, but they are configured with Wordpress → The discussions that will appear on my website will be saved in WP database or on the third party and if they are hosted on the third party then my immediate question is the pages that will be created with the help of Discourse will be live on my website and they will be indexable on Google, Right?

  2. The Second question → what about the security as If I install discourse say on Digital Ocean then will my data there, which will be discussions will that be safe?

  3. If in the case of some day Discourse stops update and discourse become obsolete in few years after stopping the updates then in that case somehow my content could be transferred to some other system say BBPRESS. I am asking these questions because these questions are very important as this is a big decision point to choose the support forum software to avoid future chaos.

  4. Emails such as new reply or your have successfully signed in will be sent through which server, the server where WP is installed or server from where Discourse is installed or perhaps absolute different SMTP's such as amazon SES, send grid etc?

  5. The last question can discourse be installed on the amazon servers, any idea.

Posts: 13

Participants: 7

Read full topic

Message to new visitors

Urgent: Site down after upgrade to 1.6.4 due to Cloudflare template

$
0
0

@ljpp wrote:

Just ran into a bit of a problem.

I did routine updates to my site Tappara.co:

  • 1.6.2 -> 1.6.4 via git pull and ./launcher rebuild app
    • It went cleanly.
  • Installed a few updates available to Ubuntu 16.04 server
  • Rebooted

Now the site refuses to come back online. Now this stuff goes beyond my linux sysadmin skillz.

From what I can see, Docker is running and so does the app. I see relevant processes (ruby etc) starting, but basically idling. The site is reporting a 521 error. Tried re-rebuild a couple of times, but no luck. The installation is originally made with Discourse 1.5b in December, but switched to stable branch when it was released in April.

I would guess that http requests are not correctly routed, but I have not touched any settings or parameters of that field. This is basically a default installation. I do not have Let's Encrypt or other certificate enabled.

  • Anyone seen similar recently?
  • Newbie friendly tips on how to start diagnosing and fixing?

There seems to be a flood of errors in nginx/error.log

2016/09/28 12:32:09 [emerg] 977#977: invalid number of arguments in "set_real_ip_from" directi$

Posts: 22

Participants: 6

Read full topic


Crawler View still shows Tags when Tags are disabled

$
0
0

@Pirat wrote:

I popolzovatsja these tags
and I realized that they were with bugs and errors
Karoche saying if you use these tags and then want to stop you will have a bunch of non-existent pages
I think to remove the plug-in is crude
Sorry for the translation :slight_smile:

or it needs to be updated

Posts: 7

Participants: 3

Read full topic

Customizing the home page title

$
0
0

@DanielMarquard wrote:

I've tried searching, and maybe I'm missing something obvious, but is there no way to customize the <title> tag for just Discourse's home page?

Posts: 3

Participants: 2

Read full topic

How to disable tooltip?

Admins can't remove themselves from PMs

$
0
0

@cpradio wrote:

Reproduction Steps:

  1. testuser2 (not staff), messages testuser5 (also not staff)
  2. testuser2 invites admin (an admin) to PM
  3. admin replies he has nothing he can contribute and then clicks the [x] next to admin to remove himself
  4. Message denoting admin removed admin is shown in PM thread (recipient list removes admin too)
  5. Refresh the page, admin is still listed as a recipient,

Expected:
Admins should be able to remove themselves from a topic to avoid notifications and make it clear to the users they are not on it.

It is understood the admin can review that PM regardless, but to end users, it makes it clear that the admin is not apart of the active discussion anymore.

Side Note:
If any of the recipients is a moderator. They can successfully remove the admin from the PM.
Other admins can remove other admins too. It is just an admin can't remove themselves from a PM.

Tested on Latest, ping @ralphm

Posts: 3

Participants: 3

Read full topic

RSS not working/enabled for tags in category

Viewing all 60642 articles
Browse latest View live


Latest Images