• Resolved tavalex

    (@tavalex)


    Hi,

    I’m still having issues after updating to the latest version of the plugin.
    I use the new “Remote Images” setting.

    The json file debugs fine in the New Preview tool, but :

    I get an error message in the wp-admin :
    There has been an error with the API. Please make sure your API settings are correct and try again: INVALID_DOCUMENT

    and the following debugging paragraph via email :
    [body] => {"errors":[{"code":"INVALID_DOCUMENT","keyPath":["root","metadata","thumbnailURL"],"message":"Unable to determine mime type of URL [http://www.messynessychic.com/wp-content/uploads/2016/05/streetcar-1.jpg]"}]}

    Any help on solving this issue would be greatly appreciated.

    Thanks in advance,
    Alexandre

    https://ww.wp.xz.cn/plugins/publish-to-apple-news/

Viewing 15 replies - 1 through 15 (of 17 total)
  • mkummer

    (@mkummer)

    I’m having a similar issue. News Preview works but publishing through plugin fails with INVALID_DOCUMENT error.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    mkummer,

    Sounds like you solved the issue here: https://ww.wp.xz.cn/support/topic/the-attachment-xxx-could-not-be-included-in-the-request-because?replies=9#post-8414096

    tavalex ,

    Can you check if you might be having a similar issue with your hosting configuration?

    Thanks.

    mkummer

    (@mkummer)

    No, this is a new issue. In my old thread the JSON file couldn’t be previewed in News Preview. Now the preview works but publishing still doesn’t.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    I’ve reached out to Apple support on your behalf.

    amfmstudios

    (@amfmstudios)

    Hi Bradford, I’ve already posted in another thread. Now I’m getting this error instead of the other one for http://amfm-magazine.com

    There has been an error with the API. Please make sure your API settings are correct and try again: INVALID_DOCUMENT, INVALID_DOCUMENT

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Please download the News Preview tool from Apple and use that to troubleshoot further. It will tell you the specific markup that is invalid. If you still need assistance after that please let us know.

    mkummer

    (@mkummer)

    The Preview tool doesn’t show any error messages in my case. Only a warning for some JSON files but the article renders otherwise fine (without the images as discussed in the other thread).

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    What are the warnings that you’re seeing?

    mkummer

    (@mkummer)

    Warning: Anchor with targetComponentIdentifier [TextComponent-9] is out of range. Range has been removed.
    document

    It’s always the same warning, just the X in TextComponent-X is different based on the article.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Can all the folks in this thread that still need support please download and post the JSON files for the affected post(s) here?

    Thanks!

    Thread Starter tavalex

    (@tavalex)

    You’ll find the info from the other thread below.

    Here is what the preview too console is saying :

    Warning: Anchor with targetComponentIdentifier [TextComponent-3] is out of range. Range has been removed.
    document

    JSON File here : http://www.messynessychic.com/article.json

    Live article here : http://www.messynessychic.com/2016/05/17/climb-inside-the-hotel-rooms-hanging-off-a-cliff/

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    tavalex,

    Is this JSON file also encountering the error at the very beginning of this thread when you try to push it to the API?

    Thanks.

    Thread Starter tavalex

    (@tavalex)

    Ok, to clarify things I’ll do it with our latest article.

    Live article URL : http://www.messynessychic.com/2016/05/19/stop-everything-and-check-out-these-tiny-fairytale-book-sculptures/

    Email debugging from the plugin :

    [body] => {"errors":[{"code":"INVALID_DOCUMENT","keyPath":["root","metadata","thumbnailURL"],"message":"Unable to determine mime type of URL [http://www.messynessychic.com/wp-content/uploads/2016/05/house-in-the-oak-tree.jpg]"}]}
    
        [response] => Array
    
            (
    
                [code] => 400
    
                [message] => Bad Request
    
            )

    Error message in wp-admin :
    There has been an error with the API. Please make sure your API settings are correct and try again: INVALID_DOCUMENT

    Error message in the news preview tool :

    Warning: Anchor with targetComponentIdentifier [TextComponent-5] is out of range. Range has been removed.
    document

    JSON file : http://www.messynessychic.com/article.json

    Hope that helps 🙂

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    If you’re having an issue with remote images, it’s because your host is using “Transfer-Encoding: chunked” to serve images. Apple News will support this method in the coming weeks, but until then, please do not use remote images and use the default bundled images instead.

    Thanks.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    In version 1.1.4, we’ve added additional logic for determining the file size for bundled images which may help you until the Apple News API supports chunked transfer encoding.

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘1.1.2 Problem : INVALID_DOCUMENT’ is closed to new replies.