Jump to content

Topic on Project:Support desk/Flow

What could trigger MediaWiki:Session_fail_preview?

3
Deletedaccount4567435 (talkcontribs)

What could trigger MediaWiki:Session_fail_preview?

My wiki got such notice sooo frequently, almost everyone saw such waring:"Sorry! We could not process your edit due to a loss of session data. Please try again. If it still does not work, try logging out and logging back in."

Florianschmidtwelzow (talkcontribs)

This message shows, when some submitted data is empty or does not match with the expected. So, if the submitted edit token while uploading does not match with the saved, the error message will appear: https://github.com/wikimedia/mediawiki-core/blob/4ae146bf3753d6c8b4f64e74a2d8ac67b0b0b7fc/includes/specials/SpecialUpload.php#L124

On edit the error will appear, if the token isn't ok and the text submitted isn't empty: https://github.com/wikimedia/mediawiki-core/blob/02e0261b6eb2b1ff23274a26942f471440cea217/includes/EditPage.php#L3457

Most of the time, this is because of an ended session, maybe because of time between start an edit section and save/end this :)

Deletedaccount4567435 (talkcontribs)

Thank you Florianschmidtwelzow. I solved this problem by $wgSessionsInObjectCache = true; and set APC size to 2G.

Reply to "What could trigger MediaWiki:Session_fail_preview?"