Title: devitor's Replies | WordPress.org

---

# devitor

  [  ](https://wordpress.org/support/users/devitor/)

 *   [Profile](https://wordpress.org/support/users/devitor/)
 *   [Topics Started](https://wordpress.org/support/users/devitor/topics/)
 *   [Replies Created](https://wordpress.org/support/users/devitor/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/devitor/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/devitor/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/devitor/engagements/)
 *   [Favorites](https://wordpress.org/support/users/devitor/favorites/)

 Search replies:

## Forum Replies Created

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

1 [2](https://wordpress.org/support/users/devitor/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/devitor/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/devitor/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  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/page/2/#post-7567680)
 * Good evening, Bradford.
 * The June 3 story is now resolved, which means all outstanding issues are resolved.
   This story had hard `<p></p>` tags at each paragraph.
 * Additionally one URL – not an image – a link – was two sentences and a paragraph
   was entered, with the second line having the closing `</a>` tag and no closing
   tag on the first line.
 * Removing the P tags and making the link one sentence with the closing tag properly
   located solved the issue.
 * While working another post that also threw invalid document errors at first (
   now corrected and no longer an issue), I discovered the following:
    - A story should not begin with a subhead such as `H2` or `H3`
    - Apple News does not like WordPress captioned images.
    - YouTube oEmbeds should be the new short URL format.
 * Captioned images and the old style YouTube URLs will throw invalid document errors.
 * Returning to this post – the same featured image you said threw a 403 is in the
   corrected live post on Apple News.
 * Thank you for taking the time to work with me on this and lead me to ultimately
   resolve it.
 * Here is the JSON for the story in its correct published state:
 * _[ Five hundred and eighty eight lines redacted ]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/#post-7567672)
 * The same four *invalid document* errors come up even with all the images removed….
   The story is live on the site with the images (inserted via WordPress), but the
   JSON below was generated with only a new featured image.
 * This is the only story I’m having trouble with now. Everything else is working
   perfectly.
 * _[ redacted ]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/page/2/#post-7567670)
 * For the latest JSON I sent above I removed the images and the story still errors
   out.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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 ]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String](https://wordpress.org/support/topic/invalid-document-errors-invalid-url-and-null-empty-text-string/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 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 ]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] Non-Featured Images Stripped from Posts / Facebook Posts stripped](https://wordpress.org/support/topic/non-featured-images-stripped-from-posts-facebook-posts-stripped/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/non-featured-images-stripped-from-posts-facebook-posts-stripped/#post-7560962)
 * Per my conversation with MaxCDN, the cache and CDN both need to be purged prior
   to sending content to Apple News. The image URL needs to be same – it does not
   matter if the both URLs work. The JSON can’t have one and the story the other.
 * I purged the cache and fixed all but two of my stories on the US for Palin channel.
   The other two are generating invalid document errors, which I’ll ask about on
   a fresh ticket.
 * The issue of stripped images is resolved: purge CDN and cache when they are present
   on a site.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Publish To Apple News] Non-Featured Images Stripped from Posts / Facebook Posts stripped](https://wordpress.org/support/topic/non-featured-images-stripped-from-posts-facebook-posts-stripped/)
 *  Thread Starter [devitor](https://wordpress.org/support/users/devitor/)
 * (@devitor)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/non-featured-images-stripped-from-posts-facebook-posts-stripped/#post-7560920)
 * OK, here’s a post where I got all the photos working except the last one (on 
   Apple News)….and I think I may have uncovered what is going on….
 * [http://us4palin.com/palin-highlights-july-1-2016/](http://us4palin.com/palin-highlights-july-1-2016/)
 * That’s the post. All the images load on the website and are verified good.
 * The image that fails to load in Apple News for this post today is:
 * [http://cdn2.us4palin.com/wp-content/uploads/2014/03/5822.jpg](http://cdn2.us4palin.com/wp-content/uploads/2014/03/5822.jpg)
 * Now for the JSON…I’m only going to put the code relevant to the image in question,
   rather than clog the thread with the entire JSON file….
 *     ```
       {"role":"photo","URL":"http:\/\/us4palin.com\/wp-content\/uploads\/2014\/03\/5822.jpg","layout":"anchor-layout-right","anchor":{"targetAnchorPosition":"center","rangeStart":0,"rangeLength":1,"targetComponentIdentifier":"component-49e172d42efabf81c777cb498c8bada9"}}
       ```
   
 * I’m using MaxCDN. The image file in the JSON is loaded directly on the server.
   The image file in the post is being delivered through the CDN.
 * Being that it goes through a CDN, the URL changes – breaking the URL that’s in
   the JSON.

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

1 [2](https://wordpress.org/support/users/devitor/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/devitor/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/devitor/replies/page/2/?output_format=md)