Page 1 of 1

Multisite Themes - Fatal Error

Posted: Sun Jul 29, 2018 6:38 am
by eisteddfod_37
Hi there,

I wonder if someone can help.

I've installed a theme, all working fine. Added multisite and looking to use slightly different stylesheets for each store (i.e. different colours).

So basics so far, copied the "Default theme" renamed the folder I've then created and edited the below files with the folder name.

Code: Select all

admin/controller/extension/theme/theme_default.php
admin/language/en-gb/extension/theme/theme_default.php
admin/view/template/extension/theme/theme_default.tpl
I've also changed all the bits inside like this

Code: Select all

class ControllerExtensionThemeThemeDefault extends Controller {

Code: Select all

class ControllerExtensionhad_copy extends Controller {
Visited extensions/extensions and tried to install. However, I'm getting the following error.

Code: Select all

Fatal error: Class 'Controllerextensionthemehadcopy' not found in /system/storage/modification/system/engine/action.php on line 43
OC version 2.3.0.1.

Any help, greatly appreciated.

Thanks

Andy

Re: Multisite Themes - Fatal Error

Posted: Sun Jul 29, 2018 4:47 pm
by OSWorX
As the message tells you, the controller cannot be found.
Because this

Code: Select all

class ControllerExtensionhad_copy extends Controller {
should be

Code: Select all

class ControllerExtensionhadcopy extends Controller {
or

Code: Select all

class ControllerExtensionHadCopy extends Controller {

Re: Multisite Themes - Fatal Error

Posted: Sun Jul 29, 2018 7:04 pm
by straightlight
class ControllerExtensionhadcopy extends Controller {
With the exception of some Windows IIS versions or virtual servers out there, the lowercase 'h' of the term 'had' would also be incorrect with other OSes in this case since the OC Engine would still want to track a capital H.

However, there is also an undemonstrated example that could be used since there are absolutely no obligations to use underscores on a lowercased filename (more easy to read though):

Code: Select all

class ControllerExtensionHadcopy extends Controller {