First, thank you for this Module.

I got a Problem with the added UI Form Builder.
When trying to add an Element to the Form, the Ajax Loader spins but nothing is loaded.
Adding a Wizard Page is working.
Adding Elements to the Wizard Page fails as well.
Tested this also in a clean install with the same result.

Comments

SoYeah created an issue. See original summary.

jrockowitz’s picture

I will absolutely look into this issue.

If you have a second free can you confirm this issue is also happening using simplytest.me. It would help to know if this truly module is broken or it is broken when installed with another contrib module.

Btw. Please make sure to clear your cache.

jrockowitz’s picture

I am seeing the below error message in the JavaScript console but it is not completely showstopping to the dialogs.

TypeError: Cannot convert undefined or null to object
/core/misc/machine-name.js?v=8.1.4-dev:92:14 Object.attach()
/core/misc/drupal.js?v=8.1.4-dev:168:24 Object.Drupal.attachBehaviors()
/core/misc/drupal.js?v=8.1.4-dev:178:33
/core/assets/vendor/domready/ready.min.js?v=1.0.8:4:381 HTMLDocument.t()

What browser and Drupal version are you using?

  • jrockowitz committed cb6b7c5 on 8.x-1.x
    Issue #2755725: UI adding Elements not possible.
    
jrockowitz’s picture

I committed a simple fix to 8.x-1.x which will be available via the 8.x-1.x-dev release.

Please test it ASAP, so that I can push a new working release.

Thanks for reporting this issue.

SoYeah’s picture

I am using Drupal 8.1.3
Browser Tests with
Safari 9.1 and FF 47

will try it on simpletest and reply then

jrockowitz’s picture

Yeh, I am using Chrome which can be more forgiving of JS errors, which is why I missed the error.

SoYeah’s picture

I tried the 8.x-1.0-beta5+5-dev on my hosting and on simpletest with standard install.
The error is still there.

Maybe this helps?
Fatal error: Unsupported operand types in /home/rric8/www/modules/yamlform/modules/yamlform_ui/src/Controller/YamlFormUiElementController.php on line 74

Thanks for your fast reply, if it works it will be awesome easy form building.

jrockowitz’s picture

The error message is very helpful. I still can't replicate the issue locally or on simplytest.me.

The error is indicating that the YamlFormElements are not fully loading, which is really strange.

For reference, here is the file that is associated with the error. http://cgit.drupalcode.org/yamlform/tree/modules/yamlform_ui/src/Control...

I am hoping someone else can replicate this issue.

SoYeah’s picture

I just got the idea to switch it to the standard language (en) - my other testings where with German Settings.
Everything works fine, if I delete the translation of the example forms (wich are added on install), fields can be added through the UI.

Maybe this should be fixed for users in other languages than en/us.

  • jrockowitz committed 8e722cf on 8.x-1.x
    Issue #2755725 by SoYeah: UI adding Elements not possible. ' --author="...
jrockowitz’s picture

@SoYeah, That was the issue!!!

I am only testing things in English, which is not usually a problem but these few lines of code were not being properly translated.

I committed a fix and gave you commit credit for helping me find and resolve this major bug.

Please review.

SoYeah’s picture

Status: Active » Fixed

@jrockowitz
Works like expected! Thank you!

One thing to know, maybe to be written in the read me:
If one will install the module with 2 (or maybe more) languages enabled, you will need to delete translations of example forms to add elements to them.
If you create a new form, then the hint is given on the translation page.

jrockowitz’s picture

I created the below ticket to address the translation issue.

#2755883: Improve Translations handling and documentation.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.