• Hi

    I’m trying to migrate this script to a wordpress template page but it breaks the page and nothing loads from where the script starts. I believe I need to remove the CakePHP controller. I’ve not really used cakephp and I’m not sure if this is the correct place to post but thought someone may have experience migrating cakephp scripts to wordpress. If anyone can help me convert this to a standalone php script/wp plugin that would be very helpful

    http://pastebin.com/1ST44Zci

    Thanks
    Stefan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    It appears if you try to remove the controller, you would face a rewrite from scratch. You need to resolve the references such as FrontController class and Configure class. It all appears to be valid PHP, so there shouldn’t be much translation.

    While this stuff could reside on a template page, it really belongs in a child theme or plugin. The template would simply instantiate the class then use the send() method.

    I don’t know anything of CakePHP, this is just how things appear to me as having some WP & PHP knowledge.

    Thread Starter Stefan

    (@stefan83)

    Hi bcworkz

    Thanks for your reply. Are you able to provide some advise on how to resolve the FrontController and Configure Class references?

    Thanks

    Moderator bcworkz

    (@bcworkz)

    Not sure really. As a guess, try locating the source code for the referenced class definitions and then require_once() copies of those files from your main script file. Review the source for other back references, this sort of thing can go back through several layers. Good luck.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Migrate cakephp script to WordPress’ is closed to new replies.