Scribe doesn't add new posts and cannot edit existing ones
Edited: I reduced the number of includes by base64 encoding and embedding most of the pictures into data.json. But the other problems persist.
I should mention that I have added posts to data/content.json manually.
Nothing is shown after I click on the "add a new post" button but in browser console:
[ZeroBlog] Unknown command
When I edit an existing post:
Connection with UiServer Websocket was lost. Reconnecting...
~~Meanwhile, my browser console says:~~
~~{error: 'Too many files in content.json'}~~
Also, after some lines about loading image file:
Uncaught TypeError: this.requestSite(...).then is not a function at CorsRequester.requestSiteAndContentJson (all.js?lang=en:2883:47) at CorsRequester.requestSiteAndContentJson (all.js?lang=en:2748:59) at CorsResolver.runStatusCheck (all.js?lang=en:3002:28) at CorsResolver.handleImageProgress (all.js?lang=en:3055:16) at CorsResolver.onImagesLoaded_Progress (all.js?lang=en:3112:27) at CorsResolver.onImagesLoaded_Progress (all.js?lang=en:2928:59) at ImagesLoaded.
(all.js?lang=en:3138:24) at proto.emitEvent (all.js?lang=en:326:14) at ImagesLoaded.progress (all.js?lang=en:571:8) at all.js?lang=en:557:13
having too many includes is only way you can get this error.
https://github.com/ZeroNetX/ZeroNet/blob/d5703541be8c463bb027b99aefc92130d88b8cc8/src/Ui/UiWebsocket.py#L1062-L1065
Dear @canewsin
having too many includes is only way you can get this error.
I removed almost all files from the directory and the data.json, by base64 encoding and embedding; however, other problems and errors persist.
@qomhmd IMBW but one can loose track of which errors do you mean, that is why it is handy to keep these mentioned in original posts(OP)/first post of this issue for example or link to a log file that you uploaded (i am usually using expired paste at https://bin.disroot.org/) where i exclude unrelated lines so developer spend less time. Also your post is missing ZNX version number and operating system, python version. BTW. after changes in site file/s are signed, i may restart ZN.
@slrslr Thank you for your recommendation. I don't know yet whether the log file encompasses any errors, or I am supposed to check the browser console also. Nothing resolved after restarting ZN. Now is it better to edit the OP or start a new issue?
@qomhmd try checking next_post_id in data.json, sometimes this causes issue to not add new post.
@qomhmd try checking next_post_id in data.json, sometimes this causes issue to not add new post.
The id was correct beforehand; my last post_id is 449 and the next_post_id is 500.
May the problem be related to the discrepency of post_ids and date_published between posts? For instance there are:
- a post with
id = 449andtime = 1660491060, and - another post with
id = 448andtime =1662049200(as it was the modified date in the previous blogging system). As you see theid1 > id2but thetime1 < time2.
This log is selected from the original log file while ZeroNet was working in the offline mode, for a period following:
- pressing "New post" button whereas nothing happens (except a browser console log of
[ZeroBlog] Unknown command). - Then editing a post and trying to sign & publish, but ZN is disconnected and reconnected.
It seems that the culprit is adding images to the posts using markdown which would prevent us from adding new posts; if one deletes the related content, the functionality returns!