• Hide-when causes problems

    By Gary L Morrison 2 decades ago

    If you have an outline item with a hide-when, the menu gets built, however, it doesn't work. If it is a sub-menu, it crashes, if a main menu item, get error.

    • How to fix temporarily

      By Jon Hart 2 decades ago

      I experienced this when initially testing, however when I put it into production I solved this issue here & have not seen this issue again.



      How I did it:

      I created a basic outline structure for instance:

      +Home | +Create | +Views | +Login



      Under this I had many sub links according to the specific db & hide/whens appropriately, but you must

      make sure that if you display a top level item then you have at least one item under that that is publicly viewable.



      What I Did:

      For the Top level item I just set as Public to all & copied that as a sub level with a hide/when user is logged in and at least one of the roles required below it was there. Then one of the other items below it would be visible & prevents this error occuring.



      If you need further example I can email you a sample db to show this ;o)



      I know that this is not a best case scenario fix, but I have not had a chance to dive into finding out where this occuring & how to best handle it. I hope to address this in my next release soon.

      I plan on SERIOUSLY updating the process & making it even more lightweight & using better coding structures.

      • Problem

        By Gary L Morrison 2 decades ago

        The problem is in the generation of the XML . In the example below there are 2 hide whens. outlineentry position 2.2.1 is followed by outlineentry position 2.2.3, position 2.2.2 is hidden. The same occurs at onlineentry postion 4, there is no position 3 since there is a hide when on it.



        If the positions could be resequenced I think that would solve the problem.