Closed (fixed)
Project:
Textmate
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2009 at 20:50 UTC
Updated:
28 Oct 2009 at 22:19 UTC
I tried to install based on the instructions here: http://manual.macromates.com/en/bundles#getting_more_bundles
using the repo here: http://svn.textmate.org/trunk/Review/Bundles/PHP%20Drupal.tmbundle/
Textmate sees the bundle but gives me the following error message on all the snippets I've tried. (For example theme_block):
"The PHP Drupal Bundle is not installed properly. Press ⌃ H for instructions."
I'm not sure where to proceed from here but I'd really like to get this working if you have any insight. Thanks.
Comments
Comment #1
psynaptic commentedThat should say press ⌃ H for instructions. ⌃ H is the help file so please review that and past back if you still can't figure it out.
Comment #2
psynaptic commentedI've fixed the help file, the error message and the project page to make it clearer. Marking as fixed.
Comment #3
mason@thecodingdesigner.com commentedIt works now! thanks.
Comment #4
localhost commentedI've tried setting the environment variable through Textmate prefs as well as in my .bash_profile to no avail. When I type in 'echo $TM_DRUPAL_VERSION' from the cmd line, it properly outputs the values. However, when I try any tab triggers, I always get the message 'The PHP Drupal Bundle is not installed properly. Press ⌃H for instructions.' Any other ideas I could try to get this working? Any help appreciated.
Comment #5
psynaptic commentedThere is a second variable you need to set: TM_DRUPAL_API. Did you set this?
Comment #6
localhost commentedYes, I have set both variables but triggers are still not firing.
Comment #7
psynaptic commentedI really don't know what else to suggest. The only other thing it could be is that the snippet file was not found. What trigger are you trying? Do you have the latest revision of the Bundle?
http://svn.textmate.org/trunk/Review/Bundles/PHP%20Drupal.tmbundle/
Also, the variables need to be set in the TextMate preferences.
Preferences > Advanced > Shell Variables
Comment #8
localhost commentedi have been testing w/ hook_menu. The bundle is loaded and variables are set. Basic snippets work, but commands don't. Basically any triggers with embedded php that begin as "#!/usr/bin/env php <?php…". Wondering if somethings screwed up in PHP installation. I'm running entropy PHP w/ no other problems. Thanks.
Comment #9
localhost commentedI turned error reporting on and tab triggers now display this:
I've tried re-installing Textmate but have no idea why the environmental variables are not being set.
Comment #10
psynaptic commentedWhat revision of the bundle are you using? Is it the latest? Maybe try an
svn upin the bundle dir?It is impossible for me to debug this for you as I can't reproduce on my machine. The best I can suggest is to debug the problem step-by-step.
Start by going into the function textmate_detect_drupal_version() in the file at Support/bootstrap.php within the bundle folder (open the bundle folder in Textmate as a project). Print some stuff out, try and find something that is wrong with the contents of variables etc.
Comment #11
localhost commentedWhat I found is my $_ENV array is empty but $_SERVER appears to have TM_DRUPAL_VERSION and TM_DRUPAL_API set. By changing $_ENV['TM_DRUPAL_VERSION'] and $_ENV['TM_DRUPAL_API'] to $_SERVER['TM_DRUPAL_VERSION'] and $_SERVER['TM_DRUPAL_API'] respectively, on line 11 on bootstrap.php, everything appears to work. I guess this hack gets it working on my machine but still unsure why the variables are not exposed in the $_ENV array?? Thanks for help
Comment #12
psynaptic commentedThat is very odd indeed. I'll ask in the #textmate IRC channel and see if anyone's had this before. Thanks for persevering with the bundle. You will make up all this lost time by using the bundle commands in no time :D
Comment #14
gg4 commentedAlso, Line 84 needs to change: return $_SERVER['TM_DRUPAL_VERSION'];
Comment #15
gg4 commentedComment #16
gg4 commentedComment #17
psynaptic commentedWhat happened?
Comment #18
gg4 commentedabove comments about using $_SERVER instead of $_ENV are accurate.
...
I deleted another posting above that really had nothing to do with this issue, but was only showing up when using the drupal bundle. This was caused by having multiple versions of php on my system and the particular order that textmate selects which version to use. I had assumed textmate just used the shells $PATH to make this determination, but: http://manual.macromates.com/en/shell_commands
Comment #19
kim.pepperI can confirm changing to use $_SERVER instead of $_ENV works for me.