wiki icon indicating copy to clipboard operation
wiki copied to clipboard

bug: 404 on `wiki_page.get_page_content`

Open harshtandiya opened this issue 8 months ago • 2 comments

Source of bug: This code below https://github.com/frappe/wiki/blob/e5895af94e14ac83d355ea90d8fdb401941cdce7/wiki/wiki/doctype/wiki_page/templates/web_sidebar.html#L2C1-L5C8

using single quotes inside the double quotes should fix it. Using double quotes again is breaking the class.

This is resulting in the code breaking in get_page_content

  // Get the wiki page name from the parent element's data attribute
  const pageName = $(pageElement).closest(".sidebar-item").data("name");

  // Update wiki page name for other functions
  wikiPageName = pageName;

  // Save wiki page name on input used by editor.js and render_wiki.js
  $('[name="wiki-page-name"]').val(wikiPageName);

  frappe.call({
    method: "wiki.wiki.doctype.wiki_page.wiki_page.get_page_content",
    args: { wiki_page_name: pageName },
    callback: (r) => {
...

harshtandiya avatar Apr 26 '25 12:04 harshtandiya