Title: INVALID DOCUMENT error.
Last modified: February 27, 2020

---

# INVALID DOCUMENT error.

 *  Resolved [agiddens1](https://wordpress.org/support/users/agiddens1/)
 * (@agiddens1)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/invalid-document-error-2/)
 * I’m getting an intermittent error when trying to post to Apple News.
 * Anyone have any idea what’s causing it and how to fix please?
 * There has been an error with the API: INVALID_DOCUMENT – The value for the property“
   URL” at line 1 and column 3237 is not valid: Stream & Watch:smarturl.it/frontinme
   Artist Connect: [http://www.instagram.com/harrynathan_www.facebook.com/harrynathanwww.soundcloud.com/harrynathanwww.twitter.com/harrynathan_](http://www.instagram.com/harrynathan_www.facebook.com/harrynathanwww.soundcloud.com/harrynathanwww.twitter.com/harrynathan_)
   Credits: Written, Produced & Performed by Harry Nathan Mixed & Produced by Harry
   Nathan & Preston J. Walker Mastering by Kevin Grainger Press Photos by Tal Hymans
   Music Video created by Harry Nathan, Odeya Rush, Ryan Lee & Christian Valderrama(
   keyPath components->1->components->7->URL)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [agiddens1](https://wordpress.org/support/users/agiddens1/)
 * (@agiddens1)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12486051)
 * Also this…
 * There has been an error with the API:
    INVALID_DOCUMENT – “text” was “” should
   be not (null or an empty string) (keyPath components->1->components->3->text)
   INVALID_DOCUMENT – “text” was “” should be not (null or an empty string) (keyPath
   components->1->components->4->text) INVALID_DOCUMENT – “text” was “” should be
   not (null or an empty string) (keyPath components->1->components->6->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->8->text) INVALID_DOCUMENT – “text” was “” should be not (null or 
   an empty string) (keyPath components->1->components->10->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->12->text) INVALID_DOCUMENT – “text” was “” should be not (null or
   an empty string) (keyPath components->1->components->14->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->16->text) INVALID_DOCUMENT – “text” was “” should be not (null or
   an empty string) (keyPath components->1->components->18->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->20->text) INVALID_DOCUMENT – “text” was “” should be not (null or
   an empty string) (keyPath components->1->components->22->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->24->text) INVALID_DOCUMENT – “text” was “” should be not (null or
   an empty string) (keyPath components->1->components->26->text) INVALID_DOCUMENT–“
   text” was “” should be not (null or an empty string) (keyPath components->1->
   components->28->text) INVALID_DOCUMENT – “text” was “” should be not (null or
   an empty string) (keyPath components->1->components->30->text)
 *  [liamodowd](https://wordpress.org/support/users/liamodowd/)
 * (@liamodowd)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12503917)
 * I’m also getting a series of errors similar to this:
 * There has been an error with the API: INVALID_DOCUMENT – “text” was “” should
   be not (null or an empty string) (keyPath components->1->components->11->text)
 * But strangely only for one category, the other category has published fine?
 *  [PPNSteve](https://wordpress.org/support/users/ppnsteve/)
 * (@ppnsteve)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12534601)
 * Seeing this error as well..
 * > There has been an error with the API: INVALID_DOCUMENT – The value for the 
   > property “URL” at line 1 and column #### is not valid:
 * even on NON-LINKED urls
 * something isn’t parsing correctly or it is just bork.
 *  Thread Starter [agiddens1](https://wordpress.org/support/users/agiddens1/)
 * (@agiddens1)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12610562)
 * Is there any news from the devs on when this will be fixed? Even after todays
   new version the issue remains.
 *  [dadekian](https://wordpress.org/support/users/dadekian/)
 * (@dadekian)
 * [6 years ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12859122)
 * I’m also getting this error and can’t see what’s wrong with any of the links.
 * There has been an error with the API: INVALID_DOCUMENT – The value for the property“
   URL” at line 1 and column XXXX is not valid
 *  [agk4444](https://wordpress.org/support/users/agk4444/)
 * (@agk4444)
 * [6 years ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12896842)
 * From what I can tell this line is the culprit.
 * “const FACEBOOK_MATCH = ‘/(?:https?:\/\/)?(?:www\.)?(?:facebook|fb|m\.facebook)\.(?:
   com|me)\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-\.]+)(?:\/)?/i’;” @ 
   [https://github.com/alleyinteractive/apple-news/blob/6f0b4eb1a99394eae6871b1b3069efe4fe1e40a9/includes/apple-exporter/components/class-facebook.php#L27](https://github.com/alleyinteractive/apple-news/blob/6f0b4eb1a99394eae6871b1b3069efe4fe1e40a9/includes/apple-exporter/components/class-facebook.php#L27)
 * It is assuming even regular Facebook links as facebook_post component and creating
   the errors. Any suggestion of how to suppress this would be helpful.
 *  [movablebeast](https://wordpress.org/support/users/movablebeast/)
 * (@movablebeast)
 * [6 years ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12948357)
 * I’m seeing the same problem, and you’re right — I think it is somehow confusing
   what should be body text with a Facebook post! Here’s what I see on a news article
   that parsed properly:
 * `{"role":"body","text":"<p><strong>Press Contact:<\/strong><br \/>\nName:`
 * and one that didn’t parse properly:
 * `{"role":"facebook_post","URL":"Press Contact:\nName:`
 * Could we get this fixed, please?
 * Steve
 *  [movablebeast](https://wordpress.org/support/users/movablebeast/)
 * (@movablebeast)
 * [6 years ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12948366)
 * One more comment: My posts include a link to Facebook, and if I remove that link,
   the article publishes to Apple News properly. Put it back in, I get the error…
 * Steve
 *  [movablebeast](https://wordpress.org/support/users/movablebeast/)
 * (@movablebeast)
 * [6 years ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-12948391)
 * And for agiddens1, I do have a workaround for you on the INVALID DOCUMENT bug;
   I found that if there are ANY blank lines at the end of the post being sent to
   Apple News, you get this error. Go into your original post and remove all blank
   lines at the end, and the error should resolve itself.
 * Now, if we could just get a fix for this Facebook URL problem…
 *  Plugin Author [Kevin Fodness](https://wordpress.org/support/users/kevinfodness/)
 * (@kevinfodness)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-13494938)
 * We just released version 2.1.0 which contains a fix for the empty paragraph bug
   in its many forms. If you’re still experiencing that issue on the new version,
   please open a new support request, as there may have been a particular trigger
   that we’ve missed. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘INVALID DOCUMENT error.’ is closed to new replies.

 * ![](https://ps.w.org/publish-to-apple-news/assets/icon-256x256.png?rev=3017580)
 * [Publish To Apple News](https://wordpress.org/plugins/publish-to-apple-news/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/publish-to-apple-news/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/publish-to-apple-news/)
 * [Active Topics](https://wordpress.org/support/plugin/publish-to-apple-news/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/publish-to-apple-news/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/publish-to-apple-news/reviews/)

 * 10 replies
 * 7 participants
 * Last reply from: [Kevin Fodness](https://wordpress.org/support/users/kevinfodness/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/invalid-document-error-2/#post-13494938)
 * Status: resolved