SearchKit-based editor doesn't work in multisite
Hi all,
This might be a bigger discussion with other devs including CT, I'm not sure.
When this extension is installed, the "Edit" and "Cancel" buttons are provided by a template. And that's defined in managed/LineItemsSavedSearch.mgd.php
with this line:
'path' => E::url('templates/CRM/Lineitemedit/Form/Buttons.html'),
The problem with this is that the path then becomes an absolute URL. So if you install this on https://one.mysite.org, the Template file is defined as, e.g., "https://one.mysite.org/sites/all/civicrm/extensions/biz.jmaconsulting.lineitemedit/templates/CRM/Lineitemedit/Form/Buttons.html". But that remains true even when you try to edit a contribution from https://two.mysite.org. AFAICT the buttons simply don't load.
It seems as though it's possible to make this a relative path - but I don't know if the relative path can be calculated like the URL is? In my case, we're using Domain Access, so it's the same codebase - but that's not necessarily true, so I don't know how to ensure that the path in the managed entity will always be correct.