[wp-trac] [WordPress Trac] #10262: Plugin editor fails without PHP tokenizer support

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 24 13:28:37 GMT 2009


#10262: Plugin editor fails without PHP tokenizer support
--------------------------+-------------------------------------------------
 Reporter:  EasyTarget    |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  low           |   Milestone:  Unassigned
Component:  General       |     Version:  2.8       
 Severity:  normal        |    Keywords:  tokenizer 
--------------------------+-------------------------------------------------
 When trying to edit a plugin on my Wordpress following the 2.8 upgrade
 (from 2.7.1) the edit screen was blank. The header and admin sidebar
 remained, but the rest of the edit plugin page was entirely blank. In my
 logs I saw the following every time I selected 'edit' in the plugins menu:

 [24-Jun-2009 14:22:38] PHP Fatal error:  Call to undefined function
 token_get_all() in /usr/local/www/wordpress/wordpress/wp-
 admin/includes/misc.php on line 273

 Only the plugin editor appeared affected.. the theme editor (which I
 assume is very similar code-wise) appeared to work correctly. Removing all
 plugins except 'hello dolly' failed to resolve this.

 I have another WP install at work, also upgraded to 2.8 at the same time,
 and the plugin editor on that install works correctly. The failing system
 is my personal FreeBSD7.2 server, the working one being a Debian (Etch)
 system. Both fully updated.

 Googling around I found the following thread on the WP forums:
 http://wordpress.org/support/topic/277659
 which lead on to:
 http://wordpress.org/tags/token_get_all

 On my personal system I did:
 # cd /usr/ports/devel/php5-tokenizer/ && make install clean && apachectl
 restart
 - Ie. install PHP tokenizer and restarts apache.

 The plugin editor immediately started working correctly on my Wordpress.

 So, it looks like php-tokenizer has become a requirement for Wordpress ;-)
 or.. the plugin editor needs to be reworked to remove it's dependence on
 the tokenizer.

 As the above threads note; tokenizer support is not always
 available/enabled for hosted PHP solutions.

 Ideally the reliance on this should be removed.
 Or (if it is actually 'a good thing(tm)') tokenizer support should be
 added to the WP requirements list so that affected end-users have some
 ammunition if their hosting provider asks 'why' they should enable it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10262>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list