When having made changes to custom body - Message body - in Form handler page - email handler
then the page doesn't show the entered data, when i open the page again, unless I change between standard and back to custom body.

and second in the body once there is a display ENTER OTHER and once there is an numberlist display.

what is that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lotmatthu created an issue. See original summary.

jrockowitz’s picture

Someone else has also reported this issue but I can't duplicate.

Can you please look at the browser's JavaScript console and see if there is an error being logged?

cilefen’s picture

Title: Error ob Form handler page - email handler - custom body - message - body » Email handler custom message body cannot be seen or edited without switching to "Default" first
Issue summary: View changes
FileSize
60.1 KB
78.26 KB

There are no errors in the JavaScript console.

This is the second sub-issue about the numbered listing:

jrockowitz’s picture

Wow, I just can't duplicate this issue.

Can you please provide the steps (and browser info) required to reproduce this issue?

If possible use the Contact form or a template as the example.

cilefen’s picture

It seems to have something to do with having multiple languages installed. And in fact, on other yamlform admin UIs I am missing textarea elements and there are console errors:

It begins with a 404 on: admin/structure/yamlform/manage/sample_application/lang/en.js?t=G87E

cilefen’s picture

What I found in #5 may or may not be a separate issue. It's that lang/en.js which is evidently part of ckeditor, is loading on the wrong path. I am still trying to figure out exactly how to reproduce this issue. To be fair, I can't make the email body work properly at all at the moment.

cilefen’s picture

I can get this on a clean Drupal 8.2.1 install, this module on 8.x-1.x, without multilingual modules installed. It's Chrome 54.0.2840.71 but I don't think that matters because something is wrong in the references to JavaScript files. I think #5 may be the same problem however with this issue itself, the email body, there are no console errors.

cilefen’s picture

You are probably wondering if any CKEditor fields are working on this site, and yes, they are.

Also, Drupal is installed on a subdirectory path.

cilefen’s picture

The problem on a given YAML form settings UI is happening with JS aggregation on but not when aggregation is off. The email body weirdness happens regardless.

cilefen’s picture

I just now tested on simplytest.me on Drupal 8.2.1 with 8.x-1.x of this module and the email body issue is partly reproducible in the sense that you have to switch away from "Custom body..." and back again to edit the body.

In better news, I can now confirm that the problems on the settings page have to do with having downloaded the third party libraries for this module.

So let's keep this issue to its original purpose and I opened #2822080: Current third-party libraries break settings forms for the other thing.

jrockowitz’s picture

Steps to reproduce this issue...

  • Go to the 'Contact' form handlers (/admin/structure/yamlform/manage/contact/handlers)
  • Click 'Edit' on the first email handler, this opens a modal dialog
  • Goto the 'Body' field and select 'Custom body...'
  • Enter a custom body
  • Click 'Save', this reloads the 'Contact' form handlers.
  • Click 'Edit' on the first email handler
  • Confirm that the Custom body field is missing

Additional notes...

  • If you close the modal dialog by clicking the X and the re-click 'Edit' on first email handler, the Custom body field will appear.
  • If you right click on 'Edit' and select 'Open Link in New Tab', the Custom body field will also appear

The problem is that modal dialogs dynamically load the content's JS and CSS libraries and this can cause issues with the initialization of JS behaviors. I have seen this problem with the CKEditor and CodeMirror. (http://cgit.drupalcode.org/yamlform/tree/modules/yamlform_ui/src/YamlFor...). The fix is going to be figuring out which libraries need to be preloaded for the dialog's #states to be properly initialized. Hopefully, I just need to preload the #states library.

jrockowitz’s picture

Status: Active » Needs review
FileSize
753 bytes

For now, I am just going to copy the fix from the YamlFormUiEntityForm. If we continue to run into this issue, I will come up with a more reusable solution.

  • jrockowitz committed 622bd93 on 8.x-1.x
    Issue #2818359 by jrockowitz, lomale@bluewin.ch, cilefen: Email handler...
jrockowitz’s picture

Status: Needs review » Fixed

Sorry, it took so long to figure out the problem.

Since all the tests passed and I am familiar with this issue, I committed the patch, so please download or checkout the latest dev release to test.

cilefen’s picture

Status: Fixed » Needs work

This is not fixed for me on 8.x-1.x.

jrockowitz’s picture

I am seeing the below error message using the YAML Form 8.x-1.x branch on Simplytest.me (https://simplytest.me/project/yamlform/8.x-1.x). Simplytest.me does not have the private file system enabled (/admin/config/media/file-system).

cilefen’s picture

I think you are referencing a different issue.

jrockowitz’s picture

Duh! I am working on too many tickets at the same time.

jrockowitz’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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