Page MenuHomePhabricator

[Javascript bug]: Some image descriptions (class mv-mmv-author) show "[object Object]"
Closed, ResolvedPublic

Description

see screenshot and DOM/Firebug:

<img src="https://i.imgur.com/rsafvCX.png">


Version: master
Severity: normal

Details

Reference
bz66564

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:24 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz66564.
bzimport added a subscriber: Unknown Object (MLST).
Tgr added a comment.Jun 13 2014, 7:31 PM

Do you have a live test case? If not, can you share the response from api.php?format=jsonfm&action=query&prop=imageinfo&iiprop=extmetadata&titles=<filename> ?

The problem is still present in version 0aab988 (10.07.2014).

I am now going to try the api.php?format=jsonfm&action=query&prop=imageinfo&iiprop=extmetadata&titles=<filename> call.

(In reply to Tisza Gergő from comment #1)

Do you have a live test case?

No

If not, can you share the response from
api.
php?format=jsonfm&action=query&prop=imageinfo&iiprop=extmetadata&titles=<file
name> ?

Yes please:

{

"query": {
    "pages": {
        "-1": {
            "ns": 0,
            "title": "Greensmoothie1.jpg",
            "missing": ""
        }
    }
}

}

This image results in

[object Object] [object Object]

on the MMV page.

Tgr added a comment.Jul 11 2014, 12:24 AM

Could you paste the API response again, with "File:" included on the file name? i.e.

api.php?format=jsonfm&action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Greensmoothie1.jpg

{

"query": {
    "pages": {
        "15668": {
            "pageid": 15668,
            "ns": 6,
            "title": "File:Greensmoothie1.jpg",
            "imagerepository": "local",
            "imageinfo": [
                {
                    "extmetadata": {
                        "DateTime": {
                            "value": "2014-05-26T17:09:14Z",
                            "source": "mediawiki-metadata",
                            "hidden": ""
                        },
                        "ObjectName": {
                            "value": {
                                "_": "160592163"
                            },
                            "source": "file-metadata",
                            "hidden": ""
                        },
                        "iimVersion": {
                            "value": 2,
                            "source": "file-metadata",
                            "hidden": ""
                        },
                        "Source": {
                            "value": {
                                "_": "iStockphoto"
                            },
                            "source": "file-metadata",
                            "hidden": ""
                        },
                        "Artist": {
                            "value": {
                                "_": "pilipphoto"
                            },
                            "source": "file-metadata"
                        },
                        "SpecialInstructions": {
                            "value": {
                                "_": "NR"
                            },
                            "source": "file-metadata",
                            "hidden": ""
                        },
                        "Credit": {
                            "value": {
                                "_": "Getty Images/iStockphoto"
                            },
                            "source": "file-metadata",
                            "hidden": ""
                        },
                        "ImageDescription": {
                            "value": {
                                "_": "Healthy green smoothie"
                            },
                            "source": "file-metadata"
                        }
                    }
                }
            ]
        }
    }
}

}

Tgr added a comment.Jul 11 2014, 7:27 AM

Thanks! The expected format would be

"Artist": {
    "value": "pilipphoto",
    "source": "file-metadata"
}

so something weird must be going on with the EXIF data. Could you share the image?

Tgr closed this task as Resolved.Nov 25 2014, 10:53 PM
Tgr claimed this task.

Should be fixed now, see T73135.

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 2 2014, 8:57 AM