Page MenuHomePhabricator

Call to a member function getAttribute() on null
Closed, ResolvedPublic3 Estimated Story Points

Description

{
    "class": "Error",
    "message": "Call to a member function getAttribute() on null",
    "code": 0,
    "file": "/var/www/tool/src/PageParser.php:177",
    "trace": [
        "/var/www/tool/src/BookProvider.php:114",
        "/var/www/tool/src/BookProvider.php:41",
        "/var/www/tool/src/BookCreator.php:42",
        "/var/www/tool/src/Controller/ExportController.php:130",
        "/var/www/tool/src/Controller/ExportController.php:90",
        "/var/www/tool/vendor/symfony/http-kernel/HttpKernel.php:157",
        "/var/www/tool/vendor/symfony/http-kernel/HttpKernel.php:79",
        "/var/www/tool/vendor/symfony/http-kernel/Kernel.php:196",
        "/var/www/tool/public/index.php:35"
    ]

Link: http://wsexport.wmflabs.org/tool/book.php?fonts=mukta-malar&format=epub-3&lang=ta&page=%E0%AE%AA%E0%AE%BE%E0%AE%B0%E0%AF%8D%E0%AE%A4%E0%AF%8D%E0%AE%A4%E0%AE%BF%E0%AE%AA%E0%AE%A9%E0%AF%8D%20%E0%AE%95%E0%AE%A9%E0%AE%B5%E0%AF%81

Event Timeline

ARamirez_WMF set the point value for this task to 3.Jan 22 2021, 12:24 AM
ARamirez_WMF moved this task from Needs Discussion to Up Next on the Community-Tech board.
Samwilson subscribed.

Looks like this happens when an image file doesn't exist:

<figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' id="mwBA"><a href="./Special:FilePath/ParthibanKanavu.jpg" id="mwBQ"><span resource="./படிமம்:ParthibanKanavu.jpg" data-width="220" id="mwBg">படிமம்:ParthibanKanavu.jpg</span></a><figcaption id="mwBw"><b id="mwCA">பார்த்திபன் கனவு</b></figcaption></figure>

We can fix this along with T272307: Wikisource Export: Not exporting image captions

ifried subscribed.

This fix is now on production, and I cannot reproduce the original bug with the link provided in the description. I'm marking this ticket as Done.