Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
CraftCMS Driver canBootstrap function detects wrong file path #250
Hi, your CraftCMS driver wont work? for most people due to the detection you are doing here: https://github.com/tinkerwellapp/drivers/blob/master/src/Drivers/CraftTinkerwellDriver.php on line 13:
"web" is the suggested directory but 99% of people will change that to "public" or "public_html" so you can't use that as detecting if it's bootstrappable or not.
It would be really nice if you could make a 1 min video or a really really short guide just showing the total absolute basics on interacting with Craft with Tinkwerwell in this way too. But certainly, changing how that bootstrap detection works would make it work with my projects which would be really helpful too :)
The driver itself was provided from the community as we don't have specific CraftCMS knowledge – so it's hard to create a video that shows the benefits. This might be an opportunity for someone :)
The driver that you have linked might not be included in the recent release. It needs to be compiled into the app and this requires a new update for Tinkerwell. I got some reports that it works if you use a custom driver - this also allow you to change the directory for detection.
@sschlein Well, that was really easy!! I created the custom driver overriding the canBootStrap method to set the correct path and we're in! Really really nice!! Thanks!!
So for reference to others, I just created a .tinkerwell folder at the same level as your craft install (i.e same level as your public folder) and then created a file in that folder called "customCraftTinkerwellDriver.php" and put the below code in it.
Then open Tinkerwell and set the working directory to be the directory your site is (not your public folder, the folder above that) and then you are right in.
You can get straight to coding, just try typing this in the left hand column: