moqui / HiveMind

HiveMind is a project management and ERP application for services organizations. It features project/task management, request tracking, time tracking, expenses, invoices/payments, general ledger, and content management (wiki). HiveMind is based on Moqui Framework, Mantle Business Artifacts, and Simple Screens.
Other
56 stars 48 forks source link

Issue with editing wiki Root Page #26

Closed locnguyenx closed 7 years ago

locnguyenx commented 7 years ago

Problem 1:

  1. Open an existing wiki spage: http://localhost:8080/apps/hm/wiki/DEMO currently, the root page of this wiki has content

  2. choose Edit Page for the root page the EditWikiPage screen opened with url: http://localhost:8080/apps/hm/EditWikiPage?wikiSpaceId=DEMO&pagePath=DEMO

Issue: this screen shows empty page

If I fill content and save, system creates new page DEMO under the root (has path wiki/DEMO/DEMO)

Problem 2:

  1. Open EditWikiPage directly with url: http://localhost:8080/apps/hm/EditWikiPage?wikiSpaceId=DEMO it will shows the exact content of the Root Page of DEMO wiki

  2. Save this page, system creates update content to page DEMO under the root (has path wiki/DEMO/DEMO)

The issue may be because of parameter pagePath returned from service org.moqui.impl.WikiServices.get#WikiPageInfo. As I remembered correctly, when opening a wiki root page, the pagePath must be empty.

jonesde commented 7 years ago

This was an issue in the WikiServices.xml file in moqui-framework in the normalized pagePath code which set it based on the pageName even if it was the root page in a space (which it shouldn't). That is fixed in commit #4b9c5d9 in moqui-framework.