include custom file in footer (v2022)

I have included a custom file in the footer (Page_Foot Server Event) in my PHPMaker 2022 project:

<script type="text/html" class="ew-js-template" data-name="myDropdown" data-method="prependTo" data-target="#ew-navbar-end" data-seq="10">
<!-- Notifications Dropdown Menu -->
	<?php include_once "custom_alert_header.php"; ?>
</script>

This used to work in version 2020 but not now. I get no errors in PHP or using F12, and nothing is displayed.

  1. Make sure the path of the included file is correct, it should be in the same folder as the layout.php,
  2. Press F12 in browser to check JavaScript errors in the Console panel,
  3. Enable Debug to check server side errors.

Your reply helped me to confirm that the problem was in the file content because of the upgrade and not its location. It was resolved by including:

namespace PHPMaker2022\projectname;
include_once __DIR__ . "/../vendor/autoload.php";

(and changing a number of Font Awesome Class names).I’m still having some problems displaying Font Awesome icons, but I’ll raise a separate topic if I can’t get to the bottom of it.Many thanks.

Riddle of icons solved:
I’m still using PHPMaker 2022, but project help file has been updated to 2023 which uses Bootstrap 5.2.1.I’ve used the following from 2023 help as a guide:

<script type="text/html" class="ew-js-template" data-name="myDropdown" data-method="prependTo" data-target="#ew-navbar-end" data-seq="10">
<li class="nav-item dropdown">
  <a class="nav-link" data-bs-toggle="dropdown" href="#">
    <i class="fa-solid fa-bell"></i>
    <span class="badge bg-warning navbar-badge">15</span>
....

So I need to replace fa-solid with fas until I upgrade to 2023.Hope that helps someone.

Bootstrap 5 was in version 2022 anyway, perhaps its Font Awesome that gets updated in 2023. I’ll carry on digging when I have time.(Still hope it helps)

You may read Migrating to v2023 → Font Awesome 6.

It looks like .fas and .fa-solid are both supported in PHPMaker 2023:

.fa-solid, .fas {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}