Comments (6)
See https://phabricator.wikimedia.org/T321234
Closing, as this very same error happens without JsCalendar.
from mediawiki-extension-jscalendar.
Not reproduced locally. Might be caused by one of the pages in the wiki having incorrect UTF-8 on it.
The error mentioned on https://phabricator.miraheze.org/T9688 is happening in MediaWiki parser (not in the JsCalendar code):
preg_match_all error 4: Malformed UTF-8 characters, possibly incorrectly encoded
from /srv/mediawiki/w/includes/MagicWordArray.php(319)
#0 /srv/mediawiki/w/includes/parser/Parser.php(4116): MagicWordArray->matchAndRemove(string)
#1 /srv/mediawiki/w/includes/parser/Parser.php(1636): Parser->handleDoubleUnderscore(string)
#2 /srv/mediawiki/w/includes/parser/Parser.php(882): Parser->internalParse(string, boolean, boolean)
#3 /srv/mediawiki/w/includes/parser/Parser.php(906): Parser->recursiveTagParse(string, boolean)
#4 /srv/mediawiki/w/extensions/JsCalendar/includes/EventCalendar.php(192): Parser->recursiveTagParseFully(string)
...
It's theoretically possible that the page had incorrect UTF-8 on it (JsCalendar passes contents of the page to MediaWiki parser),
but per what I see in the Phabricator, your page only had the word "Test" on it and nothing else (so it can't be incorrect UTF-8).
JsCalendar doesn't do any transformations to the "contents of the page" string before passing it to Parser. It's not truncated, not wrapped, not encoded, etc. JsCalendar takes the page text directly from the database and gives it to Parser.
from mediawiki-extension-jscalendar.
FWIW, to reiterate what i said on the other bug, I do not believe that this issue is the same as https://phabricator.wikimedia.org/T321234. https://phabricator.wikimedia.org/T321234 is about old non-utf8 valid data that for some reason was not normalized properly. Any page that this is happening on that is less than 15 years old, probably has a different cause (May or may not be this extensions fault, I'm not familiar with this extensions code. Could be some other issue at miraheze)
from mediawiki-extension-jscalendar.
It may quite possibly be the fault of code at https://github.com/edwardspec/mediawiki-extension-JsCalendar/blob/master/includes/FindEventPagesQuery.php#L188 - this is not processing the old_flags field properly, which could result in the exception described depending on the wikis config (Processing old_flags properly is really hard, I would generally recommend using MW core's various classes to get page text instead if at all possible)
from mediawiki-extension-jscalendar.
this is not processing the old_flags field properly
Thank you.
Turns out, Miraheze had $wgCompressRevisions = true;
, that's why it's not working. All revisions are compressed.
https://github.com/miraheze/mw-config/blob/7b230dd2072bb2361b099adba3ba17b9edcdaf33/Database.php
I would generally recommend using MW core's various classes to get page text instead
Will investigate. This seems to be handled in SqlBlobStore::expandBlob()
, can also be done via SqlBlobStore::getBlobBatch()
.
from mediawiki-extension-jscalendar.
Should be working now.
from mediawiki-extension-jscalendar.
Related Issues (7)
- Provide iCal endpoint HOT 3
- Allow localisation of the extension interface messages HOT 4
- aspectratio does not work out of the box HOT 3
- New feature: allow titleRegex to retrieve end date of multiday events if that date is in their title HOT 5
- Bug: multi-day events are not displayed correctly - last day is missing HOT 3
- Calendar doesn't work with Extension:Lingo HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediawiki-extension-jscalendar.