On this and many similar pages with a category cleanup template, the template's background goes behind much of the captions interface: https://commons.wikimedia.org/wiki/File:1st_St_from_Oak_St,_Port_Angeles,_1914_(CURTIS_71).jpeg
Description
Details
Related Objects
- Mentioned In
- T332485: JavaScript console error: "Error: View mediainfoview does not exist"
rEWBIef296a42b550: Don't add mw:mediainfoView on File pages with no captions either
rEWBI0a29a7d02248: Don't add mw:mediainfoView on File pages with no captions either
rEWBI1575c555de93: Don't add mw:mediainfoView on File pages with no captions either
T214607: Summary header vanishes when a file doesn't have any captions entered
rEWBI3eb31ab18f44: Don't add mw:mediainfoView on File pages with no captions either
Event Timeline
Yeah, this should have been fixed by me last week, but for some reason the HTML structure of with-captions and without-captions differs so the selector didn't cover both. I'll fix the DOM.
Change 485084 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikibaseMediaInfo@master] Don't add mw:mediainfoView on File pages with no captions either
Change 485084 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Don't add mw:mediainfoView on File pages with no captions either
Change 486344 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.33.0-wmf.14] Don't add mw:mediainfoView on File pages with no captions either
Change 486344 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.33.0-wmf.14] Don't add mw:mediainfoView on File pages with no captions either
Mentioned in SAL (#wikimedia-operations) [2019-01-24T19:32:06Z] <jforrester@deploy1001> Synchronized php-1.33.0-wmf.14/extensions/WikibaseMediaInfo/src/WikibaseMediaInfoHooks.php: SWAT T213885 Don't add mw:mediainfoView on File pages with no captions either (duration: 00m 51s)
Update: I brought this code forward but it didn't work, and I'm trying to work out why.
I still can't work out quite why the output from the PHP is not correct in these cases, even following a purge or a real edit. In the mean time you can use the following code in your user script code to fix it for you, but this isn't a scalable solution, obviously:
var entityView = $( document ).find( '.wbmi-entityview' ); if ( entityView[ 0 ].parentNode.outerHTML.match( 'mw:mediainfoview' ).length ) { $( '.mw-slot-header' ).after( entityView.clone( true ) ); entityView[ 0 ].parentNode.remove(); }
@Jdforrester-WMF I don't really know this stuff, but could it be a problem that you are calling getMediaInfoViewRegex before you've defined it?
Sadly, no, that code file is loaded in one go before processing. The subsequent operations to name the slot clearly take place (otherwise it'd say <mw:mediainfoslotheader /> rather than "Structured data".
Is this "<mw:mediainfoview>" even needed for anything at this point? What is it? Can't you remove it entirely for now?
Patches to re-write the entirety of how MediaWiki works are welcome, but out of scope.
Eurgh. One hot-deploy (on a Saturday night!) later for a stupid bug fix, and it's resolved:
Template div with a table |
---|
Heading |
Paragraph |
Sorry for the disruption, all.
Tested in production with adding captions and Babel default language display. Still works as JamesF's screenshot above shows.
Not sure this ticket is the best place to report, but after searching about "mediainfoview", this talk page archive led me here.
I'm encountering a JavaScript error on file description pages:
Error: View mediainfoview does not exist
Tested on Chrome and Firefox, logged in and logged out.
Also, in Preferences > Appearance I unchecked "Show labels, aliases and descriptions in all my languages on page load" to test, but after saving the preferences, the checkbox becomes checked again…