You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Felix Gonschorek (JIRA)" <ji...@apache.org> on 2012/05/29 11:46:23 UTC

[jira] [Created] (TAP5-1941) Alerts component should check for XHR request in "dismiss" event handler

Felix Gonschorek created TAP5-1941:
--------------------------------------

             Summary: Alerts component should check for XHR request in "dismiss" event handler
                 Key: TAP5-1941
                 URL: https://issues.apache.org/jira/browse/TAP5-1941
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3.3
            Reporter: Felix Gonschorek
            Priority: Minor


The Alerts component does not check for request.isXHR() in the "onDismiss" event handler. 

Crawlers (Googlebot) send non-xhr requests to the "onDismiss" event-url and generate errors on my server, because the returned JSONObject is not a valid return value from an event handler.

org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. 

A check for request.isXHR() and a conditional return value (null for non-ajax requests, the json object for ajax requests) should fix this.

thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1941) Alerts component should check for XHR request in "dismiss" event handler

Posted by "Jan Mynařík (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470307#comment-13470307 ] 

Jan Mynařík commented on TAP5-1941:
-----------------------------------

The same applies to tree component.
                
> Alerts component should check for XHR request in "dismiss" event handler
> ------------------------------------------------------------------------
>
>                 Key: TAP5-1941
>                 URL: https://issues.apache.org/jira/browse/TAP5-1941
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Felix Gonschorek
>            Priority: Minor
>
> The Alerts component does not check for request.isXHR() in the "onDismiss" event handler. 
> Crawlers (Googlebot) send non-xhr requests to the "onDismiss" event-url and generate errors on my server, because the returned JSONObject is not a valid return value from an event handler.
> org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. 
> A check for request.isXHR() and a conditional return value (null for non-ajax requests, the json object for ajax requests) should fix this.
> thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TAP5-1941) Alerts component should check for XHR request in "dismiss" event handler

Posted by "Jan Mynařík (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470307#comment-13470307 ] 

Jan Mynařík commented on TAP5-1941:
-----------------------------------

The same applies to tree component.
                
> Alerts component should check for XHR request in "dismiss" event handler
> ------------------------------------------------------------------------
>
>                 Key: TAP5-1941
>                 URL: https://issues.apache.org/jira/browse/TAP5-1941
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Felix Gonschorek
>            Priority: Minor
>
> The Alerts component does not check for request.isXHR() in the "onDismiss" event handler. 
> Crawlers (Googlebot) send non-xhr requests to the "onDismiss" event-url and generate errors on my server, because the returned JSONObject is not a valid return value from an event handler.
> org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. 
> A check for request.isXHR() and a conditional return value (null for non-ajax requests, the json object for ajax requests) should fix this.
> thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira