In a template (any template, EE 2.6.1) I try to add the new twitter timeline code (https://dev.twitter.com/docs/embedded-timelines) but end up with an 500 error.

This is de twitter code:

<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/the-username"  data-widget-id="MY-WIDGET-ID">Tweets by @the-username</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

When submitting the code I get an internal server error.

I tested the code, made a plain html file, uploaded via ftp, everything works perfect. I use the exact same code: copy-paste it in a template and get the internal server error.

What can I do to get this to work?

2 Answers 2


I would guess that your server has mod_security enabled, which is detecting script tags in your POST and throwing a fit.

Disabling mod_security via .htaccess doesn't always work (you may have to contact your host instead), but you can try puttig this in the .htaccess file which resides in the same directory as your admin.php file (or EE system folder):

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
  • Thank you for answering. As you wrote, disabling mod_security via .htaccess didn't work. I ended up feeding the code directly to the database.
    – okenathan
    Commented Jun 26, 2013 at 18:58

I ended up feeding the code directly to the database. I made sure to bypass the browser, which enable me to bypass the browser error.

It's really easy to bypass the browser, just enter the correct details in coda or connect to your expression engine installation via mountee.

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.