Missing subpanels

In my contracts module there are missing subpanels. I only have Documents and Quotes subpanels but in studio I can see relationships for more things like notes and meetings etc.

Here is a screenshot of the relationships:

Having the Relationship is not the same thing as having a subpanel. You can have all those Relationships without having any subpanels. The two things are configured in different places in Studio.

Go to Studio > Contracts > Subpanels and edit any subpanels you need there.

Note that the Relationship type also affects this. A subpanel shows “many” records, not “one”, so depending on which side of a “one-to-many” relationship you are, you get the subpanels or not.

Thanks, I have been looking into it this morning, I guess I was confused as I read somewhere that to remove a subpanel you can remove the relationship. So if I wanted there to be a notes subpanel for the contracts module I would have to go into studio and add the relationship from the notes module as the primary to the contracts module as the secondary as a one to many and then I will have the subpanel show up?

  • a relationship (of the correct type) is required in order to make a subpanel possible
  • a subpanel is not required to make a relationship possible

Because of the above, it’s possible that removing the relationship automatically removes any subpanels, but I didn’t know that.

But I’m pretty sure creating the relationship won’t create the subpanel for you, you have to do that.

But all these things, you’re better off just trying them, playing with Studio, than asking here.

You can use this demo for experiments, so you don’t mess up your system:

Thanks for the demo link that was helpful. I solved my problem experimenting on that.

I created a one to many using notes module as the primary and contracts as the related module but the subpanel didn’t get created, so I did a bit more digging.

On this topic it said it had to be a many to many for the subpanel to be created. I created the same relationship but a many to many this time and then a new subpanel was automatically created but it was empty (no name and no create note button) I ran a quick repair and then it worked.

Edit: There is still one problem. When I go to notes there is now two subpanels for contracts.

I am still having trouble with this. Creating a new relationship does automatically create the subpanels but I am having issues trying to get subpanels to show for existing relationships.

I dug around in the files and I found the ‘modules/AOS_Contracts/metadata/subpanelsdef.php’ and that corresponds with the subpanels that are currently visable. I have made a copy of this file and placed it in ‘custom/modules/AOS_Contracts/metadata’ and edited it to add the tasks subpanel using the default ‘aos_contracts_tasks’ relationship and then did a quick repair but my modifications are not showing up.

Is there something I need to do to get my customizations to show after placing in the custom directory? I have checked it is owned by the correct user and permissions set to 755.

Maybe this can help you figure out what’s wrong: