question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any wizard panel update breaks builder in version > 4.7.8 [BUG]

See original GitHub issue

Environment

  • Hosting type
    • [ x] Local deployment
      • Version:
  • Formio.js version: 4.9.0-beta.2 - 4.8.0
  • Frontend framework: NodeJS
  • Browser: Chrome
  • Browser version: 79.0.3945.130

Steps to Reproduce

  1. Create new wizard with text input, radio input, etc
  2. Edit on any child element and its event data will reflect the changes
  3. Edit the parent panel and no changes are reflected in the event data
  4. Any changes made to a panel itself do not persist. If I change the panel title, it is only reflected in the builder while I remain on that panel. Moving from one panel to the next will reveal the changes in the builder do not persist.
  5. On any attempt to change any settings in a top level panel, the builder breaks silently and I can no longer add any child elements. Child elements will show in builder only, not persist and not be reflected in data…

DEMO

Expected behavior

One should be able to change a panel attribute such as title Editing a panel should not break ability to build out the form.

Observed behavior

Any edits to a panel attribute, property etc. break builder. Rolling back to formio.js 4.7.8 corrects these issues

Note

I am using the code style shown here where the builder is passed in from then(builder …). I believe using the factory method in FormBuilder.js

Formio.builder(document.getElementById('builder'), {}, {...})
.then(function(builder) {
  builder.on('saveComponent', function() {
    ...
  });
});

I do not have an explanation why version 4.8.1 works here other than maybe slightly different instantiation method of builder and form render. Here the builder is a global returned by new Formio.FormBuilder

var builder = new Formio.FormBuilder(...)
builder.instance.on('saveComponent', onBuild);
builder.instance.on('editComponent', onBuild);
builder.instance.ready.then(onReady);

Please elaborate on the correct style of creating the builder if indeed this is the issue. I do see that when using the factory method for creating a new builder there is no builder.instance.form, there is only builder.form Thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
gorjupleoncommented, Mar 2, 2020

@jhen1422 @gregbown Had the same issue, but I found a workaround solution:

builder.on('saveComponent', () => builder.schema);

As long as the builder.schema getter is called on the change or saveComponent event, even if nothing is done with it, it seems to update the panel normally. I assume the getter does something that changes the behaviour, but I didn’t dig into the source code any further.

0reactions
gregbowncommented, Jun 13, 2020

@travist This is fixed with 4.10.2. Thank you! Panel changes no longer break form in wizard mode. Also, calling schema getter is no longer needed and the infinite loop is also fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BlocksmithXR Release Notes
A quick patch release fixing some issues introduced with the graphics improvements ... Fixed: Cave of Dogs experience broken on WebGL Builder on...
Read more >
Extra Theme Changelog | WP Zone - Divi Space
Fixed bug where backup exists popup shows every time when opening Theme Builder. Fixed Replace Existing Content option in Layouts Library.
Read more >
BaseCamp Updates & Downloads - Garmin
Updates & Downloads. BaseCamp software version 4.7.4. as of May 19, 2021. Download (61.43 MB). View installation instructions. Notes: System Requirements:
Read more >
Divi Update Status | Elegant Themes Help Center
No critical issues reported. January 13th, 2021. Version 4.8. BUG (FIXED) - Errors on existing modules with builder animations off.
Read more >
Divi Changelog (Browse Latest Features & Bug Fixes)
Quickly jump to any Divi version: ... Fixed a bug that was causing Theme Builder Templates to be deleted unintentionally. ... epanel/css/panel.css
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found