Announcement

Collapse
No announcement yet.

HTML text field shows undefined when not editing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • yuri
    replied
    Thank you

    Leave a comment:


  • panuweb
    replied
    Hello

    I found the solution to the error. I reported the problem on GitHub.

    They have to change line 113 of the client/src/views/fields/wysiwyg.js file

    PHP Code:
     var body this.model.get('body'); 

    to

    PHP Code:
     var body this.model.get(this.name); 

    Greetings!

    Leave a comment:


  • alasdaircr
    replied
    DB contains the same HTML code as an email template which works.

    I'll have a wee look at the entity setup or the views,

    Leave a comment:


  • yuri
    replied
    What is stored in DB?

    Leave a comment:


  • alasdaircr
    replied
    Yep I've been looking in there.

    I reckon the problem is somewhere else, given that the field works for two other entities.

    I'll keep looking

    Leave a comment:


  • yuri
    replied
    Can't reproduce it. I beleive need to dig here: file https://github.com/espocrm/espocrm/b...lds/wysiwyg.js

    Leave a comment:


  • alasdaircr
    replied
    I'm not creating these records, they are populated with HTML by a service (but shouldn't be different to body content from received emails).

    Undefined is shown in Detail mode when I view the record. While Editing the description, the HTML is rendered along with the summernote buttons.

    Leave a comment:


  • yuri
    replied
    Undefined is shown in Detail mode after you create the record with empty description ?

    Leave a comment:


  • alasdaircr
    replied
    No that didn't fix it

    Leave a comment:


  • yuri
    replied
    Weird. As a workaround try to set 'default' value as an empty string.

    Leave a comment:


  • HTML text field shows undefined when not editing

    I've created a field to hold HTML content, similar to emails.

    Code:
    {
        "fields": {
            ..snip..
            "description": {
                "type": "text",
                "view": "Fields.Wysiwyg"
            }
        }
    }
    And then populated the field with valid HTML content. When editing the content is shown correctly (see screenshot).


    However, by default the content is shown as 'undefined'.

    Any clues?
Working...
X