[Solved] HTTP 500 "Layout default not found" on /partners/partner-dashboard/invoices (Joomla 6.2.1, Solidres 4.8.0, Hub 2.6.0, Lumina 1.3.0)
Environment:
- Joomla: 6.2.1
- Solidres: 4.8.0
- Solidres Hub: 2.6.0
- Template: Lumina v1.3.0
Problem (What Was Happening):
Opening **Invoices** (`/partners/partner-dashboard/invoices`) from the HUB partner dashboard (`hub.navbar`) on the Joomla site frontend resulted in an **HTTP 500 — Layout default not found** error. Although invoices worked in the backend and could be accessed from a reservation, the frontend view (`Joomla\Component\Solidres\Administrator\View\Invoices\HtmlView`) did not search the invoice plugin's layout directory when running in the `site` client context.
Solution (What Changed):
The frontend partner dashboard now loads `/partners/partner-dashboard/invoices` cleanly without the `500` layout error, displaying the invoices list with `hub.navbar` intact.
How We Fixed It:
- Target View file: `/www/booking.san-abkhazia.ru/plugins/solidres/invoice/administrator/components/com_solidres/src/View/Invoices/HtmlView.php`
- Target layout directory: `/www/booking.san-abkhazia.ru/plugins/solidres/invoice/administrator/components/com_solidres/tmpl/invoices` (containing `default.php` and `default_actions.php`)
- Code change: In `HtmlView::display($tpl = null)`, right before `parent::display($tpl);`, added a check for `$this->isSite` and registered the plugin's template directory via `$this->addTemplatePath(...)`:
if ($this->isSite) {
$this->addTemplatePath(
JPATH_PLUGINS . '/solidres/invoice/administrator/components/com_solidres/tmpl/invoices'
);
}
- Verification: Saved `HtmlView.php` (`644`), cleared the Joomla cache, and opened `/partners/partner-dashboard/invoices` in the partner dashboard, confirming the page rendered normally without a `500` error.