šŸ”“ January 2024 Alert: Forum support inactive!
New forum registration are currently closed.
Use GitHub discussions
.

    UVdesk

    • Login
    • Search
    • Recent

    Solved Html entities in the database.

    Technical Help
    3
    21
    2249
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sanjeev
      Sanjeev developer UVdesk Staff last edited by

      @theochvas said in Html entities in the database.:

      Uncaught ReferenceError: sfTinyMce is not defined
      at 409:4210

      As tinymce is used here with many function so it will create an issue. you can check all file and instead of getting value through tinymce use simple testarea value.

      1 Reply Last reply Reply Quote 0
      • peopleinside
        peopleinside EX helping member @theochvas last edited by

        @theochvas what steps do you follow for see an error in UI?
        When you say edit ticket what steps you follow to edit a ticket?
        I tried to edit a ticket as admin but i get no error.

        You cannot edit ticket messages in a ticket, you can maybe only edit the initial ticket created, right?

        Also what version of database are you using?
        I discovered with another open source app that when I migrated from Mysql 5.7 to MAriaDB I resolved issues on importing a backup of that opensource... before I had always an issue on exportation so maybe are you sure the issue is not maybe ... the database app used?

        šŸ’¬ You can also ask help on GitHub Discussions
        šŸ”“ I am no more active on Uvdesk
        šŸ”“ Forum support is inactive!

        T 1 Reply Last reply Reply Quote 0
        • Topic has been marked as solved  peopleinside peopleinside 
        • T
          theochvas @peopleinside last edited by theochvas

          @peopleinside I click on 'Edit Ticket', the modal appears, but the Update button does nothing & i get the error in the browser console.
          Same for leaving a reply: The 'Reply' button does nothing & i get the error.

          The db is MySQL 8.0.24

          peopleinside 2 Replies Last reply Reply Quote 0
          • peopleinside
            peopleinside EX helping member @theochvas last edited by

            @theochvas I am unable to reproduce on the latest version and with the edit suggested in the previous developer reply.

            Can you try to reproduce in a new test instance of UVdesk?

            šŸ’¬ You can also ask help on GitHub Discussions
            šŸ”“ I am no more active on Uvdesk
            šŸ”“ Forum support is inactive!

            1 Reply Last reply Reply Quote 0
            • peopleinside
              peopleinside EX helping member @theochvas last edited by

              @theochvas The error is resolved if you revert back edits suggested from the developer?
              Maybe you are having issue for a not fully correct resume of your existing install? Is restored from a database import?

              šŸ’¬ You can also ask help on GitHub Discussions
              šŸ”“ I am no more active on Uvdesk
              šŸ”“ Forum support is inactive!

              T 1 Reply Last reply Reply Quote 0
              • T
                theochvas @peopleinside last edited by

                @peopleinside

                The error is resolved if you revert back edits suggested from the developer?

                Yes.

                Maybe you are having issue for a not fully correct resume of your existing install? Is restored from a database import?

                Sorry, i'm not sure what you mean here. The installation is 1.0.18 done through the web installation wizard.

                peopleinside 1 Reply Last reply Reply Quote 0
                • peopleinside
                  peopleinside EX helping member @theochvas last edited by

                  @theochvas I understand why I was not able to reproduce: I replaced the file with the suggested file instead of delete the suggested line.

                  In your initial message you said:

                  When an agent enters greek text in the html editor in the ticket message field, the text is saved as html entities in the db (& Omicron;& Nu;& Omicron;& Mu;& Alpha; etc...).
                  This causes a problem when we want to export the data directly from the mysql.

                  You are having an issue in the database export if in the ticket there is a Greek text?
                  Greek is the language? The issue you are facing is only with that language I suppose?

                  Once the database exported if you import again you are so unable to restore correctly the ticket system? This question to understand if you are reporting an issue on exporting database so in backup correctly UVdesk for a future resume.

                  Why you export the database, for backup purpose?

                  šŸ’¬ You can also ask help on GitHub Discussions
                  šŸ”“ I am no more active on Uvdesk
                  šŸ”“ Forum support is inactive!

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    theochvas @peopleinside last edited by

                    @peopleinside Yes, the problem is with greek text when entered in the html-editor.
                    I have not tried to import the backup to the db,
                    The export made is for reporting and backup of the tickets.

                    The 'message' field in the 'Create New Ticket' modal is plain text instead of tinyMCE, can i maybe alter the 'message' field code in the 'Edit Ticket' & 'Reply to ticket' Forms to also not load the tinyMCE editor?

                    Thank you for your time.

                    peopleinside 1 Reply Last reply Reply Quote 0
                    • peopleinside
                      peopleinside EX helping member @theochvas last edited by

                      @theochvas with greek text you mean Greek language?

                      Sorry if I ask but English is not my primary language and I may have some difficulty in understanding . I suppose is the Grek language, i don't know that language as I use Italian and English.

                      I have not tried to import the backup to the db,
                      The export made is for reporting and backup of the tickets.

                      Umh if the scope is the backup I suggest to simply made a try to backup than resume, maybe in a duplicate instance of test, the backup. If the backup is resumed correctly, ticket are showed correctly I think you should not worry how the database is exported.

                      The 'message' field in the 'Create New Ticket' modal is plain text instead of tinyMCE

                      n a last update of UVdesk a text editor has been added in visitor side but also on operator side. This has been done because with the normal text field the formatting of text was not respected in email and ticket as well. See this issue: https://github.com/uvdesk/community-skeleton/issues/510 so introducing a text editor is an improvement.

                      Maybe you still have a version that has not yet last GitHub edits but you may have on next update.. so if you have not a text editor on operator ticket creation, a future update will add it.

                      can i maybe alter the 'message' field code in the 'Edit Ticket' & 'Reply to ticket' Forms to also not load the tinyMCE editor?

                      I don't know, I'm not a programmer but only an passionate UVdesk user that try to help in free time.

                      I suggest to understand if you have a real problem or if your requests is a customization that can be maybe possible with the free Open Source and the free support.
                      If you found a real issue for all, for example if you see that is not possible restore correctly tickets from a backup.. in this case I think the UVdesk staff can and should look into this because maybe all users that will have UVdesk with Greek language text can have the same issue. Be able to backup and resume is essential.

                      Have an exported database well readable is less important... database is a storage file that should be work for resume a backup that should resume all in UI without errors.
                      This is my point of view.

                      šŸ’¬ You can also ask help on GitHub Discussions
                      šŸ”“ I am no more active on Uvdesk
                      šŸ”“ Forum support is inactive!

                      T 1 Reply Last reply Reply Quote 0
                      • Sanjeev
                        Sanjeev developer UVdesk Staff last edited by

                        @theochvas

                        Editor will always save the same text you write it over along with all your space and other changes you have done to make a proper format.

                        So whenever you will take it from db you will get all data save in db normally we parse html data and only show the data.

                        If there is any issue specifically for your language then you can raise an issue on github with all steps and words you are using.

                        1 Reply Last reply Reply Quote 0
                        • T
                          theochvas @peopleinside last edited by

                          @peopleinside
                          Hi and thank you both for the time you spend on my problem.
                          I managed to find a solution by editing the initialization of tinyMCE in ticket.html.twig & savedReplyForm.html.twig
                          I added the lines

                          sfTinyMce.init({
                          ...
                                entity_encoding: "raw",
                                forced_root_block : "",
                          ...
                          

                          and now the greek text is saved as readable text in the db.

                          Cheers!

                          peopleinside 1 Reply Last reply Reply Quote 0
                          • Sanjeev
                            Sanjeev developer UVdesk Staff last edited by

                            @theochvas

                            Glad to know it resolved your issue.

                            1 Reply Last reply Reply Quote 0
                            • peopleinside
                              peopleinside EX helping member @theochvas last edited by

                              @theochvas glad you resolved!
                              Congrats and thanks for your message and for sharing the solution that worked for you! 😊

                              šŸ’¬ You can also ask help on GitHub Discussions
                              šŸ”“ I am no more active on Uvdesk
                              šŸ”“ Forum support is inactive!

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post