Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1340

Rebuild metamodel mixin action isn't working reliably

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: Core
    • Labels:
      None

      Description

      The issue is the HideMixinsForHomePage, which has the code:

      @Subscribe
          public void on(Object_rebuildMetamodel.ActionDomainEvent ev) {        final List<Object> arguments = ev.getArguments();
              if(arguments.get(0) instanceof HomePageViewModel) {
                  ev.hide();
              }
      }
      

      This was written in the belief (mistaken) that the mixin is set as the 0th argument. In fact, this is true for hide and disable, but is empty for validate.

      The short term fix is to add a guard to only perform the veto on the "HIDE" phase.

      The longer term fix involves reworking the way in which events from mixins surface the mixedIn event... it isn't really correct to make the mixin available as an argument; unlike contributed actions, it is a separate thing altogether (to whit: the argument to the mixin's constructor).

      Since this has been broken for a while (since 1.10), propose patching for 1.12.0, and doing a proper fix in 1.13.0.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            danhaywood Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development