devitor
Forum Replies Created
-
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
orH3
- 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 ]
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 ]
For the latest JSON I sent above I removed the images and the story still errors out.
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.
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 ]
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.
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.
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
403 – authorization. Would that be a permissions issue?
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.
Using the first JSON…
Component 1 is the header image? 2 is container, 3 is title … And so on?
So, component 1 is the first component that appears in the JSON and 28 is the 28th one down the stack?
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 ]
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.
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….
https://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:
https://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.
- A story should not begin with a subhead such as