Commit Graph

38238 Commits

Author SHA1 Message Date
Mark VanLandingham 57a8b3b964
DEV: Add group name as class to group-box (#10150) 2020-06-30 10:49:31 -05:00
David Taylor 4db9f7bb73
FIX: Hide publish_read_state option from non-admin users (#10148) 2020-06-30 16:49:04 +01:00
Gerhard Schlager fc8e842773 FIX: Sometimes not all output of psql was logged during restores
There was a race condition which could prevent Discourse from logging the last couple of lines of output from psql.
2020-06-30 16:52:50 +02:00
dependabot-preview[bot] c0b37aa9ef
Build(deps): Bump diff-lcs from 1.4.1 to 1.4.3 (#10145)
Bumps [diff-lcs](https://github.com/halostatue/diff-lcs) from 1.4.1 to 1.4.3.
- [Release notes](https://github.com/halostatue/diff-lcs/releases)
- [Changelog](https://github.com/halostatue/diff-lcs/blob/master/History.md)
- [Commits](https://github.com/halostatue/diff-lcs/compare/v1.4.1...v1.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-30 10:11:55 -04:00
dependabot-preview[bot] cd70960c49
Build(deps): Bump json from 2.3.0 to 2.3.1 (#10147)
Bumps [json](https://github.com/flori/json) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/flori/json/releases)
- [Changelog](https://github.com/flori/json/blob/master/CHANGES.md)
- [Commits](https://github.com/flori/json/compare/v2.3.0...v2.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-30 10:11:09 -04:00
dependabot-preview[bot] 68ebfa3ef1
Build(deps): Bump zeitwerk from 2.3.0 to 2.3.1 (#10146)
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/fxn/zeitwerk/releases)
- [Changelog](https://github.com/fxn/zeitwerk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.3.0...v2.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-30 10:06:51 -04:00
Sam Saffron 67a310db02
FIX: emoji_autocomplete_min_chars failing when not 0
autocomplete resolving to [] was causing it to stop working.
Instead we have a special const (SKIP) which ensures it will
continue to be evaluated and only this instance is skipped.
2020-06-30 17:39:52 +10:00
Mark VanLandingham d00e83eab1
FIX: update theme fields when updating from ThemesInstallTask (#10143) 2020-06-29 13:49:02 -05:00
Roman Rizzi 7ddd83dfcf
FIX: Uploads cannot be mapped due to the cook-text's element attr being null (#10136) 2020-06-29 15:37:40 -03:00
Mark VanLandingham cd5cfc1496
FEATURE: Site setting to always show category definitions (#10124) 2020-06-29 13:22:02 -05:00
dependabot-preview[bot] 598b7914b6
Build(deps): Bump mini_racer from 0.2.14 to 0.2.15 (#10142)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/discourse/mini_racer/releases)
- [Changelog](https://github.com/rubyjs/mini_racer/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_racer/compare/v0.2.14...v0.2.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 11:51:07 -04:00
Dan Ungureanu fe284ffd06
Revert "DEV: Remove useless code (#10130)"
Some oneboxes still generate empty P tags (video oneboxes).

This reverts commit c299d02287.
2020-06-29 13:56:28 +03:00
Régis Hanol 860deeb072 FIX: identify slug-less topic urls everywhere
In 91c89df6, I fixed the onebox to support local topics with a slug-less URL.
This commit fixes all the other spots (search, topic links and user badges) where we look up for a local topic.

Follow-up-to: 91c89df6
2020-06-29 12:31:20 +02:00
David Taylor 0edffcc47d
FIX: Correct version comparison logic when comparing stable to beta (#10135)
* FIX: Correct version comparison logic when comparing stable to beta

For example, version 1.3.0 should be considered higher than 1.3.0.beta3. So `Discourse.has_needed_version?('1.3.0', '1.3.0.beta3')` should return true

* Switch to use Gem::Version to compare versions
2020-06-29 17:52:33 +10:00
Dan Ungureanu c299d02287
DEV: Remove useless code (#10130)
protection is not needed and can easily be bypassed with empty divs anyway.
2020-06-29 17:49:30 +10:00
Raph fa8bb5f464
import pkuczynski public key for RVM install (#10140) 2020-06-29 17:48:21 +10:00
Guo Xiang Tan 2c4c953bf8
DEV: Avoid logging errors on bad Redis connection during PG failover. 2020-06-29 11:54:55 +08:00
Guo Xiang Tan 89bac20b8e
DEV: Prefer `fab!` over `let!`. 2020-06-29 11:11:06 +08:00
Blake Erickson 69803599a9 DEV: Refactor seed data filter
Added a small helper class to for seed data because we need to add the
same filter to multisite:migrate as we have in db:migrate. Having this
filter in both places means we can get rid of the SKIP_SEED flag.
2020-06-26 14:36:50 -06:00
Dan Ungureanu 4efc126635
FIX: Serialize an empty array if no suggested topics exist (#10134)
It used to return nil, which was ambiguous (empty vs absent
result).
2020-06-26 22:25:38 +03:00
dependabot-preview[bot] cb898a8023
Build(deps): Bump rubocop-ast from 0.0.3 to 0.1.0 (#10132)
Bumps [rubocop-ast](https://github.com/rubocop-hq/rubocop-ast) from 0.0.3 to 0.1.0.
- [Release notes](https://github.com/rubocop-hq/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-ast/compare/v0.0.3...v0.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-26 12:01:08 -04:00
Régis Hanol d234e0f922 SPEC: add spec to ensure discobot works in French
PERF: memoize cooked triggers

Follow-up to 3c31884b
2020-06-26 12:48:11 +02:00
Guo Xiang Tan c16ad39f8e
DEV: Run seeds irregardless of post deploy migration flag.
Follow up to 01937b2d
2020-06-26 11:04:34 +08:00
Guo Xiang Tan 01937b2de2
Revert "FIX: Seed needs to run before optimizing site icons."
This reverts commit 715ddf3861.
2020-06-26 11:03:47 +08:00
Guo Xiang Tan 715ddf3861
FIX: Seed needs to run before optimizing site icons. 2020-06-26 08:58:53 +08:00
tshenry d5a063993d
FIX: published-page-header should be a sibling to published-page-body not a parent (#10126) 2020-06-25 14:47:05 -07:00
Rafael dos Santos Silva d58360f72e
DEV: Add a basic licensed config (#10128)
This means a dev can run https://github.com/github/licensed
in order to obtain license information easily
2020-06-25 18:01:36 -03:00
Neil Lalonde 8c9cc5b772
DEV: add class to body of no_ember layout so it can targeted in CSS 2020-06-25 16:17:19 -04:00
Justin DiRose 768bb406ee
DEV: Add knowledge-explorer to official plugin list (#10127) 2020-06-25 14:52:14 -05:00
Joshua Rosenfeld f60dc7f5b4
FIX: Broken specs
`/u/` is no longer in robots.txt, so don't test for it
2020-06-25 14:30:57 -04:00
Joshua Rosenfeld b52143feff
FIX: Remove paths from robots.txt in favor of noindex header
Google no longer supports the use of robots.txt to block indexing.
See https://support.google.com/webmasters/answer/6062608 and
https://support.google.com/webmasters/answer/93710

Previous commits have added the `noindex` header to appropriate pages,
now we need to remove the paths from robots.txt so the pages can be
crawled.

Follow up to:
13f229808a
b6765aac4b
676be3a853
07b728c5e5
c94e6a9a66
2020-06-25 13:55:06 -04:00
Blake Erickson 01b6349a67
DEV: Add skip seed flag (#10116)
* add a flag to skip seed

* only seed when running post deployment migrations
2020-06-25 10:14:58 -06:00
dependabot-preview[bot] 855d423791
Build(deps-dev): Bump mock_redis from 0.24.0 to 0.25.0 (#10123)
Bumps [mock_redis](https://github.com/sds/mock_redis) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/sds/mock_redis/releases)
- [Changelog](https://github.com/sds/mock_redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sds/mock_redis/compare/v0.24.0...v0.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-25 10:28:20 -04:00
Régis Hanol 3c31884b79 FIX: match discobot triggers on cooked version
In French, the help trigger has a raw content of "afficher l'aider" which is then cooked into "afficher l’aide" (note the different quote character).
Since we were checking the raw content of the trigger against the cooked version of the post, this trigger never worked in French.

This changes so that we cook the trigger before checking in against the cooked version of the post.

DEV: new 'discobot_username' method that is used everywhere instead of 'discobot_user.username' / 'discobot_user.username_lower'
2020-06-25 13:29:55 +02:00
Sam Saffron 689568c216
FIX: invalid urls should not break store.has_been_uploaded?
Breaking this method has wide ramification including breaking
search indexing.
2020-06-25 15:00:15 +10:00
Sam Saffron 88459e08c9
FEATURE: allow disabling of extra term injection in search
There is a feature in search where we take over from the tokenizer
in postgres and attempt to inject more words into search.

So for example: sam.i.am will inject the words i and am.

This is not ideal cause there are many edge cases and this can
cause extreme index bloat.

This is an opening move commit to make it configurable, over the
next few weeks we will evaluate and decide if we disable this by
default or simply remove.
2020-06-25 13:36:52 +10:00
Sam Saffron 3cb41d5429
PERF: stop adding more topics to search when not needed
The logic of adding additional search results does not seem to be
needed anymore.

It appears to be a relic of an old implementation.

This saves an entire search query for every search made.
2020-06-25 12:31:12 +10:00
Guo Xiang Tan 42a6c8a85f
DEV: Rescue from ActiveRecord::Readonly error in lograge. 2020-06-25 10:25:28 +08:00
Guo Xiang Tan 9c7d3b2dc0
FIX: Avoid marking notifications as seen in readonly mode. 2020-06-25 10:14:07 +08:00
Neil Lalonde b9174c8e8a
Version bump to v2.6.0.beta1 2020-06-24 14:00:19 -04:00
Neil Lalonde 8e07ee7e36
Update translations
Carefully because permalink.external_url is untranslated in many
locales due to a recent change in client.en.yml in 516a03be09.
2020-06-24 10:47:45 -04:00
Régis Hanol 7109d94ee7 FIX: properly invalidate inline oneboxes when rebaking
When rebaking a post we were invalidating _regular_ oneboxes but not inline oneboxes.

DEV: also renamed 'InlineOneboxer.purge' to 'InlineOneboxer.invalidate' to keep
the API consistent with 'Oneboxer.invalidate'
2020-06-24 11:54:54 +02:00
Joffrey JAFFEUX df1f804400
FIX: ensures moderation history is accessible from topic/post admin menu (#10118) 2020-06-24 10:49:47 +02:00
Bianca Nenciu 75151f0457
FIX: Use correct URL for unsubscribe (#10077) 2020-06-24 09:31:20 +02:00
Sam Saffron 9ffc022cf4
DEV: improve verbose mode for reindexer
This makes the verbose mode provide a bit of progress notification
while reindexing as it can take many hours to do a giant site
2020-06-24 17:29:45 +10:00
Sam Saffron 2987901043
FIX: skip category notification_level unless scoped
#b19dcac2 improved the serializer so it sends default notification
levels to users to work around cases where a category edit would
would result in clients being left with invalid notification state

Unfortunately this did not address the root issue.

When we edit categories we publish state to multiple users this
means that the serializer is executed unscoped with no user.

The client already handles this case per:

dcad720a4c/app/assets/javascripts/discourse/app/models/site.js (L119-L119)

If a property is not shipped to it, it will leave it alone on the
existing category.


This fix ensures that these wide category info updates do not
include notification state to avoid corruption of local state.
2020-06-24 17:08:12 +10:00
Jarek Radosz 0e2f7ecfd0
DEV: Make component-test `afterEach` async aware (#10099)
Before this fix, if a test case was async, `afterEach` callback would be executed immediately, without waiting for the test to finish. 😬
2020-06-24 16:03:38 +10:00
Bianca Nenciu 843bf0df75
FIX:Add migration to delete tracking state for staged users (#10083) 2020-06-24 15:58:14 +10:00
Kane York 52278ce6fd
FIX: Use Discourse.system_user when we need a placeholder admin (#9781) 2020-06-24 15:51:30 +10:00
Neil Lalonde 713298c622
FIX: advanced tutorial errors when all categories are secured (#10111)
The category hashtag step will fail with an error when all
categories aren't public. Choose a category that the user can see.
2020-06-24 15:45:50 +10:00