diff --git a/app/config/routes.php b/app/config/routes.php index 2a812a754..178461e18 100644 --- a/app/config/routes.php +++ b/app/config/routes.php @@ -198,7 +198,7 @@ function (RouteBuilder $builder) { ); /** - * Registry allows URLs of the form /coid/name to render as a Mostly Static Page. + * Registry allows URLs of the form /coid/pages/name to render as a Mostly Static Page. * * Note this will effectively route any URL of the form /registry/x, where x consists of * digits, to the Pages controller. We need to filter on digits, or we'll end up taking diff --git a/app/src/Controller/PagesController.php b/app/src/Controller/PagesController.php index 8d563c341..10d9587a1 100644 --- a/app/src/Controller/PagesController.php +++ b/app/src/Controller/PagesController.php @@ -64,6 +64,8 @@ public function deliver(string $coid, string $name) { // with PrimaryLink lookups. We render here rather than redirecting into the MSRController to // reduce URL bar thrashing. + $coId = (int)$coid; + // MSRs are only enabled if file uploads are enabled $CoSettings = TableRegistry::getTableLocator()->get("CoSettings"); @@ -176,6 +178,8 @@ public function show(string $coid, string $name) { // redefining it. We render here rather than redirecting into the MSPController to // reduce URL bar thrashing. + $coId = (int)$coid; + $MSPTable = TableRegistry::getTableLocator()->get("MostlyStaticPages"); $msp = $MSPTable->find()