• Resolved etellewyn

    (@etellewyn)


    Hi, Sorry to have yet another “what’s wrong with my article” support topic, but I have looked all through this article and can’t find the offending URL. And the error code doesn’t give me much help since I am not sure what “component 86” might be.

    The error is “There has been an error with the API: INVALID_DOCUMENT – Invalid URL: (keyPath components->1->components->86)”

    Here is the JSON https://pastebin.com/NqEvmF8Q
    Here is the HTML https://pastebin.com/cvRLXQhv

    Appreciate your help. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kevin Fodness

    (@kevinfodness)

    Hi @etellewyn

    I apologize for the delay in response. The issue is with the very end of the last paragraph of content, which has an empty link in the generated JSON: humility. []()

    It appears that the link parser is choking on the empty a name tag and trying to match more than it should: <a name="dan"></a>

    We’ve already got an issue open on GitHub to address empty URLs: https://github.com/alleyinteractive/apple-news/issues/350

    I’ve added a note to it to address the greedy anchor matching. However, in HTML5, the preferred way for achieving this effect is by applying an id attribute to the element you want to be able to jump to rather than a named anchor: https://w3c.github.io/html/browsers.html#navigating-to-a-fragment-identifier

    So, the conclusion is that this is a bug in the plugin that we will address in a future release, but in the interim you can resolve this by switching to id attributes rather than empty a name tags.

    Thread Starter etellewyn

    (@etellewyn)

    Hi Thanks so much for explaining the cause of this issue. We will switch to using id attributes instead of names from now on, hopefully this will solve the problem.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘INVALID_DOCUMENT – Invalid URL’ is closed to new replies.