XWiki Platform
  1. XWiki Platform
  2. XWIKI-6180

Wiki Macro loses its PR and becomes unregistered

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 3.2 M1, 3.1.1
    • Component/s: Rendering
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:
      XWIKI-5282Wiki macros based on user or wiki are not unregistered
      XWIKI-9418After wiki restart macros got unregistered : Search did not recover
      XWIKI-7315Wiki macros are not registered in workspaces
      XWIKI-7913Can not register a wiki-level JSX even with PR
      XWIKI-6562Font names list from WYSIWYG loses its values when page saved by IE6 and IE7
      XWIKI-8832Include macro does not resolve its reference properly cross wiki (when page is displayed with display macro)

      Description

      This issue (if it really is an issue it will be hard to track down)

      -Steps to reproduce:

      • Login as Admin, create a user and give him PR
      • Logged in with the newly created user and I created a Wiki Macro containing some groovy.
      • Macro characteristics:
        • Supports inline mode: 1
        • Macro Content Type: Mandatory
        • Macro Visibility: Global
      • Wait around, and the macro will stop working.

      The macro worked some time, but suddenly stops working. I've got a error, saying it was unregistered.

      The document was not saved in the meantime by anyone. Neither by me (the author)

      This happens on a XWiki Enterprise 2.7.33694 so my guess is that newer versions are affected as well.

        Activity

        Hide
        Sergiu Dumitriu added a comment -

        The problem is not the PR for the internal groovy macro, but the fact that the macro is no longer registered. Since the macro is registered as Global, it could mean either that it somehow appears not to have PR when registering it, or that it was registered successfully, but at some point it was removed from the list of registered macros.

        Show
        Sergiu Dumitriu added a comment - The problem is not the PR for the internal groovy macro, but the fact that the macro is no longer registered. Since the macro is registered as Global, it could mean either that it somehow appears not to have PR when registering it, or that it was registered successfully, but at some point it was removed from the list of registered macros.
        Hide
        Thomas Mortagne added a comment - - edited

        It's not exactly the same thing than XWIKI-5957 but it could maybe be caused by the same right management bug. An anyway because of XWIKI-5957 you will not be able to use groovy in global wiki macros. Would be great if you could test that on at least 2.7.1 but if the time to wait for the macro to be unregistered is a bit random it will be hard to be 100% sure it's fixed.

        Show
        Thomas Mortagne added a comment - - edited It's not exactly the same thing than XWIKI-5957 but it could maybe be caused by the same right management bug. An anyway because of XWIKI-5957 you will not be able to use groovy in global wiki macros. Would be great if you could test that on at least 2.7.1 but if the time to wait for the macro to be unregistered is a bit random it will be hard to be 100% sure it's fixed.
        Hide
        Sorin Burjan added a comment -

        Ok, I was able t o reproduce this on a 3.1 final XEM

        Detailed procedure on how to reproduce:

        • create a normal user (don't add him any special rights. So basically all the rights checkboxes are blank) Also, set the user to Advanced so you have in the menu the Edit -> Object option
        • create a group (i called mine XWikiProgrammersGroup). Only right that this group has is "Program". So all the checkboxes are blank, except with Program. This one has the green check.
        • add the user you created above to the XWikiProgrammersGroup.
        • login as the normal user you created above, and create a page. In that page, add an XWiki.WikiMacroClass. Object settings are following:
          • Support Inline Mode: YES
          • Macro Visibility: Global
          • Macro Content Type: Optional
        • save the macro, and use it in the same page (note, you created the page and the macro as user, not Admin)
        • restart the XEM.

        After restarting, you will loose the PR rights over the macro, and in order to make it work again you have to re-save the page.

        Show
        Sorin Burjan added a comment - Ok, I was able t o reproduce this on a 3.1 final XEM Detailed procedure on how to reproduce: create a normal user (don't add him any special rights. So basically all the rights checkboxes are blank ) Also, set the user to Advanced so you have in the menu the Edit -> Object option create a group (i called mine XWikiProgrammersGroup). Only right that this group has is "Program". So all the checkboxes are blank, except with Program. This one has the green check. add the user you created above to the XWikiProgrammersGroup. login as the normal user you created above, and create a page. In that page, add an XWiki.WikiMacroClass. Object settings are following: Support Inline Mode: YES Macro Visibility: Global Macro Content Type: Optional save the macro, and use it in the same page (note, you created the page and the macro as user, not Admin) restart the XEM. After restarting, you will loose the PR rights over the macro, and in order to make it work again you have to re-save the page.
        Hide
        Thomas Mortagne added a comment -

        Sounds like a bad state of the right service at startup, will check that.

        Show
        Thomas Mortagne added a comment - Sounds like a bad state of the right service at startup, will check that.

          People

          • Assignee:
            Thomas Mortagne
            Reporter:
            Sorin Burjan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: