Jump to:

1136 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Broken External Links - Not your average "Error Saving Content" error after upgrading

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1090 Views
  • quamsta
    Avatar
    Community Member
    29 Posts

    Broken External Links - Not your average "Error Saving Content" error after upgrading Link to this post

    I upgraded a site to RC2 from 2.3.7 a while back and Saving/Publishing content seemed to worked fine. When 2.4.0 final came out, things still worked great. Yesterday however for whatever reason, my custom HTMLText/HTMLEditor fields appear to reject any content that contains an external link in it.

    Whenever I attempt to save and publish content with external links, I get the red Error Saving Content message, and the response headers from FireBug are just baffling. I simply get a 404 response from http://mysite.mysubdomain.mydomain.net/admin/EditForm with a fully-dressed HTML Error page as content that corrupts the CMS. Without the external links, http://mysite.mysubdomain.mydomain.net/admin/EditForm is fine and my content gets saved and published.

    My content is also saved and published in the default "Content" field perfectly fine even if I have an external link in it.

    I went mad trying to solve this, and originally thought it was some externally-linked images I had in my custom fields, but I narrowed it down to just having any sort of valid internet protocol inside my custom HTML content fields. If I simply input "http://" or "ftp://" (or even gopher://, I shit you not) in the fields, I can't save the content. invalid protocols allow me to Save and Publish fine. "blah://", for example.

    This is a relatively small site and my Page.php looks like this:

    class Page extends SiteTree {
    static $defaults = array(
    );
    static $db = array(
    "Content2" =>"HTMLText"
    );
    static $has_one = array(
    );
    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('Content2));
    return $fields;
    }
    }

  • quamsta
    Avatar
    Community Member
    29 Posts

    Re: Broken External Links - Not your average "Error Saving Content" error after upgrading Link to this post

    Okay, this was due to my host enabling SecFilterScanPOST in Apache's mod_security module without telling me. X_X Not SilverStripe's fault at all!

    1090 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.