Skip to content
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

Error when wrote a new Wiki Page and tried saving it #270

Open
umairsy opened this issue Sep 23, 2024 · 4 comments
Open

Error when wrote a new Wiki Page and tried saving it #270

umairsy opened this issue Sep 23, 2024 · 4 comments

Comments

@umairsy
Copy link
Member

umairsy commented Sep 23, 2024

Extremely sad to see efforts of 30 mins wasted due to error on saving the new Wiki Page!

Edit: As learnt from @shariquerik, the issue was because in Wiki Space DocType, the parent and page's URL were not set. Once this was manually updated, page was restored.

If this issue is already fixed, but FC is missing a deployment, please ensure it is done.

Traceback (most recent call last):
File "apps/frappe/frappe/website/serve.py", line 20, in get_response
response = renderer_instance.render()
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_renderer.py", line 46, in render
html = self.get_html()
File "apps/frappe/frappe/website/utils.py", line 521, in cache_html_decorator
html = func(*args, **kwargs)
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 50, in get_html
self.update_context()
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 65, in update_context
ret = self.doc.get_context(self.context)
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_page.py", line 227, in get_context
context.wiki_search_scope = self.get_space_route()
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_page.py", line 192, in get_space_route
frappe.throw(
File "apps/frappe/frappe/init.py", line 677, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 642, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 593, in _raise_exception
raise exc
frappe.exceptions.ValidationError: Wiki Page doesn't have a Wiki Space associated with it. Please add them via Desk.

@volkswagner
Copy link

I can confirm the same error:
Installed Apps
Ecommerce Integrations: v1.20.1 (main)
ERPNext: v15.36.3 (version-15)
Frappe Framework: v15.37.0 (version-15)
Frappe HR: v15.25.2 (version-15)
Payments: v0.0.1 (develop)
Wiki: v2.0.0 (master)

If I try to edit a page outside of desk, I don't have the save button and the content
disappears. I get only a window to set a title.

cantEdit.mov

@volkswagner
Copy link

volkswagner commented Sep 29, 2024

I had bench issues with diverged repo.

On branch version-15 Your branch and 'upstream/version-15' have diverged, and have 1 and 236 different commits each, respectively. (use "git pull" to merge the remote branch into yours)

I was able to solve my issue with:

cd apps/hrms
git fetch
git reset --hard upstream/version-15
git pull
cd ~/frappe-bench
bench update
bench --site mywiki.com migrate

Still having issues though. I have the save button, but lost editor functions. I've been trying to update to 2.0.1, but bench keeps saying I'm up to date. If I try:

git checkout tags/v2.0.1

I still can't update. How can we get the changes in 2.0.1?

frappe@f15:~/frappe-bench/apps/wiki$ git pull
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

git diff shows no result.

Confused here :(

Oddly, I did get a notification in Desk that there was an update available for Wiki, but I haven't been able to get it to show again.

@AyshaHakeem
Copy link
Collaborator

@volkswagner Could you please share a screenshot of the edit view on your Wiki?
Also, just to note, the edit functionalities have been adjusted since the current editor is now in markdown, not rich text.

@volkswagner
Copy link

Thank you @AyshaHakeem.

I just realized the field type changed to markdown. This is in fact my issue.

Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants