Tested in MediaWiki 1.33, 1.34 and 1.35. With Parsoid 0.10.0 and 0.11.0. With Restbase 1.1.4. Also tested with latest releases of all code versions involved.
Behavior is the same in all instances. When making an edit and saving using Visual Editor (or switching to source) the browser hangs for a long time. Eventually resulting in:
This is the code snippet I have been using for testing:
<section begin="example" /> This is a test example for transclusion: <pre class="shell" style="display: inline-block"> code snippet line 1 code snippet line 2 code snippet line 3 </pre> <section end="example" />
After disabling SMW on our wiki's the issue is not present. But strangely the section tags only show in VE when SMW is enabled.
Here is our restbase log while reproducing:
{"name":"restbase","hostname":"testwiki.wiki.internal","pid":347,"level":50,"err":{"message":"<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center
><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n","name":"restbase","stack":"HTTPError: <html>\r\n<head><title>504 Gate
way Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n\n at request.then (
/var/lib/restbase/node_modules/preq/index.js:228:23)\n at tryCatcher (/var/lib/restbase/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFrom
Handler (/var/lib/restbase/node_modules/bluebird/js/release/promise.js:547:31)\n at Promise._settlePromise (/var/lib/restbase/node_modules/bluebird/js/release/promise.js:
604:18)\n at Promise._settlePromise0 (/var/lib/restbase/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/var/lib/restbase/node_module
s/bluebird/js/release/promise.js:729:18)\n at _drainQueueStep (/var/lib/restbase/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/var/lib/restbase/n
ode_modules/bluebird/js/release/async.js:86:9)\n at Async._drainQueues (/var/lib/restbase/node_modules/bluebird/js/release/async.js:102:5)\n at Immediate.Async.drainQu
eues [as _onImmediate] (/var/lib/restbase/node_modules/bluebird/js/release/async.js:15:14)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n
at processImmediate (timers.js:658:5)","status":504,"headers":{"content-type":"text/html; charset=utf-8","server":"nginx/1.16.1","date":"Wed, 04 Mar 2020 17:08:35 GMT","c
onnection":"keep-alive"},"body":{"detail":"<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><cen
ter>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n","internalURI":"http://testwiki.wiki.internal/api.php","internalMethod":"post"},"root_req":{"method":"post","uri":"/testw
iki.wiki.internal/v1/transform/wikitext/to/html/User%3ACaleb_Cooper%2Fsandbox","headers":{"content-length":"372","content-type":"multipart/form-data; boundary=--------------
----------8ffcba5a1683612f","user-agent":"VisualEditor-MediaWiki/1.35.0-alpha","api-user-agent":"VisualEditor-MediaWiki/1.35.0-alpha","x-client-ip":"::ffff:172.18.0.5","x-fo
rwarded-for":"::ffff:172.18.0.5","x-request-id":"a5182ac0-5e3a-11ea-ac39-c55b55faee1e","x-request-class":"external"}},"request_id":"a5182ac0-5e3a-11ea-ac39-c55b55faee1e","ap
i_path":"/testwiki.wiki.internal/v1/transform/wikitext/to/html/{title}","levelPath":"error/site_info"},"msg":"<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<
body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n","time":"2020-03-04T17:08:35.742Z","v":0}
{"name":"restbase","hostname":"testwiki.wiki.internal","pid":347,"level":50,"message":"500: server_error","res":{"name":"HTTPError","message":"500: server_error","status":50
0,"body":{"type":"server_error","title":"Site info fetch failed.","detail":"<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway T
ime-out</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n"},"headers":{"access-control-allow-origin":"*","access-control-allow-methods":"GET,HEAD"
,"access-control-allow-headers":"accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accep
t-encoding","access-control-expose-headers":"etag","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","referrer-policy":"origin-when-cross-origin","x-xss-prot
ection":"1; mode=block","content-security-policy":"default-src 'none'; frame-ancestors 'none'","x-content-security-policy":"default-src 'none'; frame-ancestors 'none'","x-we
bkit-csp":"default-src 'none'; frame-ancestors 'none'","cache-control":"private, max-age=0, s-maxage=0, must-revalidate","x-request-id":"a5182ac0-5e3a-11ea-ac39-c55b55faee1e
","server":"testwiki.wiki.internal"}},"stack":"HTTPError: 500: server_error\n at _siteInfoCache.(anonymous function)._doRequest.catch (/var/lib/restbase/sys/action.js:350
:23)\n at tryCatcher (/var/lib/restbase/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/var/lib/restbase/node_modules/bluebird
/js/release/promise.js:547:31)\n at Promise._settlePromise (/var/lib/restbase/node_modules/bluebird/js/release/promise.js:604:18)\n at Promise._settlePromise0 (/var/li
b/restbase/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/var/lib/restbase/node_modules/bluebird/js/release/promise.js:725:18)\n at
_drainQueueStep (/var/lib/restbase/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/var/lib/restbase/node_modules/bluebird/js/release/async.js:86:9)\n
at Async._drainQueues (/var/lib/restbase/node_modules/bluebird/js/release/async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (/var/lib/restbase/node_m
odules/bluebird/js/release/async.js:15:14)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)","laten
cy":59828,"root_req":{"method":"post","uri":"/testwiki.wiki.internal/v1/transform/wikitext/to/html/User%3ACaleb_Cooper%2Fsandbox","headers":{"content-length":"372","content-
type":"multipart/form-data; boundary=------------------------8ffcba5a1683612f","user-agent":"VisualEditor-MediaWiki/1.35.0-alpha","api-user-agent":"VisualEditor-MediaWiki/1.
35.0-alpha","x-client-ip":"::ffff:172.18.0.5","x-forwarded-for":"::ffff:172.18.0.5","x-request-id":"a5182ac0-5e3a-11ea-ac39-c55b55faee1e","x-request-class":"external"}},"req
uest_id":"a5182ac0-5e3a-11ea-ac39-c55b55faee1e","levelPath":"error/request","msg":"500: server_error","time":"2020-03-04T17:08:35.745Z","v":0}Here is the parsoid log while reproducing:
{"name":"parsoid","hostname":"testwiki.wiki.internal","pid":323,"level":60,"err":{"message":"","name":"lib/index.js","stack":"Error: Config Request failure for \"http://test
wiki.wiki.internal/api.php\": 504\n at ConfigRequest.ApiRequest._requestCB (/var/lib/parsoid/lib/mw/ApiRequest.js:428:11)\n at Request.request [as _callback] (/var/lib
/parsoid/lib/mw/ApiRequest.js:332:35)\n at Request.self.callback (/var/lib/parsoid/node_modules/request/request.js:185:22)\n at Request.emit (events.js:198:13)\n at
Request.<anonymous> (/var/lib/parsoid/node_modules/request/request.js:1154:10)\n at Request.emit (events.js:198:13)\n at IncomingMessage.<anonymous> (/var/lib/parsoid
/node_modules/request/request.js:1076:12)\n at Object.onceWrapper (events.js:286:20)\n at IncomingMessage.emit (events.js:203:15)\n at endReadableNT (_stream_readab
le.js:1145:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)","levelPath":"fatal/request"},"msg":"Config Request failure for \"http://testwiki.wiki.int
ernal/api.php\": 504","time":"2020-03-04T17:10:15.742Z","v":0}
{"name":"parsoid","hostname":"testwiki.wiki.internal","pid":366,"level":40,"logType":"warn/api/esockettimedout","wiki":"wiki$0","title":"Main Page","oldId":null,"reqId":"ec9
b8270-5e3a-11ea-8c8f-6dbf654cd342","userAgent":"VisualEditor-MediaWiki/1.35.0-alpha","msg":"Failed API request, {\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\
"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","levelPath":"warn/api/esockett
imedout","time":"2020-03-04T17:10:15.978Z","v":0}Unfortunately our wikis are private, so I can't provide access, but the issue is easily reproduceable.
Configuring only VE, LabeledSectionTransclusion and SMW is enough to reproduce, enabling or disabling SMW turns the issue on or off respectively.
