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

Keep basepath while theme loading #1970

Closed
boehsermoe opened this issue Oct 26, 2019 · 1 comment · Fixed by #2002
Closed

Keep basepath while theme loading #1970

boehsermoe opened this issue Oct 26, 2019 · 1 comment · Fixed by #2002
Assignees

Comments

@boehsermoe
Copy link
Member

In loadThemeConfig the basepath should be keep as relative path and which should also saved into database.

$dir = $basePath = Yii::$app->basePath . DIRECTORY_SEPARATOR . $basePath;

@nadar
Copy link
Member

nadar commented Mar 11, 2020

I am not sure this is related, but cmslayouts doe not work with absolute paths:

View not Found – yii\base\ViewNotFoundException
The view file does not exist: /app/repos/luya-module-cms/src/frontend/views/app/vendor/nadar/luya-creative-theme/views/cmslayouts/theme.php

as by yii defintion the absolute path must start with double slashes:

  • absolute path within application (e.g. "//site/index"): the view name starts with double slashes. The actual view file will be looked for under the view path of the application.
  • absolute path within current module (e.g. "/site/index"): the view name starts with a single slash. The actual view file will be looked for under the view path of the current module.

https://www.yiiframework.com/doc/api/2.0/yii-base-view#render()-detail

Not sure we have to improve this in luya cms cmslayouts importer or theme manager, will do some research.

@nadar nadar self-assigned this Mar 11, 2020
boehsermoe added a commit to boehsermoe/luya that referenced this issue Mar 15, 2020
nadar added a commit that referenced this issue Apr 6, 2020
* Translation helper controler

* PHPdoc

* Correct parameter order for help

* Documentation for block preview luyadev/luya-module-cms#83

* Revert PHP doc

* Travis mysql connection failed

* config with env scope

* used call_user_func for callback

* Update Config.php

* theme load without exception as default

* theme load without exception as default

* theme load without exception as default

* Update ThemeManager.php

* changelog #1969

* Update CHANGELOG.md

* add php doc

* theme management image for guide #1983

* Update app-themes.md

* close #1970

* Update CHANGELOG.md

* Relative theme path to alias path

* Changelog

* Relative vendor path to alias path

* Tests for Relative vendor path to alias path

Co-authored-by: Basil <git@nadar.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants