You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using epubCheck version 4.2.6, I am getting the following warning randomly
WARNING(OPF-018): .\output\kit.epub:OEBPS/isbn-9780190064617-front-matter-part-4.xhtml (19,19): The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found.
Most of the lines (not all) where epubCheck is reporting the error usually has an HTML list (ul or ol) tag which I don’t believe has anything to do with remote-resources properties.
All the XHTML documents in the epub package has a javascript (<script src="scripts/analyticsCreator.js" type="text/javascript"></script>) which adds another external script to the page, therefore we declared the ‘remote-resources’ properties for all XHTML pages in the OPF file.
As I’ve said above, every page has the same scripts but only handful (most of the time with HTML list tag) are being flagged with the “OPF-018” warning which makes me wonder whether this is epubCheck bug rather than an issue with my epub package.
Epubcheck can't test what happens at runtime so as far as it can detect you don't have any remote resources references in the document. That's why it's warning you that applying the label appears to be incorrect.
I can't answer why it would report the issue in the file when it's the declaration in the package document that's at issue. I'm sure @rdeltour can speak to that.
But just note that what you're doing is technically invalid per the specification. You can't reference remote scripts for security reasons, so while writing the script tag dynamically might get you past epubcheck, it's still likely the script will be blocked by reading systems. They don't even all retrieve remote resources you're allowed to reference.
@mattgarrish, many thanks for you reply. I think what I can't get my head around is that the “OPF-018” warning only flags a handful XHTML files whilst every single one of them in my epub has the same script. “OPF-018” flags the file as many times as there are HTML list (ul or ol) tags in the documents.
The invalidity around the remote script is a compromise we had to make because our final epub files are intended for specifically tested platforms that we know will allow the remotely hosted script.
I think what I can't get my head around is that the “OPF-018” warning only flags a handful XHTML files whilst every single one of them in my epub has the same script. “OPF-018” flags the file as many times as there are HTML list (ul or ol) tags in the documents.
Could it be that theses files just happen to be the same files containing other remote resources that EPUBCheck does detect?
If you can share a sample here (privately is possible too: email me at rdeltour, Gmail), I can have a closer look 😊
@rdeltour, thanks for your help in advance. I have just sent you a sample file via the email address you mentioned above. let me know if you don't received it.
* `OPF-018` is reported even when the content document contains scripting (in which case, only the `USAGE`-level `OPF-018b` message should be reported)
* the error location is unrelated to the actual error
Activity
mattgarrish commentedon Jun 2, 2022
Epubcheck can't test what happens at runtime so as far as it can detect you don't have any remote resources references in the document. That's why it's warning you that applying the label appears to be incorrect.
I can't answer why it would report the issue in the file when it's the declaration in the package document that's at issue. I'm sure @rdeltour can speak to that.
But just note that what you're doing is technically invalid per the specification. You can't reference remote scripts for security reasons, so while writing the script tag dynamically might get you past epubcheck, it's still likely the script will be blocked by reading systems. They don't even all retrieve remote resources you're allowed to reference.
siddoib commentedon Jun 6, 2022
@mattgarrish, many thanks for you reply. I think what I can't get my head around is that the “OPF-018” warning only flags a handful XHTML files whilst every single one of them in my epub has the same script. “OPF-018” flags the file as many times as there are HTML list (ul or ol) tags in the documents.
The invalidity around the remote script is a compromise we had to make because our final epub files are intended for specifically tested platforms that we know will allow the remotely hosted script.
rdeltour commentedon Jun 6, 2022
Could it be that theses files just happen to be the same files containing other remote resources that EPUBCheck does detect?
If you can share a sample here (privately is possible too: email me at rdeltour, Gmail), I can have a closer look 😊
siddoib commentedon Jun 6, 2022
@rdeltour, thanks for your help in advance. I have just sent you a sample file via the email address you mentioned above. let me know if you don't received it.
rdeltour commentedon Jun 20, 2022
Thanks @siddoib for the test case.
Something is apparently wrong with EPUBCheck:
OPF-018is reported even when the content document contains scripting (in which case, only theUSAGE-levelOPF-018bmessage should be reported)I'll need to dig deeper in the code to see why.
siddoib commentedon Jun 20, 2022
@rdeltour, thanks for looking. All noted.
siddoib commentedon Nov 7, 2022
@rdeltour, any update on this issue? thanks again for your help.
fix: OPF-018 was incorrectly reported with inline CSS
rdeltour commentedon Dec 5, 2022
This should be fixed in v5.0.0-beta-3! Thanks again for the report 👍