I tried on helios, galeleo, and aptana, and 2 different computers, all using pdt php editer and the drupal eclipse plugin. As soon as I open a tpl.php file, the editor freezes. I can't find anything on this.

Comments

dman’s picture

I've not had that problem .. but I use the phpeclipse plugin.
I had managed to kill eclipse if the project directories had recursive symlinks, and the text editor can occasionally die if opening a very large file with no carriage returns ...
but tpl.php files should be fine.

Mikey Bunny’s picture

I have a similar problem when editing .tpl.php files in Eclipse for Windows, but I've never had this problem on any of my Linux setups (not sure if that's relevant?). When editing a .tpl.php file eclipse regularly locks up for a minute or more, but sometimes permanently hangs. Occasionally when/if eclipse unfreezes I get the error "Unhandled event loop execution java.lang.StackOverflowError". It's been driving me insane for weeks. I have to use Windows at my current role so switching to Linux is not an option.

feo’s picture

Linux Ubuntu 10.04 + Eclipse => the same, regular freez on tpl.php files

dkinzer’s picture

I am having the same issue. It happens when I edit tpl.php files using the default php editor. But if I use the html editor it doesn't crash.

The other thing I noticed is that when I view tpl.php files in the php editor, some of the white spaces (I have visible white spaces enabled) looks a little red like there is an error being parsed.

It usually happens right after the closing caret for php, ...

I noticed too that if I add a character after that point that the white spaces go back to their normal grey color.

Also, I noticed that the error doesn't happen if I use <? .. ?> instead of ... ;

I would be fine with editing the files in the html editor except that I can't seem to make configure eclipse to open tpl.php with the html editor by default.

dkinzer’s picture

This site has a tip that might help some:

http://tech.akom.net/archives/63-The-Eclipse,-PDT-and-Smarty-dance.html

It essentially says that you can remove tpl from plugin.xml to remove the PDT strangle hold on the *.tpl.php files.

dkinzer’s picture

Aptana has an PHP editor that does not have this issue. You could either download it as a plug-in for Eclipse or as a it's own project.

http://download.aptana.com/studio3/plugin/install

By the way, you say that you tried Aptana, but I think if you have PDT installed, then PDT is handling the PHP editing. So you need to make sure you uninstall PDT and then map then link *.module, *.install etc. file types to the PHP editor that comes with Aptana.

Mixologic’s picture

This was happening to me, but *only* when opening html.tpl.php.

The problem is that the new DOCTYPE in drupal 7 is unfamiliar to a vanilla install of Eclipse:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

The URL in that line hangs - for good reason:
http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/

I finally figured out that if you just leave eclipse alone for a good *five minutes*, it finally resolves the file, and stops beachballing when it hits that doctype.