Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Wiki.tetrain.com Runbook
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Phase 7 β YouTube video-embed restoration (exact β run in this session) == '''Problem''': <code><nowiki>HTML5video</nowiki></code> (dropped in Phase 5) was actually the extension embedding external YouTube videos, not <code><nowiki>TimedMediaHandler</nowiki></code>'s job (uploaded files only) β this broke 149 embeds across 44 pages. === 7.1 Install EmbedVideo === <pre> <nowiki> cd /var/www/wiki/extensions git clone https://github.com/StarCitizenTools/mediawiki-extensions-EmbedVideo.git EmbedVideo </nowiki> </pre> (Default branch β no <code><nowiki>REL1_43</nowiki></code> branch exists for this third-party extension; <code><nowiki>extension.json</nowiki></code> requires MediaWiki β₯1.29.0, satisfied.) === 7.2 Patch for MediaWiki 1.43's strict <code><nowiki>array</nowiki></code> typing === MediaWiki 1.43 core requires <code><nowiki>ParserOutput::addModules()</nowiki></code>/<code><nowiki>addModuleStyles()</nowiki></code> to receive an <code><nowiki>array</nowiki></code>, not a bare string. Exact diff applied (confirmed live via <code><nowiki>diff</nowiki></code> against the <code><nowiki>.bak</nowiki></code>): <pre> <nowiki> --- EmbedVideo.hooks.php.bak +++ EmbedVideo.hooks.php @@ -650,2 +650,2 @@ - $out->addModules('ext.embedVideo'); - $out->addModuleStyles('ext.embedVideo.styles'); + $out->addModules( [ 'ext.embedVideo' ] ); + $out->addModuleStyles( [ 'ext.embedVideo.styles' ] ); </nowiki> </pre> <pre> <nowiki> cp EmbedVideo/EmbedVideo.hooks.php EmbedVideo/EmbedVideo.hooks.php.bak sed -i "s/\$out->addModules('ext.embedVideo');/\$out->addModules( [ 'ext.embedVideo' ] );/" EmbedVideo/EmbedVideo.hooks.php sed -i "s/\$out->addModuleStyles('ext.embedVideo.styles');/\$out->addModuleStyles( [ 'ext.embedVideo.styles' ] );/" EmbedVideo/EmbedVideo.hooks.php </nowiki> </pre> Diagnosed by temporarily enabling <code><nowiki>$wgShowExceptionDetails = true;</nowiki></code> on a scratch test page, reverted immediately after confirming the fix. === 7.3 Load it === <pre> <nowiki> // add to LocalSettings.php, after the other wfLoadExtension() calls: wfLoadExtension( 'EmbedVideo' ); </nowiki> </pre> === 7.4 Fix content β per page, per video === For each of the 44 pages holding broken embeds: # Pull current wikitext: <code><nowiki>php maintenance/run.php getText.php "<full title, with namespace prefix>"</nowiki></code> β '''note''': most of these "pages" are actually <code><nowiki>Category:</nowiki></code>-namespace pages being used to hold real content (a pre-existing quirk of this wiki, not introduced here); a bare title without the <code><nowiki>Category:</nowiki></code> prefix resolves to "page does not exist." # Replace every <code><nowiki><HTML5video type="youtube" ...>VIDEO_ID</HTML5video></nowiki></code> with: <pre> <nowiki> {{#ev:youtube|VIDEO_ID|640}} '''Video summary:''' <written summary paragraph, sourced from the video's actual YouTube transcript> </nowiki> </pre> # Apply: <code><nowiki>php maintenance/run.php edit.php -s "<summary>" -u Admin -b --nocreate "<full title>" < newcontent.txt</nowiki></code> (content piped via stdin from a file, not passed as a shell argument β avoids quoting issues with apostrophes/backticks in the prose). '''Verify''': DB sweep for zero remaining <code><nowiki><HTML5video></nowiki></code> tags across all touched pages; confirm in a real browser that each embed renders as an actual <code><nowiki><iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID"></nowiki></code>, not just literal wikitext. Content-quality notes (not a server step, but part of "what was actually done"): summaries are based on real YouTube auto-caption transcripts. Where audio/ASR quality made a transcript unusable, the paragraph says so explicitly (<code><nowiki>[VERY POOR TRANSCRIPT QUALITY]</nowiki></code> / <code><nowiki>[PARTIAL TRANSCRIPT]</nowiki></code>) rather than fabricating detail. 5 of the 149 videos are flagged inaccessible (1 private, 4 removed by YouTube) and 2 are flagged as duplicate content β all noted directly in the published paragraph, not just in this log. ----
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)