Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2436

Wiki breaks for random number of groups

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.4, 2.3.3
    • Component/s: Tool Wiki
    • Labels:
      None

      Description

      Wiki will throw a null pointer for random numbers of groups because there is a section in the createSession code that is causing it to skip the bit that clones the wiki pages: specifically this bit:

      if (childPage.getWikiSession() != null) {
          continue;
      }

      1) Find out why this bit is here
      2) Remove it or change it as needed

        Activity

        Hide
        ernieg Ernie Ghiglione added a comment -
        Tested and closed
        Show
        ernieg Ernie Ghiglione added a comment - Tested and closed
        Hide
        jundirl Jun-Dir Liew added a comment -
        Database fix

        Find wiki sessions missing a main wiki page:
        select s.uid,s.session_id,s.wiki_uid,s.wiki_main_page_uid from tl_lawiki10_session s where s.wiki_main_page_uid is null;

        Create necessary wiki page for wiki session with uid=79
        insert into tl_lawiki10_wiki_page (wiki_uid,title,editable,wiki_current_content,wiki_session_uid) select wp.wiki_uid,wp.title,wp.editable,wp.wiki_current_content,s.uid from tl_lawiki10_wiki_page wp, tl_lawiki10_session s, tl_lawiki10_wiki w where w.uid=s.wiki_uid and w.wiki_main_page_uid=wp.uid and s.uid=79;
        select last_insert_id();

        Create child wiki page content for the above wiki page (where above wiki page uid=509)
        insert into tl_lawiki10_wiki_page_content (wiki_page_uid,body,editor,edit_date,version) select wpc.wiki_page_uid,wpc.body,wpc.editor,wpc.edit_date,wpc.version from tl_lawiki10_wiki_page_content wpc, tl_lawiki10_wiki_page wp where wpc.uid=wp.wiki_current_content and wp.uid=509;
        select last_insert_id();

        Update keys, where above wiki page content uid=806
        update tl_lawiki10_wiki_page set wiki_current_content=806 where uid=509;
        update tl_lawiki10_session set wiki_main_page_uid=509 where uid=79;
        Show
        jundirl Jun-Dir Liew added a comment - Database fix Find wiki sessions missing a main wiki page: select s.uid,s.session_id,s.wiki_uid,s.wiki_main_page_uid from tl_lawiki10_session s where s.wiki_main_page_uid is null; Create necessary wiki page for wiki session with uid=79 insert into tl_lawiki10_wiki_page (wiki_uid,title,editable,wiki_current_content,wiki_session_uid) select wp.wiki_uid,wp.title,wp.editable,wp.wiki_current_content,s.uid from tl_lawiki10_wiki_page wp, tl_lawiki10_session s, tl_lawiki10_wiki w where w.uid=s.wiki_uid and w.wiki_main_page_uid=wp.uid and s.uid=79; select last_insert_id(); Create child wiki page content for the above wiki page (where above wiki page uid=509) insert into tl_lawiki10_wiki_page_content (wiki_page_uid,body,editor,edit_date,version) select wpc.wiki_page_uid,wpc.body,wpc.editor,wpc.edit_date,wpc.version from tl_lawiki10_wiki_page_content wpc, tl_lawiki10_wiki_page wp where wpc.uid=wp.wiki_current_content and wp.uid=509; select last_insert_id(); Update keys, where above wiki page content uid=806 update tl_lawiki10_wiki_page set wiki_current_content=806 where uid=509; update tl_lawiki10_session set wiki_main_page_uid=509 where uid=79;

          People

          • Assignee:
            jundirl Jun-Dir Liew
            Reporter:
            lfoxton Luke Foxton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development