davetcc / hugojoomla

Converts Joomla database content into Hugo md files
Apache License 2.0
10 stars 7 forks source link

Numerous warnings about not processed images #12

Open Kissaki opened 6 years ago

Kissaki commented 6 years ago
2018-06-02 22:03:21 WARN  JoomlaContent:47 - Images for 1 not processed
Unexpected token END OF FILE at position 0.
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:257)
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:81)
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:75)
        at com.thecoderscorner.web.hugojoomla.JoomlaImage.<init>(JoomlaImage.java:22)
        at com.thecoderscorner.web.hugojoomla.JoomlaContent.<init>(JoomlaContent.java:44)
        at com.thecoderscorner.web.hugojoomla.JoomlaHugoConverter.lambda$performConversion$2(JoomlaHugoConverter.java:107)
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93)
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
        at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:463)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:474)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:484)
        at com.thecoderscorner.web.hugojoomla.JoomlaHugoConverter.performConversion(JoomlaHugoConverter.java:96)
        at com.thecoderscorner.web.hugojoomla.HugoJoomla.main(HugoJoomla.java:35)

https://github.com/davetcc/hugojoomla/blob/6e0e6200e52bc1a02bc0bbc3cd51541839a2bb42/src/main/java/com/thecoderscorner/web/hugojoomla/JoomlaContent.java#L44

davetcc commented 6 years ago

Looking at the code, the image tag is corrupt or missing in your Joomla database:

Unexpected token END OF FILE at position 0 <-- notice the image tag was empty. The warning can be ignored if you were not expecting images. I've not seen this before in Joomla 3.

This does not affect processing and I think it is a valid warning. I'll drop the stack trace from the warning.

davetcc commented 6 years ago

Could you confirm which Joomla version you're trying to convert?

Kissaki commented 6 years ago

Joomla 3.8. It’s an upgraded install from various previous versions. So content may be in an old style or sth, if that's a thing. I dunno.

davetcc commented 6 years ago

Thanks for the reply, I’ve cleaned up the code on master so that it doesn’t print the stack trace, as it’s possible the field could be blank as in your case. It now just reports a warning that the image Json is not present. Once I’ve got the other issues sorted I’ll do a release. I’m your case there was no consequence to the exception.