Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem migrating from struts2 2.3 to 2.5 - Maybe struts-jquery-plugin issue #198

Open
RicardoDias19 opened this issue Mar 31, 2022 · 2 comments

Comments

@RicardoDias19
Copy link

I got a problem while using struts2 2.5.9 and struts2-jquery-plugin 4.0.3.
Actionmessages and actionErrors does not show up anymore. FieldError is displayed saying that value type for this fields (actionmessages and actionerrors) are not valid.

I read 2.5 api and nothing changed about it. addActionMessage() and addActionError() still receive a String as argument.
No exception is thrown. I do think the problem - if there is some - may be struts2-jquery-plugin 4.0.3. This jar contains jquery-2.2.4 which is a vulnerable version of jquery, and looking for something in google dev tools I got this:


  1. A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
    To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.
    Note that for performance reasons, only the first access to one of the properties is shown.

  1. Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/ .

AFFECTED RESOURCES:
jquery-2.2.4.min.js:4


  1. One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications.
    Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can add or modify the DOCTYPE to be <!DOCTYPE html> to render the page in No Quirks Mode.

AFFECTED RESOURCES:

Document in the DOM tree Mode URL
document Limited Quirks Mode http://localhost:8080/ProjXXXXX/registerCostumer.action?actionErrors=Client+already+registered.

What the server got is:
xxxxxxxxxx.action?actionErrors=No+results+for+this.+

The message passed to addActionError is ok. But it does not show, instead a fieldError.

Any idea about this? I tried to look for validations for the fields actionmessages and errormessages in the project and found nothing.
It is like some validation is going on and failed because I got the message from messages.properties for every invalid field Value:
xwork.default.invalid.fieldvalue = Invalid Value for this field {0}

@RicardoDias19
Copy link
Author

RicardoDias19 commented Apr 1, 2022

Do Struts2.5.29 and jquery-plugin 4.0.3 work together?

@jogep
Copy link
Contributor

jogep commented Aug 26, 2022

@RicardoDias19 we just released a new version compatible with latest Struts2 6.0.0. Could you please try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants