Search code examples
subdomaincakephp-3.0

cakePHP 3 Plugin Vendor view overide not working on server - subdomain


I am using the cakedc/users plugin, I composer installed it. www_amar is my subdomain directory

The view I want to overide is located in www_amar/vendor/cakedc/users/src/Template/Users

And my view files are located in src/Template/Plugin/cakedc/users/Users

with the same filename. I know this works because it works locally but when I upload them to my server, it's still reading from the plugin file.

How do I troubleshoot this? Thank you


Solution

  • The name of the plugin in the plugin registry is not cakedc/users (that's the composer scope name), but CakeDC/Users by default (that's what's passed in the Plugin::load() call), which is what is used in the path when looking up possible overrides.

    Unlike your local environment, your server most likely uses a case sensitive filesystem, hence it cannot find src/Template/CakeDC/Users/..., as it doesn't exist. Change your folder names accordingly and it should work.

    See also