Commit graph

16574 commits

Author SHA1 Message Date
jenkins-bot 932286063f Merge "Improve message for the infamous "HTTP 404" error" 2019-10-18 10:57:17 +00:00
jenkins-bot 416323bdca Merge "Fix media embeds which don't link to the file page" 2019-10-18 10:55:58 +00:00
jenkins-bot 4452062bab Merge "Detect mangled etags from RESTBase and retry via MediaWiki API" 2019-10-18 10:50:39 +00:00
Bartosz Dziewoński 3a7f5703dd Improve message for the infamous "HTTP 404" error
(This is the error from T233127.)

It's still somewhat unhelpfully generic because it can appear in many
situations. But at least it'll be searchable, and less ambiguous about
where the 404 happened when a user reports getting this error.

Change-Id: I9e771934c436f39dd380fa5a06edcfbce9efad4c
2019-10-18 11:05:19 +02:00
Bartosz Dziewoński 6037fefbe0 Fix media embeds which don't link to the file page
Follow-up to da9b6fffbd.

Bug: T235707
Change-Id: Ie5a12bf274ae6178106f81a4c84686a88307c9fb
2019-10-17 22:12:58 +02:00
Translation updater bot b901f8f107 Localisation updates from https://translatewiki.net.
Change-Id: I8067e58fda7ae83d73f86fc60a8d280bda7c7e34
2019-10-17 09:54:06 +02:00
Translation updater bot 0ee9f78297 Localisation updates from https://translatewiki.net.
Change-Id: I6aa2e183d73f7253bae6be5f59aaa886c2bdb546
2019-10-16 20:42:57 +02:00
Bartosz Dziewoński 5d1a67757a Detect mangled etags from RESTBase and retry via MediaWiki API
Something is causing the 'ETag' headers produced by the "public"
RESTBase (queried directly from the client) to be mangled or lost.
My theory is that some proxy or browser extension is doing that.

When we detect a bad etag when fetching the page contents, discard
the result and try querying the "private" RESTBase via the MediaWiki
API (similar to what we do on private wikis, except there we talk
directly to Parsoid instead of RESTBase). After I463a84de63, that
returns the etag as part of the payload rather than HTTP headers,
and should pass unharmed through whatever is mangling the data.

Also compare and log the two etags.

Bug: T233320
Change-Id: I2ef0ca872597566f74b650aea71bf3f15747a6d7
2019-10-16 19:53:43 +02:00
jenkins-bot a79b587cb1 Merge "ApiVisualEditor: Always return 'etag' with 'content'" 2019-10-16 15:06:18 +00:00
Translation updater bot bae38531bd Localisation updates from https://translatewiki.net.
Change-Id: I03dbafb688c8af17cdad08d67ad30da560793ca0
2019-10-16 10:41:39 +02:00
Bartosz Dziewoński 679e777cfa ApiVisualEditor: Always return 'etag' with 'content'
For consistency, I guess. Also I need this in I2ef0ca8725.

Previously, when querying the HTML content of an existing page, we did
not return the 'etag', on the assumption that anyone who needs it will
instead query RESTBase directly.

Bug: T233320
Change-Id: I463a84de631598243893946ad1d060a9aa0b180e
2019-10-15 18:31:56 +00:00
James D. Forrester dec54cf56e build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I23702d16eee09292b63051f94103a3bca3b1dd13
2019-10-11 12:42:23 -07:00
jenkins-bot 389fd5c668 Merge "Catch errors during document initialization" 2019-10-11 16:24:02 +00:00
jenkins-bot b15eea1cb0 Merge "Fix Vector wikitext surface padding overrides when using custom browser font-size" 2019-10-11 15:23:17 +00:00
jenkins-bot cc1bd58e83 Merge "Parse relative hrefs on image nodes like on regular links" 2019-10-11 15:22:29 +00:00
Ed Sanders 57d8e53111 Catch errors during document initialization
Change-Id: I5dc29666f99ac10bbf63a56153ba9a32d3568daa
Depends-On: I57fb6319bc3a9cee347c39fc75f555543991d703
2019-10-11 15:13:10 +00:00
jenkins-bot 2c243647d3 Merge "Enforce that some files must not use the ve global" 2019-10-10 19:27:22 +00:00
James D. Forrester 8bb02cc454 Update VE core submodule to master (2f2cdd89d)
New changes:
8ff4683d3 libs: Update papaparse to 5.1.0
210518d4a eslint: Remove unused prefer-template rule; use proper globals values
fd8bf7425 Localisation updates from https://translatewiki.net.
f09a8f327 Remove <style> tags from $pasteTarget immediately
0f76791ac lib: Unset the executable bit on the papaparse.js library
8d05203fa TreeCursor: cross ignored nodes properly from the end of a text node

