Wow, that was a most excellent bug report and description of the error. 
Good work dude!

Thanks for pointing this out. The issue was with name convention mismatching in 
the plugin and documentation.
I've fixed the problem, and you can now checkout the latest 2.0 branch from 
github.

Please re-check and follow the instructions in the read me. I also updated the 
instructions here and provided some better examples.
And let me know if you have any further issues! :)

Cheers,
Graham Weldon
http://grahamweldon.com
e. [email protected]
p. (+61) 0407 017 293
Skype: grahamweldon


On Wednesday, 16 November 2011 at 9:05 AM, vaughany wrote:

> Hi all. I am having some trouble with the abovementioned helper plugin. 
> Following the instructions in the github repo readme results in error 
> messages and I have attempted to troubleshoot the reasons myself but have 
> achieved little in the way of success. There's little on Google for this 
> helper for Cake 2 (I tried pretty hard to find stuff, trust me).
> 
> Setup:
> Freshly cloned the CakePHP repository, switched to the 2.0 branch (2.0.3).
> Ran sudo chmod -R a+rwx app/tmp
> Modified Config/core.php to remove salt etc error messages.
> Created Config/database.php and supplied it with correct db details.
> Ran sudo chmod -R a+rwx app/tmp again (cake bake throws errors otherwise).
> cake bake'd model, controller and views for a very simplistic user schema:
> 
> CREATE TABLE `users` (
>     `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>     `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
>     `desc` text COLLATE utf8_unicode_ci NOT NULL,
>     `created` datetime NOT NULL,
>     `modified` datetime NOT NULL,
>     PRIMARY KEY (`id`),
>     UNIQUE KEY `name` (`name`)
> );
> 
> At this point I have a basic but perfectly working site.
> 
> Installing TinyMCE Helper:
> I ran:
> git submodule add https://github.com/CakeDC/TinyMCE.git app/Plugin/TinyMCE
> ...then checked out the 2.0 branch.
> I add CakePlugin::loadAll(); to Config/bootstrap.php
> Added this to my controller:
> public $helpers = array('TinyMCE.TinyMCE');
> Now going to /users results in the following:
> TinyMCE.TinyMCEHelper could not be found.
> Create the class TinyMCEHelper below in file: 
> /var/www/caketest/app/Plugin/TinyMCE/View/Helper/TinyMCEHelper.php
> Here I realised that TinyMCEHelper.php doesn't exist but TinyMceHelper.php 
> does (note capitalisation of 'MCE'). Unsure which is the correct 
> capitalisation, so:
> 
> Changed my UsersController.php to read:
> public $helpers = array('TinyMce.TinyMce');
> ...and the plugin folder's name to:
> Plugin/TinyMce
> ...suddenly no more on-screen error messages, but this in Apache's error.log:
> PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in 
> /var/www/caketest/app/Plugin/TinyMce/webroot/js/tiny_mce/tiny_mce.js on line 
> 1, referer: http://192.168.0.3/caketest/users
> PHP Stack trace:, referer: http://192.168.0.3/caketest/users
> PHP   1. {main}() /var/www/caketest/app/webroot/index.php:0, referer: 
> http://192.168.0.3/caketest/users
> PHP   2. Dispatcher->dispatch() /var/www/caketest/app/webroot/index.php:96, 
> referer: http://192.168.0.3/caketest/users
> PHP   3. Dispatcher->asset() 
> /var/www/caketest/lib/Cake/Routing/Dispatcher.php:74, referer: 
> http://192.168.0.3/caketest/users
> PHP   4. Dispatcher->_deliverAsset() 
> /var/www/caketest/lib/Cake/Routing/Dispatcher.php:293, referer: 
> http://192.168.0.3/caketest/users
> Getting lost and realising I've probably tinkered too much (but enjoying the 
> learning experience), I:
> moved Plugins/TinyMce back to Plugins/TinyMCE
> changed code in UsersController.php back to:
> public $helpers = array('TinyMCE.TinyMCE');
> ...and renamed app/Plugin/TinyMCE/View/Helper/TinyMceHelper.php back to:
> TinyMCEHelper.php
> No on-screen errors, no errors in Apache's error.log, but Firefox's developer 
> console FireBug shows:
> "NetworkError: 404 Not Found - 
> http://192.168.0.3/caketest/tiny_mce/js/tiny_mce/tiny_mce.js";
> Using Firebug to find and open that file, I find the following:
> "Missing Controller
> Error: TinyMceController could not be found."
> ...at which point I kinda give up! Not sure, after all that, if any of it was 
> particularly productive, and I know full well I could install TinyMCE 
> manually, but really wanted to get a plugin of any kind up and running, and 
> thought this one would be the simplest.
> All help gratefully appreciated.
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> [email protected] 
> (mailto:[email protected]) For more options, visit this 
> group at http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to