I'll start off by saying my plugin is working perfectly locally. The problem is when I upload to my server. My plugin is for a contact form. It handles the submission, and logs the entry in the db.

I have a page in the CP for it as well - this is the page that is giving me the white screen.

With devMode I am seeing this in the logs:

[error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /path-to-my-site/craft/app/controllers/TemplatesController.php:59

So I looked up that file, and to me it seems that the system can't find a template?

I don't get any errors - although when I try to submit my form, I do get a 500 error. Could it be a permissions problem?


Everything else in the entire site/app is working perfectly, so I know it's something with the plugin page.

My plugin "settings" page renders/works fine. It's when I click on the top "tab" to access my plugin's page within the CP that fails.


I'm wondering if it's a case-sensitive thing now though. I don't see that exact error in the log file anymore.

I know with CodeIgniter, locally things work great, but when I upload to my server (CentOS) I get white screens. It's because of the case is all strange.

I have followed the suggested guidelines for plugin development:

            class ContactFormController extends BaseController {...}
            class ContactFormModel extends BaseModel{...}

            class ContactFormRecord extends BaseRecord{...}

             class ContactFormService extends BaseApplicationComponent {...}


           class ContactFormVariable {...}

...and so on.

My host is Rackspace, has anyone experienced this?

  • What's the stack trace of the 500 error?
    – Brad Bell
    Aug 6, 2015 at 17:40
  • It's an ajax submit, so it's just javascript trace through jQuery. I have updated my question...I think it might be something else?
    – Damon
    Aug 6, 2015 at 17:54
  • Could be case sensitivity. Can you share the class names as well?
    – Brad Bell
    Aug 6, 2015 at 18:05
  • Hrm... that looks O.K. to me. Anything in your Apache error logs?
    – Brad Bell
    Aug 6, 2015 at 19:11

1 Answer 1


Brad, Thank you again for your help.

I found the problem, although I'm not sure of "why". In my service file, I have this line:

$email->body = craft()->templates->renderString($settings->welcomeEmailMessage, ['firstName' => $contact->firstName]);

After digging though log file(s), I found the error. "Unexpected '['"

It needed to be this:

$email->body = craft()->templates->renderString($settings->welcomeEmailMessage, array('firstName' => $contact->firstName));

Because everything was working perfectly on my local machine, (newer version of php) I wonder if that's the root cause.

  • 3
    Yup... the [] is PHP 5.4+ short array syntax. Your production box probably has PHP 5.3, which doesn't recognize it.
    – Brad Bell
    Aug 7, 2015 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.