Bug: T234881
Bug: T235068
Change-Id: Icf9e0ca80575e45577ebf51764247da4dd82bdba
2019-10-10 12:02:20 -07:00
Bartosz Dziewoński 3f0f302577 Enforce that some files must not use the ve global
Previously, the ve-mw/init/ directory contained two kinds of files:
those that were used when initializing VE, and those that may be
loaded even if VE is not going to be initialized at all. The latter
kind must not use the `ve` global variable.

After moving those files to ve-mw/preinit/ we can enforce this with
.eslintrc.json in that directory. This would have prevented T228684.

(Technically they merely must not use `ve.init`, and may use `ve`,
but that's harder to enforce. We should instead move the few non-init
methods out of `ve`: now, track, trackSubscribe, trackSubscribeAll).

Also, group some files under ve-mw/init/: targets/ now (only)
contains ve.init.mw.Target and its subclasses, apiresponsecache/
now contains ve.init.mw.ApiResponseCache and its subclasses.

Bug: T228684
Change-Id: I945249a27f6a0fa10a432d5c5dc57bc7e0461fd8
2019-10-10 15:15:40 +00:00
Translation updater bot 435d6d2a63 Localisation updates from https://translatewiki.net.
Change-Id: Iacfa47502110f9c0089f18f759603b4ff7a887fa
2019-10-10 09:34:02 +02:00
Translation updater bot 955a114c01 Localisation updates from https://translatewiki.net.
Change-Id: I7c04a8109d0a39803f028e9d2b5422b66d2a2c71
2019-10-08 09:34:53 +02:00
jenkins-bot 6096eccbf7 Merge "eslint: Remove unused prefer-template rule; use proper globals values" 2019-10-07 18:45:57 +00:00
Ed Sanders fd43701de2 eslint: Remove unused prefer-template rule; use proper globals values
Change-Id: If98be563304baa46a746d78c94dd8945f94d545c
2019-10-07 17:22:24 +00:00
Bartosz Dziewoński b8867f425b Merge "Update VE core submodule to master (2c8e48194)" 2019-10-07 16:04:23 +00:00
jenkins-bot def3261c49 Merge "Fix linking to pages in media dialog/media context/internal link context" 2019-10-07 15:13:02 +00:00
Bartosz Dziewoński 621c6f4759 Update VE core submodule to master (2c8e48194)
New changes:
fec3647e7 TreeModifier: return correct position in ensureNotText
2c8e48194 TreeModifier: Ignore more attributes when validating linear data

Bug: T234489
Bug: T234742
Change-Id: Ib83dfa2f2e02a63a8e9774f3383e5796a624cb64
2019-10-07 16:45:56 +02:00
Bartosz Dziewoński 55aec8f977 ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names
The ...target.wt property contains the wikitext used to generate
the template name. It can contain trailing newlines (T234817) and
all kinds of funny wikitext syntax. Instead, use ...target.href,
which is the title of the page that is actually transcluded. Compare
the new code to ve.dm.MWTransclusionNode.prototype.getPartsList.

Additionally, fix some confusion about namespaces (treating template
names as titles in the main namespace). The template names in the
configuration page (visualeditor-template-tools-definition.json)
now support overriding namespaces in the same way as in wikitext.

Bug: T234817
Change-Id: I7c557d28e961d0b9117fc0380c65cdd42035ae96
2019-10-07 14:56:16 +02:00
Bartosz Dziewoński 7579f6eb1f Fix linking to pages in media dialog/media context/internal link context
If you had an image thumbnail for a file 'Foo?.png' on the page,
ve.ui.MWMediaContextItem and ve.ui.MWMediaDialog did not escape
the '?' when linking to it, which resulted in incorrect links.
Similarly, if you had an internal link to the page 'Foo?',
ve.ui.MWInternalLinkContextItem did not escape it.

Additionally, the links were always generated as if the wiki was
using short URLs, even when it is not (T233628).

The approach using mw.Title is copied from ve.ui.MWGalleryDialog.

Bug: T233628
Change-Id: I10256ed6883dae0ea216de4c0719f03d7fd19ae4
2019-10-07 14:27:02 +02:00
James D. Forrester 052a879c3c Update VE core submodule to master (8347ba91b)
New changes:
7cabb6fd2 build: Update eslint-config-wikimedia
8347ba91b Localisation updates from https://translatewiki.net.

