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

Usage of __DIR__ in $files->render() and symlinks #22

Closed
jlahijani opened this issue May 5, 2023 · 3 comments
Closed

Usage of __DIR__ in $files->render() and symlinks #22

jlahijani opened this issue May 5, 2023 · 3 comments

Comments

@jlahijani
Copy link

For various reasons, I have a directory that contains all the modules I use on my sites. I then symlink that directory to be /site/modules/ to the site I'm working on.

With RM, you have this line in RockMigrations.module.php, which won't work with my symlinked setup because of how PW only includes files in allowed paths.

'value' => $this->wire->files->render(__DIR__ . "/profileeditor.php", [

Could you possibly change it to this instead?

'value' => $this->wire->files->render($this->path . "profileeditor.php", [
@BernhardBaumrock
Copy link
Member

Sure, it's in the latest commit of the dev branch.

@jlahijani
Copy link
Author

Sure, it's in the latest commit of the dev branch.

Thanks, but you didn't remove this slash so technically you will have two slashes: /profileeditor.php

@BernhardBaumrock
Copy link
Member

Thx @jlahijani good catch, I've pushed a fix for that :)

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

2 participants