Jump to:

22977 Posts in 11494 Topics by 2825 members

General Questions

SilverStripe Forums » General Questions » addHeader memberprofiles

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 485 Views
  • nicanor
    Community Member
    15 Posts

    addHeader memberprofiles Link to this post

    I set with

    $this->response->addHeader("Content-Type", "text/html");

    the Content-Type in my Page.php

    with ajax request i load some other sites, wich give back just some inner_Html, but also as sites in silverstripe BE.

    I have integrated memberprofiles and changed the Login form with

    Object::useCustomClass('MemberLoginForm', 'CustomLoginForm');

    in my config file. Everything works fine. But when put the add Header line in my Page.php i got the error

    Fatal error: Call to a member function addHeader() on a non-object in /home/mm/public_html/proj/mysite/code/Page.php on line 57

    when i try to reach mysite/Security/login

    When i comment the line everythings fine.

    i need to put this line in Page.php. I tried it former to but it above in php's in Layout. But since i got the requests with ajax it's nescessary in page.php



  • igorbi
    Community Member
    3 Posts

    Re: addHeader memberprofiles Link to this post

    Have almost identical issue when trying to set:

    $this->response->addHeader('X-Frame-Options', 'SAMEORIGIN');

    in controller (init method). It shows white screen when accessing login form, otherwise it is working (when accessing pages as anonymous visitor).

    Same response from apache: Call to a member function addHeader() on a non-object ...

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.