Change-Id: I3260da9afe8f3230c124588419606ddbc42ae277
2019-10-03 14:26:19 -07:00
David Lynch d03db0e4f2 ui.MWSaveDialog: checkbox tracking was getting duplicated on every setup
Bug: T232790
Change-Id: Id19aa59c71432d0179fc06b6a30014d1037074ae
2019-10-03 12:44:43 -05:00
Translation updater bot 1c6baa06cb Localisation updates from https://translatewiki.net.
Change-Id: I9c1dae30cc92347719eedca4604976e0fc9677cf
2019-10-03 10:06:37 +02:00
jenkins-bot fc06416de8 Merge "build: Update eslint-config-wikimedia and fix" 2019-10-03 00:11:22 +00:00
Ed Sanders 41572f2595 build: Update eslint-config-wikimedia and fix
Change-Id: Ib9cf45a393438e2eb47fd1b0c837d2d6acb06541
2019-10-03 00:54:54 +01:00
jenkins-bot 964099043b Merge "Don't try to use structured data in structured logging, it doesn't work" 2019-10-02 21:32:33 +00:00
jenkins-bot 44e3319824 Merge "ApiVisualEditorEdit: Add logging for funny etags" 2019-10-02 21:32:30 +00:00
Bartosz Dziewoński 04407e9eb1 Don't try to use structured data in structured logging, it doesn't work
Our log messages were being silently dropped. Experimentation revealed
that our structured logging system doesn't actually like it when we
try to log structured data.

See: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/540464/3/includes/ApiVisualEditorEdit.php

Put it all in the message strings, whatever.

Change-Id: Iae778f95774df2e24b30387221e39e097e25a4cf
2019-10-02 23:13:40 +02:00
jenkins-bot 55709912a7 Merge "ApiVisualEditor: Add logging for RESTBase HTTP errors" 2019-10-02 16:30:30 +00:00
Translation updater bot d3a4135854 Localisation updates from https://translatewiki.net.
Change-Id: I2d9fdb5e43b745203306f5ac7188ecc82743f6d3
2019-10-02 09:23:34 +02:00
Bartosz Dziewoński df0c8ad02d ApiVisualEditorEdit: Add logging for funny etags
Bug: T233320
Change-Id: I0f321df057068e1dd396a04a9e194853c2b0e9e4
2019-10-02 03:23:29 +02:00
Ed Sanders 877721fb55 Update VE core submodule to master (191f8c90c)
New changes:
25422cb06 Fix missing table cell "fake slugs"

Bug: T234108
Change-Id: I5de4940e7ee67799f8b60fa4cc5e277c1e3eff55
2019-10-02 00:17:21 +01:00
Bartosz Dziewoński 9ce8ae05c7 ApiVisualEditor: Add logging for RESTBase HTTP errors
Bug: T233127
Change-Id: Ide5138d8f8f462b9c3d7da10f26ff57c9d17f1c9
2019-10-02 01:00:32 +02:00
James D. Forrester 673d2bc657 Update VE core submodule to master (163767591)
New changes:
05306a572 ve.ui.SpecialCharacterPage: Remove unused icon handling
738244b1f Localisation updates from https://translatewiki.net.
7527b151c Upgrade DOMPurify 1.0.10 -> 2.0.0
ff5c1def9 Catch errors when applying initial history

Change-Id: I43c2668ddf1c2a15d724b24532256fc2d222facd
2019-10-01 14:37:01 -07:00
jenkins-bot 9dc3ecf4e4 Merge "Fix loading icons for historical diff mode switcher" 2019-10-01 15:28:26 +00:00
Translation updater bot cb5354b77e Localisation updates from https://translatewiki.net.
Change-Id: Ie95508ee53d56e140b70911d6df286e0be296a54
2019-10-01 09:26:53 +02:00
Bartosz Dziewoński ca3c887e36 Fix loading icons for historical diff mode switcher
The 'eye' icon is in the 'accessibility' pack, not 'alerts'.
Compare to the dependencies of 'ext.visualEditor.diffPage.init'.

Change-Id: Ie14ab6be756fd9e0bef59475466674a41273046f
2019-10-01 03:31:27 +02:00
jenkins-bot 73a92d847d Merge "ArticleTargetEvents: clean up some duplication" 2019-09-30 23:49:27 +00:00
jenkins-bot 78ed28fbf0 Merge "Update VE core submodule to master (084bdb77e)" 2019-09-30 18:09:46 +00:00
jenkins-bot 4d1d9677b5 Merge "Fix mw:MediaLink support" 2019-09-30 17:14:34 +00:00
David Lynch 651e00d529 ArticleTargetEvents: clean up some duplication
Change-Id: Ied2851f9d77d055db9fc22668b963a01ca098a95
2019-09-30 11:29:01 -05:00
James D. Forrester 3c9a8fe7f5 Update VE core submodule to master (084bdb77e)
New changes:
db8c96bc9 Localisation updates from https://translatewiki.net.
084bdb77e Localisation updates from https://translatewiki.net.

Change-Id: I527846592bc8f36c6e8197d3b861db96a1904ca7
2019-09-30 08:24:05 -07:00