Occasionally in the following:
public function beforeroute($f3, $params)
{
$this->m("URI: " . $f3['URI']);
$this->m("PATTERN: " . compact_dump($f3['PATTERN']));
$this->m("ALIAS: " . compact_dump($f3['ALIAS']));
PATTERN and ALIAS are coming up null. Anyone any suggestions on where I should be looking to figure out why?
Examples of it working as expected:
Tue, 12 Apr 2022 11:30:19 +0000 [2602:ffd5:1:219::1] app/resources/pjh::beforeroute(111): URI: /question/f0ab717b-6567-4ab4-8217-a69110a15f70
Tue, 12 Apr 2022 11:30:19 +0000 [2602:ffd5:1:219::1] app/resources/pjh::beforeroute(112): PATTERN: : (string) "/question/@question_id"
Tue, 12 Apr 2022 11:30:19 +0000 [2602:ffd5:1:219::1] app/resources/pjh::beforeroute(113): ALIAS: : (string) "showQuestion"
and
Tue, 12 Apr 2022 12:29:35 +0000 [207.46.13.110] app/resources/pjh::beforeroute(111): URI: /establishment/fb294f55-9b2d-4991-a2e4-19e1afe021c0
Tue, 12 Apr 2022 12:29:35 +0000 [207.46.13.110] app/resources/pjh::beforeroute(112): PATTERN: : (string) "/establishment/@establishment_id"
Tue, 12 Apr 2022 12:29:35 +0000 [207.46.13.110] app/resources/pjh::beforeroute(113): ALIAS: : (string) "show_establishment"
and
Tue, 12 Apr 2022 12:28:22 +0000 [40.77.167.16] app/resources/pjh::beforeroute(111): URI: /
Tue, 12 Apr 2022 12:28:22 +0000 [40.77.167.16] app/resources/pjh::beforeroute(112): PATTERN: : (string) "/"
Tue, 12 Apr 2022 12:28:22 +0000 [40.77.167.16] app/resources/pjh::beforeroute(113): ALIAS: : (string) "home"
And where it isn't working as I expect, with the same base URL's:
Tue, 12 Apr 2022 11:34:53 +0000 [66.249.79.13] app/resources/pjh::beforeroute(111): URI: /question/5d80076e-0ca5-4edf-9ce4-28eea6bac6d8
Tue, 12 Apr 2022 11:34:53 +0000 [66.249.79.13] app/resources/pjh::beforeroute(112): PATTERN: : NULL
Tue, 12 Apr 2022 11:34:53 +0000 [66.249.79.13] app/resources/pjh::beforeroute(113): ALIAS: : NULL
and
Tue, 12 Apr 2022 11:50:44 +0000 [66.249.79.11] app/resources/pjh::beforeroute(111): URI: /establishment/a59eb797-a51c-467b-8cfb-12cb6e9ef0b8
Tue, 12 Apr 2022 11:50:44 +0000 [66.249.79.11] app/resources/pjh::beforeroute(112): PATTERN: : NULL
Tue, 12 Apr 2022 11:50:44 +0000 [66.249.79.11] app/resources/pjh::beforeroute(113): ALIAS: : NULL
and
Tue, 12 Apr 2022 11:57:07 +0000 [35.189.121.87] app/resources/pjh::beforeroute(111): URI: /
Tue, 12 Apr 2022 11:57:07 +0000 [35.189.121.87] app/resources/pjh::beforeroute(112): PATTERN: : NULL
Tue, 12 Apr 2022 11:57:07 +0000 [35.189.121.87] app/resources/pjh::beforeroute(113): ALIAS: : NULL
Of note, the ones that aren't working are all google searchbots (but they do work most of the time,) the ones where it is are MSN (which is why I didn't obfuscate the IPaddresses)
One example of it working, then suddenly not:
Tue, 12 Apr 2022 12:28:30 +0000 [x.y.z.w] app/resources/pjh::beforeroute(111): URI: /establishment/226
Tue, 12 Apr 2022 12:28:30 +0000 [x.y.z.w] app/resources/pjh::beforeroute(112): PATTERN: : (string) "/establishment/@establishment_id"
Tue, 12 Apr 2022 12:28:30 +0000 [x.y.z.w] app/resources/pjh::beforeroute(113): ALIAS: : (string) "show_establishment"
Tue, 12 Apr 2022 12:28:31 +0000 [x.y.z.w] app/resources/pjh::beforeroute(111): URI: /establishment/67be9733-bcc9-4490-8245-ea525d44135e
Tue, 12 Apr 2022 12:28:31 +0000 [x.y.z.w] app/resources/pjh::beforeroute(112): PATTERN: : (string) "/establishment/@establishment_id"
Tue, 12 Apr 2022 12:28:31 +0000 [x.y.z.w] app/resources/pjh::beforeroute(113): ALIAS: : (string) "show_establishment"
Tue, 12 Apr 2022 12:28:32 +0000 [x.y.z.w] app/resources/pjh::beforeroute(111): URI: /establishment/67be9733-bcc9-4490-8245-ea525d44135e
Tue, 12 Apr 2022 12:28:32 +0000 [x.y.z.w] app/resources/pjh::beforeroute(112): PATTERN: : NULL
Tue, 12 Apr 2022 12:28:32 +0000 [x.y.z.w] app/resources/pjh::beforeroute(113): ALIAS: : NULL
Routes defined for the above:
$f3->route('GET|HEAD @showQuestion: /question/@question_id', 'PJH\Question->show');
$f3->route('GET|HEAD @show_establishment: /establishment/@establishment_id', 'PJH\Establishment->show');
$f3->route('GET|HEAD @home: /', 'PJH\Page->home');
Help?