-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
Checkbox displays wrong value directly after saving, db = ok #4997
Comments
Ping @rarila: My guess is that this is a quirk where the fields are 'reset' after saving. Could you look into this? |
@bobdenotter will check that later. Just as a reminder changing that on that line from v3 is another story… |
Thanks! Fixed in 2.2.19-pl1, already put on clients website, and works like a charm. :) |
👍 |
Still broken in 2.2.19-pl1. Reloading a page is now working, but just pressing "save" still does reset the checkbox. |
@ToBe998: Have you done a hard-refresh and/or cleared your browser's cache? |
Tested in Chrome 49 even uncached.
|
Error? What error does it give? |
No sorry. The error i meant is "The checkbox state is unchecked but should be checked" . |
@ToBe998 I can't reproduce this.. My CT:
Setting them is reflected in the frontend.. for example: Then, changing them: (and saving, and reloading too) So, i don't see an issue with this.. Are you sure you're up to date with your Bolt version? |
The error happens when you click "Save" without reloading the page. The checkbox state is changed to "unchecked" but stored correctly. So a real page refresh shows the correct state, but just changing to "checked" and clicking "Save" changes it back to "unchecked". |
@ToBe998: Sorry mate, still can't reproduce. (or am not understanding you correctly..) See this short video: |
Very strange. That video shows exactly my case but works. I'll try to get more info for reproduction. But yes at this time, i cant see enough evidence to reopen this ticket. Damn! ;) |
Short summary of my current state:
Still same error. A click on save (not reloading the page) sets all checkboxes to "unchecked" no matter what state they had on last reload. Bolt 2.2.19-pl1 and 2.2.20 |
@ToBe998 I did some more testing, on MySQL and PHP 5.3 and 5.6, and in all cases it works as expected. So, i still cannot reproduce the issue you're having. |
@bobdenotter can you give me some hints on the javascript function that executes the ajax request on save and the part that set's checkbox states. Maybe i can debug that issue myself then and hopefully provide some more insights. |
The logic that is being applied in editcontent.js:298 is perfectly fine. The problem is that if the bolt.min.js is being updated, you will need to copy that file to you Solution:
@bobdenotter What is the intended workflow to keep those two folders in sync? Best, |
@rossgardt: IIRC those files should be auto-copied/updated when updating bolt... But as @bobdenotter is on vacation ( 😄 ) the real explanation might take a little while unless someone else has a good explanation? |
That is correct, @SahAssar. When Bolt detects a version change it will sync the If you install via-archive or |
The project was originally installed via |
Ah, cool. OK, well this is the "magic" required in the root "scripts": {
"post-install-cmd": [
"Bolt\\Composer\\ScriptHandler::installAssets"
],
"post-update-cmd": [
"Bolt\\Composer\\ScriptHandler::installAssets"
],
"post-create-project-cmd": [
"Bolt\\Composer\\ScriptHandler::configureProject",
"Bolt\\Composer\\ScriptHandler::installThemesAndFiles",
"nut extensions:setup"
]
}, |
This seems to be the problem for our Bolt 3 instances, but it looks like the bolt2 composer.json does not provide such a hook, right? This is same file in the bolt 2.2 repo:
The Bolt 2.2 ScriptHandler has a |
That is correct. It was added in 3.0-dev to try and get the behaviour consistent and predictable across all install types. |
PRed an update to docs bolt/docs#430 |
Hi, some odd behaviour with the checkbox in 2.2.19. This occurred after the fix in #4869
Steps to reproduce:
(other way around is no problem:
)
The text was updated successfully, but these errors were encountered: