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

Upon displaying a form with errors, the session error fields variable isn't cleared #5329

Closed
luisanfe opened this issue May 11, 2023 · 19 comments
Assignees
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team gui UI related issue porting required Requires porting to develop resolved A fixed issue
Milestone

Comments

@luisanfe
Copy link

Describe the bug

When we brows to graph_view.php?action=tree from another tab we are showed the error "Action failed Sorry, we could not process your last action. Save Failed due to field input errors (Check red fields)."

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'http://url_cacti/cacti/index.php'

  2. Click on 'Graphs'

  3. See error

Expected behavior

Don't see any error message.

Screenshots

image

Desktop (please complete the following information)

  • OS: Windows 10

  • Browser Chrome, Firefox, Edge

  • Version Lastone

Additional context

The problem appeared after updating cacti from version 1.2.15 to 1.2.23 in CentOS 7 (3.10.0-1160.el7.x86_64)

@luisanfe luisanfe added bug Undesired behaviour unverified Some days we don't have a clue labels May 11, 2023
@netniV
Copy link
Member

netniV commented May 14, 2023

Please provide the steps to replicate this and any errors that appeared in your logs at the time.

@luisanfe
Copy link
Author

After logging into the application, when I click on the Graph tab, the message appears.
In the logs I don't see any special messages caused by the error.

@bmfmancini
Copy link
Member

I'm not able to replicate this
What plugins do you have installed?

@luisanfe
Copy link
Author

Plugin

@netniV
Copy link
Member

netniV commented May 29, 2023

I'm not seeing anything specific with the core of cacti that relates to this problem. Can I suggest that you disable plugins and retest? It may be worth disabling one at a time to work out which is causing you the problem.

DO NOT UNINSTALL as this will remove any plugin specific data as well as removing the plugin. If the problem persists after that, it may be then we need to look at uninstalling a plugin. One of them states you need cacti >= 1.2.24 which may also not be helping.

Finally, if you still have the issue, it may be browser plugin related as these can sometimes inject fields/values, so try a clean/incognito session.

@luisanfe
Copy link
Author

I have been disabling each of the plugins and re-enabling it. In all cases, both disabling and enabling it reproduces the error and it is reproduced in the Graph tab.

I have been disabling all the plugins one by one and the problem always occurs. With all plugins disabled the problem persists in the Graph tab.

I have done these tests from Chrome. I have opened from Firefox and Edge and the problem persist, so probably is not related with a browser plugin.

@luisanfe
Copy link
Author

Captura de pantalla 2023-05-30 112530

@luisanfe
Copy link
Author

In Console - Configuration - Users, when you click in a user the message appears too, and the same when you click in a User Group.

@TheWitness
Copy link
Member

So, the real question is when these messages start to appear, what form were you on last?

@TheWitness TheWitness changed the title graph_view.php in tree mode shows error Upon displaying a form with errors, the session error fields variable isn't cleared Jun 3, 2023
@TheWitness TheWitness added gui UI related issue confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Jun 3, 2023
@TheWitness TheWitness added this to the v1.2.25 milestone Jun 3, 2023
@TheWitness TheWitness self-assigned this Jun 3, 2023
@TheWitness
Copy link
Member

I've seen this issue. The fix is quite easy.

TheWitness added a commit that referenced this issue Jun 3, 2023
Upon displaying a form with errors, the session error fields variable isn't cleared.
@TheWitness
Copy link
Member

Should be fixed now.

@TheWitness TheWitness added the resolved A fixed issue label Jun 3, 2023
@netniV
Copy link
Member

netniV commented Jun 4, 2023

Hopefully, we are never setting that in the backend to report errors with fields after submission?

@TheWitness
Copy link
Member

No. It's all before rendering and happens as a result of the various form_input_validate() functions prior to sql_save(). So, instead of Javascript validation that we would use today, it's all about the backend validation from the past.

@TheWitness TheWitness added the porting required Requires porting to develop label Jun 4, 2023
@luisanfe
Copy link
Author

luisanfe commented Jun 5, 2023

I'm sorry but we have applied Fixing #5329 - "Form errors persist after display ..." but it hasn't solved the issue.

@TheWitness
Copy link
Member

What page is causing the initial error?

@TheWitness
Copy link
Member

You may have to log off and back on again.

netniV pushed a commit that referenced this issue Jun 12, 2023
Upon displaying a form with errors, the session error fields variable isn't cleared.
@luisanfe
Copy link
Author

Hello. Sorry for the delay. I did log off and log on but the behaviour is the same.
I updated from 1.2.15 to 1.2.23 and the fist page that showed the error was the Graphs when I click on a device to see its graphs. After that, doing what your team suggested me I saw the same error in other pages.

@luisanfe
Copy link
Author

Sorry, but it's not resolved.

@TheWitness
Copy link
Member

Update to 1.2.25 otherwise known as the 1.2.x branch. You updated two 1 release old.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team gui UI related issue porting required Requires porting to develop resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants