Skip to content

Commit 88892a7

Browse files
authored
Make sure CMS module is installed and enabled
1 parent 6148f4b commit 88892a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin.php

+5
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ protected function extendBackendModule(): void
201201
*/
202202
protected function extendCmsModule(): void
203203
{
204+
// Verify that the CMS module is installed and enabled before extending it
205+
if (!class_exists('\Cms\Classes\Page') || !in_array('Cms', config('cms.loadModules'))) {
206+
return;
207+
}
208+
204209
/*
205210
* Handle translated page URLs
206211
*/

0 commit comments

Comments
 (0)