-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial edit not saving #146
Comments
As I can understand because of this bug new pages creation is completely broken at the moment. |
Hi all, trying ver 0.9.dev0, creating a new page using reStructuredText I get the error:
Is this the same kind of error from Michael? maybe something broken in _markups.py inheriting from MarkdownMarkupBase ? thank you |
@bitstein The reason for this behaviour (the creation issue) seems to lie with git, which doesn't care about an empty file (if you only "touch" a file of size zero in a git repo, it won't be tracked, even less staged, so the database contradicts the git repository information). Page._get_part(self, part) which results in a call to getattr(self.markup_, 'get_document_body')(self.raw) when the get_document_body only exists as a result in Converted[MarkupName], which would be the markup.ConvertedReStructruredText for your case, so more something like that getattr(self.markup_.convert(self.raw), 'get_document_body') There was also a missing parameter in the signal sent on page_saved, but I have to dig into that. I made a mess of a commit fixing a couple of things and readying it for python3, but the pdf generation still requires python2 (rst2pdf being how it is). |
I am reposting this from the Google Group email list (original here):
Hey guys,
I was very happy to find Waliki. It looks like a really promising project with many of the features I'd like in a wiki. When setting up a basic site as per the README, I came across some interesting behavior. When I create a new page, the empty markdown file is created, but I am unable to save the file after an initial edit. Interestingly, when I went into the Waliki source code and made an edit to views.py, I was able to make things function fine. What I did was change the raw page value here (https://github.com/mgaitan/waliki/blob/master/waliki/views.py#L125) from an empty string to a single space (" "). This saved the file as such (a single space, rather than empty), and the form submission worked fine after. I'd of course prefer if the file was initially saved as empty.
Do you know why this might be happening?
Thanks,
Michael
The text was updated successfully, but these errors were encountered: