Title: INVALID DOCUMENT Errors &#8211; Invalid URL and Null / Empty Text String
Last modified: September 1, 2016

---

# INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String

 *  Resolved [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 * Two of my articles are throwing invalid document errors. I’ll report on the first
   one here, then reply on the second one since I have to do full JSON dumps. I 
   can’t use News Preview since it’s only available on MacOS:
 * [http://us4palin.com/palin-trump-highlights-june-3-2016/](http://us4palin.com/palin-trump-highlights-june-3-2016/)
 * _[ redacted ]_
 * [https://wordpress.org/plugins/publish-to-apple-news/](https://wordpress.org/plugins/publish-to-apple-news/)

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

1 [2](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/?output_format=md)

 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567379)
 * Second article is throwing four Invalid Document Errors. How do you identify 
   a specific component – i.e. Components 28 and 30 which are referenced in the 
   debug?
 * [http://us4palin.com/palin-trump-highlights-june-24-2016/](http://us4palin.com/palin-trump-highlights-june-24-2016/)
 * _[ redacted ]_
 *  Plugin Author [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * (@potatomaster)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567501)
 * Components are numbered in order.
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567511)
 * So, component 1 is the first component that appears in the JSON and 28 is the
   28th one down the stack?
 *  Plugin Author [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * (@potatomaster)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567513)
 * Yes it should be.
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567516)
 * Using the first JSON…
 * Component 1 is the header image? 2 is container, 3 is title … And so on?
 *  Plugin Author [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * (@potatomaster)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567571)
 * Yes should be the case.
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567572)
 * Good morning Bradford,
 * The first JSON – components 1 and 15. If 1 is the header image, it loads and 
   displays without issue. I also tested every URL in both the web published story
   and the JSON. All URLs open.
 * I failed to mention – these two stories were loaded with the version of the plugin
   just prior to the most recent one.
 * Moving to the null text JSON which affects components 1, 28, and 30… Also a header
   image – which loads fine.
 * What the two header/featured images have in common is that they are portrait 
   type images, not a 16:9 aspect ratio.
 * Could the image aspect be causing the errors? I really don’t know what else to
   conclude. The URLs are good; I have no strange / non-standard characters; I got
   rid of emojis in both articles.
 *  Plugin Author [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * (@potatomaster)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567573)
 * I ran your JSON through the News Preview tool and this is your issue:
 *     ```
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/05/memory-of-the-fallen.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/05/memory-of-the-fallen.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/04/trump-train-new.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/04/trump-train-new.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/05/willow-palin-5-29-2016.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/05/willow-palin-5-29-2016.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2014/03/5822.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2014/03/5822.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/05/sarah_palin_r900x493.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/05/sarah_palin_r900x493.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/dakota-bristol-6-3-2016.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/06/dakota-bristol-6-3-2016.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/bristol-dakota-6-3-2016.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/06/bristol-dakota-6-3-2016.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/politicon-2016-palin.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/06/politicon-2016-palin.jpg
   
       Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/05/0526-sarah-palin-court-judge-fun-art-getty-4.jpg]. Server returned HTTP response code: 403 for URL: http://us4palin.com/wp-content/uploads/2016/05/0526-sarah-palin-court-judge-fun-art-getty-4.jpg
       ```
   
 * Your web host is returning 403s instead of 200s when Apple News tries to retrieve
   the images. If you can get that fixed, you should be all set.
 * Thanks.
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567575)
 * 403 – authorization. Would that be a permissions issue?
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567579)
 * All the images – including in the working posts are set 0644. All these are publicly
   readable – all open. Why would they cause a 403?
 * I don’t know if this affects anything, but in your readme you say,
 * >  ” If you encounter errors, you may need to modify the permissions of both 
   > the “./apple-export/workspace” and the “./apple-export/workspace/tmp” directories.
   > In most cases, setting permissions for these two directories to “775” will 
   > enable plugins to function properly.”
 * Those directories don’t exist at all inside the plugin. The closest I have is:
 * ./publish-to-apple-news/includes/apple-exporter
 * then two directories – builders and components – hang off it.
 * The directories are 0755 – content 0644
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567593)
 * Bradford,
 * `Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/
   sarah-palin-san-diego-1-ce2.jpg]. Server returned HTTP response code: 403 for
   URL: http://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.
   jpg`
 * Look at the URL in brackets…..
 * `Error: Unable to process URI [http://us4palin.com/wp-content/uploads/2016/06/
   sarah-palin-san-diego-1-ce2.jpg].`
 * That closing bracket is part of the hyperlink. That’s causing a page not found.
 * The actual URL is fine.
 * Looking at the JSON file again – I don’t see evidence of the ] being included
   as part of the URL.
 * I hope Apple releases that preview tool for other OSs soon.
 *  Plugin Author [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * (@potatomaster)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567622)
 * The bracket isn’t part of the hyperlink that the API is using.
 * Have you tried turning off remote images to see if that works better for you?
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567624)
 * Good afternoon Bradford.
 * Yes I tried remote images on and off. No difference.
 * What I’ll do when I get back later is copy the first post to a text editor, then
   remove all the image HTML from the live post and set a new featured image. Then
   I’ll attempt to publish. If that works, then I’ll re-insert one image via WordPress(
   not my hand-coded HTML) and update. If that works, I’ll re-insert the remainder
   via WordPress and update – purging cache and CDN of course each time.
 * Then I’ll swing to the second post and do the same if that works out on the first
   one.
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567626)
 * Re-setting the featured image and removing all the post images got rid of one
   error, leaving 14…
 *     ```
       [body] => {"errors":[{"code":"INVALID_DOCUMENT","keyPath":["components",1,"components",14],"value":"","message":"Invalid URL: "}]}
       ```
   
 * Here is the current JSON for the June 3 story. If I remove all the links, and
   it still fails, the story ID is probably shot and I’ll have to let it go.
 * _[ redacted ]_
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/#post-7567627)
 * The June 24 JSON is repaired and correct. Replacing the hand-codes and loading
   a new featured image resolved the problem with that file.
 * If you can run the June 3 JSON above through News Preview – that with a new featured
   image and no post images and see what errors are thrown, I’d appreciate much.

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

1 [2](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/?output_format=md)

The topic ‘INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String’ 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/)

## Tags

 * [Invalid Document](https://wordpress.org/support/topic-tag/invalid-document/)

 * 22 replies
 * 2 participants
 * Last reply from: [Bradford Campeau-Laurion](https://wordpress.org/support/users/potatomaster/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/#post-7567681)
 * Status: resolved