Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not valid template file:frontend/mytheme_rwd/default/template/page/1column.phtml #193

Open
csdougliss opened this issue Jun 18, 2015 · 8 comments

Comments

@csdougliss
Copy link

Hi,

I have setup magento-composer-installer to share a theme from a separate private repo to a couple of other repos. I have run:

./composer.phar install in the root of my magento install.

When viewing the site I see the following error:

2015-06-18T08:11:31+00:00 CRIT (2): Not valid template file:frontend/mytheme_rwd/default/template/page/1column.phtml

The symlinks were created as such:

in app/design/frontend:
mytheme_rwd -> ../../../vendor/xxx/module-theme-mytheme/app/design/frontend/mytheme_rwd

In skin/frontend:
mytheme_rwd -> ../../vendor/xxx/module-theme-mytheme/skin/frontend/mytheme_rwd

The composer.json of the repo that I am pulling is configured as such:

{
  "name": "xxx/module-theme-mytheme",
  "type": "magento-module",
  "extra": {
    "map": [
        ["app/design/frontend/mytheme_rwd", "app/design/frontend/mytheme_rwd"],
        ["skin/frontend/mytheme_rwd", "skin/frontend/mytheme_rwd"]
      ]
  },
  "license":"proprietary",
  "description":"theme",
  "authors":[
    {
      "name":"Craig,
      "email":"craig_carnell@hotmail.com"
    }
  ]
}

I am using git version 2.4.3. Composer is 1.0-dev (b2173d28fc8b56236eddc8aa10dcda61471633ec) 2015-06-16 10:43:55

nginx is 1.8.0 and Varnish is 4.0.3. OS is OS X 10.10.3 Yosemite

Any ideas?

@AydinHassan
Copy link
Member

Do you have symlinks enabled in Magento Admin?

System -> Configuration -> Developer -> Template Settings

@csdougliss
Copy link
Author

@AydinHassan No I didnt. That has fixed my local copy thanks!

But on deployment (we use capistrano (magentify) with jenkins) - is there any way to not use symlinks so I do not need to enable this option?

@AydinHassan
Copy link
Member

You can use the copy deploy strategy

@csdougliss
Copy link
Author

@AydinHassan

With local development, I would prefer to symlink so that you can still edit the files in php storm and commit them back.

If you are referring to "magento-deploystrategy": "copy", I presume this will stop me doing this?

With capistrano I am using the copy strategy:

set :copy_via,         :scp
set :deploy_via,       :copy
set :deploy_to,        '/var/www/vhosts/xxx_uk'
set :copy_strategy,    :export
set :copy_exclude,     [".git/*", "var/*"]

Capistrano is v2

@AydinHassan
Copy link
Member

Yeah you can't do this. We just use composer extra to grab config, there is no way to specify dev/production configss for composer. Why can't you just use symlinks for production? We do.

@csdougliss
Copy link
Author

@AydinHassan I've read it's a security risk

@AydinHassan
Copy link
Member

Well you are using Capistrano, which uses symlinks...

Take it with a pinch of salt, but do research in to it.

@Flyingmana
Copy link
Member

actually yes, symlinks are a security risk. There were already some problems with apache a while ago.
For them most of it was fixable by using the symlinksifownermatch directive instead of the FollowSymLinks
For Magento this is not so easy, on the other side there are a lot lot of people using Magento with allowed symlinks without attacks targeting this.

Maybe we should add a new Feature, which allows environment specific decisions here. But that could cause problems to not appear before a deploy.

I have another feature planed, which makes symlinks/copy not needed anymore, but its not likely to get added during the next weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants