mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 00:40:12 +00:00
df1a45b84c
This is what happens: * The issue happens only on pages with two <ref> tags than share the same name and group, but have conflicting text. * This triggers a code path that renders an error message and calls Message::plain() as well as Parser::addTrackingCategory(), which calls Message::text(). * The Message class is asking for a new, fresh parser. This means the parser is cloned and it's state cleared, while keeping stuff like parser hooks. * Cloning the parser triggers the ParserCloned hook. * The hook handler clones the Cite instance stored in Parser::$extCite. * PHP doesn't do deep cloning. Object properties are not cloned. * Since I091a0b7 the internal state of the Cite class is extracted to another class. * This means the state is not cloned any more since I091a0b7. * Now two Cite instances share the same state. * At the end of the hook handler, the state is cleared, which also clears the state of the original instance. We will most probably solve this on master by getting rid of cloning Cite. We propose this additional hotfix for the branch. Bug: T240248 Change-Id: Ic5a438e04d003a637ae08aae936d9977cc90d5d3 |
||
---|---|---|
.phan | ||
i18n | ||
modules | ||
src | ||
tests | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
AUTHORS.txt | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING.txt | ||
extension.json | ||
Gruntfile.js | ||
MIT-LICENSE.txt | ||
package-lock.json | ||
package.json | ||
README.md |
Cite
The Cite extension provides a way for users to create references as footnotes to articles.
See https://www.mediawiki.org/wiki/Extension:Cite for detailed documentation.