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

Text and images are not always saved by the first nor the second try. And you need to clear or delete/refresh the component & upload the image again or copy the text until it does save it. #240

Closed
mrzapp opened this issue Nov 8, 2018 · 6 comments
Assignees
Projects

Comments

@mrzapp
Copy link
Member

mrzapp commented Nov 8, 2018

No description provided.

@mrzapp mrzapp created this issue from a note in v1.1 (To do) Nov 8, 2018
@mrzapp mrzapp assigned mrzapp and milesleif and unassigned mrzapp Nov 8, 2018
@mrzapp
Copy link
Member Author

mrzapp commented Nov 8, 2018

@milesleif @silend I'll try to reproduce it, but please let me know if/when it happens again and how

@milesleif
Copy link
Contributor

@mrzapp of course. We will shortly start another project and I will try to recreate the issue and give step-by-step description how to reproduce it.

@mrzapp
Copy link
Member Author

mrzapp commented Nov 16, 2018

@milesleif Cool, keep the JavaScript console open too, there might be something worth reading there :)

@milesleif milesleif moved this from To do to In progress in v1.1 Feb 19, 2019
@milesleif
Copy link
Contributor

@mrzapp I was able to reproduce it:

prerequisites

  • Hashbrown version 1.1
  • Content Base schema which organizes field base schemas in a component-like manner
"fields": {
        "properties": {
            "components": {
                "label": "Components",
                "schemaId": "array",
                "tabId": "content",
                "config": {
                    "allowedSchemas": ['the-field-base-schema-below']
                }
          }
     }
}
  • Field Base schema which makes use of of the ArrayEditor for managing richTexts and is configured to have at least one item
    "config": {
        "struct": {},
        "allowedSchemas": ["richText"],
        "minItems": "1",
        "maxItems": "3"
    }

reproduction

  1. add a content page with the Content Base schema mentioned above
  2. save
  3. add a component with the mentioned field based schema
  4. type something into the one richText editor that is displayed by default (due to the config of 1 min item)
  5. save
  6. see your text not being saved

workaround
After step 3 remove the by-default-given richtText-Editor with click on the x top right. Type the content into the immediately re-appearing richtText-Editor. Save. Text is now saved.

observations

Unfortunately there is nothing in the browser console. But we can see that in the json data the value for the Content Base schema remains null until we use the workaround.

conclusions

It seems like the actual data is "blind" for the by-default-given richtText-editor when used in the context of ArrayEditor configured with at least one min-item. The tree in the json is created but it's not reflecting the then created input mask (which is, in this case, a richText-Editor).

save-the-text

@milesleif milesleif assigned mrzapp and unassigned milesleif Feb 19, 2019
@mrzapp
Copy link
Member Author

mrzapp commented Feb 19, 2019

@milesleif that's some class A detective work, my friend!

It's probably an event listener that's not hooked up in that specific case. I'll look into it.

@mrzapp mrzapp closed this as completed in a1085f3 Feb 19, 2019
v1.1 automation moved this from In progress to Test Feb 19, 2019
@mrzapp
Copy link
Member Author

mrzapp commented Feb 19, 2019

I'm pretty sure I fixed it, it was caused by the entire array (the field editor value) being null, so the changes weren't saved.

The field editor did have a sanity check which cleared this up, but it didn't send the "silentchange" event when it applied the check.

@mrzapp mrzapp assigned milesleif and silend and unassigned mrzapp and milesleif Feb 19, 2019
@milesleif milesleif moved this from Test to Done in v1.1 Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v1.1
  
Done
Development

No branches or pull requests

3 participants