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

Checkboxes in backend occasionally change states by themselves #2237

Closed
jurajkapsz opened this issue Nov 1, 2014 · 16 comments
Closed

Checkboxes in backend occasionally change states by themselves #2237

jurajkapsz opened this issue Nov 1, 2014 · 16 comments
Assignees
Milestone

Comments

@jurajkapsz
Copy link
Contributor

I keep experiencing that various checkboxes are being checked without my intervention.

For example, if I edit some section field settings, the whole section sometimes get a status to be hidden for backend menus. I am pretty sure this is not my doing, cause it happens just too often. Is spooky.

How to debug this?

Having Symphony 2.5.2 rc1

@nitriques
Copy link
Member

Do you have the ajax_checkbox extension ? What are the options of the checkbox (required or not? checked by default or not ?)

@brendo
Copy link
Member

brendo commented Nov 2, 2014

First steps to debug are trying to create a repeatable set of steps that
encounters the problem. That will allow others to jump in and see what's
happening.

Now, checkbox settings have had an upgrade in 2.5.2 thanks to new
Widget::checkbox functionality. This introduces markup of a hidden field
to hold the 'unchecked' state and the checkbox for the 'checked' state.
These fields are named identically, so if you don't tick the box, that
setting will still have some value.

Is it just the hidden section setting that appears to be affected? Or is it
all check boxes?

@jurajkapsz
Copy link
Contributor Author

Do you have the ajax_checkbox extension ? What are the options of the checkbox (required or not? checked by default or not ?)

@nitriques No, I don't. The second question was related to that extension?

First steps to debug are trying to create a repeatable set of steps that encounters the problem.

@brendo I will get back to it after a few tests.

Is it just the hidden section setting that appears to be affected? Or is it all check boxes?

Hm, not sure. I would say now mainly the hidden section attribute, 'cause with the fields I am experiencing mainly this issue with Association field.

One thing, when I've used FieldSuppressor before and I surely encountered hidding of fields, though I can not really connect it to this extension. But I don't use this extension now.

@nitriques
Copy link
Member

@jurajkapsz

The second question was related to that extension?

No, I meant the field setting of your checkbox field.

@brendo

Now, checkbox settings have had an upgrade in 2.5.2 thanks to new Widget::checkbox functionality.

If I understand correctly, only settings checkboxes uses the new widget ? Not the core checkbox field ? If so, could you please tell me why ?

@jurajkapsz
Copy link
Contributor Author

@nitriques its the usual hide section option.

screenshot from 2014-11-02 19 37 51

@nitriques
Copy link
Member

@jurajkapsz Ok and we are really talking about entries values changing randomly ? Is this a fresh install or an upgrade ? (if upgrade, from what version?)

@jurajkapsz
Copy link
Contributor Author

Well, the mentioned checkbox gets checked by itself from time to time. Its an upgrade from 2.3.6 to 2.5.2-rc1.

@nitriques
Copy link
Member

@jurajkapsz

Well, the mentioned checkbox gets checked by itself from time to time.

Is it ALL checkboxes fields, or just some ?

Its an upgrade from 2.3.6 to 2.5.2-rc1.

Humm ok... that may be the problem ... (and why a fresh install works...)

@jurajkapsz
Copy link
Contributor Author

Is it ALL checkboxes fields, or just some?

Please see #2237 (comment)

that may be the problem

Where exactly could that be?

and why a fresh install works

I still don't know when it happens, it is not by far a rule. Normally I would take it as my faulty click or so. Anyway, I am working with lot of sections, so maybe I will notice again and more precisely.

@brendo
Copy link
Member

brendo commented Nov 3, 2014

I've tested the following scenarios and are unable to reproduce:

  • New Section, Hidden Section checked => confirmed remains checked
  • New Section, Hidden Section unchecked => confirmed remains unchecked
  • Edit Section, Hidden Section checked, do nothing, save => confirm remains checked
  • Edit Section, Hidden Section checked, uncheck, save => confirm remains unchecked
  • Edit Section, Hidden Section checked, uncheck, check, uncheck, save => confirm remains unchecked
  • Edit Section, Hidden Section unchecked, check, save => confirm remains checked
  • Edit Section, Hidden Section unchecked, check, unchecked, save => confirm remains unchecked

Based of these successful tests, I am pushing through with the 2.5.2 release tonight.

@jurajkapsz
Copy link
Contributor Author

Yes, by default it is fine. 2.5.2 can be released I think for sure. Maybe it is by some extensions (I do have a lot). I am about to play a lot with section's settings so I'll check on this cause further.

@nitriques
Copy link
Member

Where exactly could that be?

The upgrade process may be at fault here...

@nilshoerrmann
Copy link
Contributor

I can confirm this issue on a clean install although I don't know how to replicate the issue yet.
It happend on a section using only core fields – no extensions installed.

@jurajkapsz
Copy link
Contributor Author

Thanks for your confirm @nilshoerrmann

I think I got it:

All of the two section options get checked when the section's save changes action returns an error for any of the included fields, e.g. a non writable upload directory, wrong regexp validation syntax etc.

@nilshoerrmann
Copy link
Contributor

@brendo: Have you been taking a lot at this? (See the latest report by @jurajkapsz.)

@brendo brendo self-assigned this Nov 30, 2014
@brendo brendo added this to the 2.6.0 milestone Nov 30, 2014
@brendo
Copy link
Member

brendo commented Nov 30, 2014

Got it ;)

@brendo brendo closed this as completed Nov 30, 2014
nitriques pushed a commit to DeuxHuitHuit/symphonycms that referenced this issue Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants