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:
https://us4palin.com/palin-trump-highlights-june-3-2016/
[ redacted ]
-
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?
https://us4palin.com/palin-trump-highlights-june-24-2016/
[ redacted ]
Components are numbered in order.
So, component 1 is the first component that appears in the JSON and 28 is the 28th one down the stack?
Yes it should be.
Using the first JSON…
Component 1 is the header image? 2 is container, 3 is title … And so on?
Yes should be the case.
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.
I ran your JSON through the News Preview tool and this is your issue:
Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/05/memory-of-the-fallen.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/05/memory-of-the-fallen.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/04/trump-train-new.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/04/trump-train-new.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/05/willow-palin-5-29-2016.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/05/willow-palin-5-29-2016.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2014/03/5822.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2014/03/5822.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/05/sarah_palin_r900x493.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/05/sarah_palin_r900x493.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/06/dakota-bristol-6-3-2016.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/06/dakota-bristol-6-3-2016.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/06/bristol-dakota-6-3-2016.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/06/bristol-dakota-6-3-2016.jpg Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/06/politicon-2016-palin.jpg]. Server returned HTTP response code: 403 for URL: https://us4palin.com/wp-content/uploads/2016/06/politicon-2016-palin.jpg Error: Unable to process URI [https://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: https://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.
403 – authorization. Would that be a permissions issue?
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
Bradford,
Error: Unable to process URI [https://us4palin.com/wp-content/uploads/2016/06/sarah-palin-san-diego-1-ce2.jpg]. Server returned HTTP response code: 403 for URL: https://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 [https://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.
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?
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.
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 ]
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.
- The topic ‘INVALID DOCUMENT Errors – Invalid URL and Null / Empty Text String’ is closed to new replies.