baumrock / RockMigrations

The Ultimate Automation and Deployment-Tool for ProcessWire
MIT License
33 stars 10 forks source link

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

Closed jlahijani closed 1 year ago

jlahijani commented 1 year ago

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 commented 1 year ago

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

jlahijani commented 1 year ago

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 commented 1 year ago

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