Skip to content

Method redrawControl() doesn't work in Nette 2.2 (in some cases) #1498

Description

@janreges

After upgrade to Nette 2.2, method redrawControl() doesn't work as expected in some our projects.

When i have simple snippet, which is invalidated by signal, it works great.

When i have form in snippet "myForm" and form is sent by ajaxSubmit(), form is successfully processed with inserted "thank you message", but $this->redrawControl('myForm'); doesn't work. Ajax response body is whole HTML page with empty JSON after HTML, instead of JSON only.

With enabled output buffering by ob_start(), response looks like:

...
</body>
</html>
{"state":[]}

With disabled output buffering, error below occurs (whole HTML is sent ahead of JSON, which is trying to set json header):

Cannot send header after HTTP headers have been sent

See also: http://forum.nette.org/cs/17836-cannot-send-header-after-http-ajaxovy-pozadavek

Do you have any ideas? Before upgrade to Nette 2.2 it worked perfectly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions