Announcement

Collapse
No announcement yet.

New entity removed custom fields

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

  • New entity removed custom fields

    Hi guys,

    Today I created a new entity called Assets to store customer computer hardware assets in, I linked it to the cases entity on a one-to-many link. After having setup the fields etc. I noticed that my custom fields and custom entries in existing fields for the cases entity had disappeared so I have lost data because of it. So the question is was it something I did or was it a bug? I would like to get to the bottom of the cause as I'm now worried about being able to make further customisations. By the way this was all done through the web GUI, no direct coding.

    Many thanks
    Gareth

  • #2
    Hi again guys, a quick update on this.. Having looked in the cases table using phpmyadmin I can see that the missing fields are still in the database and still contain the data. So the question is how do I get the web UI to display that data again? I'm not sure about the missing custom entries in the default fields, case status for example, because I don't know where they are stored.

    I meant to put in my first post that I am using Espo 4.2.7 and running it on Ubuntu Server 16.04.1 with Apache 2.4.18 and MySQL 5.7.16 also PHP 7.0.8.

    I'm really loving using Espo and would love to work out why this happened and how to fix it so if anyone can help it would be very much appreciated.

    Many thanks

    Comment


    • #3
      Hi
      is it possible, that you have conflict with field names? Check also log files (apache end espo)

      Comment


      • #4
        Hi Tanya, thanks for your reply.
        I have had a look at the logs and can't see anything relevant in the Apache log and there only the following entries in the espo log for yesterday which based on their time stamps don't appear to match up either. I was working on this yesterday afternoon so nowhere near the time stamps in the log.

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionCreate($params, $data) should be compatible with Espo\Core\Controllers\Record::actionCreate($params , $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionCreate($params , $data) should be compatible with Espo\\Core\\Controllers\\Record::actionCreate($par ams, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionUpdate($params, $data) should be compatible with Espo\Core\Controllers\Record::actionUpdate($params , $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionUpdate($params , $data) should be compatible with Espo\\Core\\Controllers\\Record::actionUpdate($par ams, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionListLinked($para ms, $data) should be compatible with Espo\Core\Controllers\Record::actionListLinked($pa rams, $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionListLinked($pa rams, $data) should be compatible with Espo\\Core\\Controllers\\Record::actionListLinked( $params, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionMassUpdate($para ms, $data) should be compatible with Espo\Core\Controllers\Record::actionMassUpdate($pa rams, $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionMassUpdate($pa rams, $data) should be compatible with Espo\\Core\\Controllers\\Record::actionMassUpdate( $params, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionCreateLink($para ms, $data) should be compatible with Espo\Core\Controllers\Record::actionCreateLink($pa rams, $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionCreateLink($pa rams, $data) should be compatible with Espo\\Core\\Controllers\\Record::actionCreateLink( $params, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        [2016-11-24 22:14:57] Espo.WARNING: E_WARNING: Declaration of Espo\Controllers\AuthToken::actionRemoveLink($para ms, $data) should be compatible with Espo\Core\Controllers\Record::actionRemoveLink($pa rams, $data, $request) {"code":2,"message":"Declaration of Espo\\Controllers\\AuthToken::actionRemoveLink($pa rams, $data) should be compatible with Espo\\Core\\Controllers\\Record::actionRemoveLink( $params, $data, $request)","file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php","line":34,"context":{"file":"/var/www/html/crm/application/Espo/Controllers/AuthToken.php"}} []

        So from what I can tell none of this helps, the other issue is how to get the custom fields (in this case in the cases table) to show again in the cases web UI. I have tried just recreating them in the entity manager with the same field names but that doesn't work.

        Many thanks

        Comment


        • #5
          Case field is empty or absent? As I understand, some fields you used before aren't shown in Entity Manager and on layouts as well?

          Comment


          • #6
            It was two custom fields that I had added to the cases entity and some custom entries I added to the status and type fields in the cases entity. The two fields I added still showed up in the entity manager but when I open a case form instead of the fields showing data all it showed was the field name in square brackets e.g. [invoicedtime]. I can see the data for those fields still exists in the cases table but I can't get it to show the data again..

            i hope that's makes sense.

            Comment


            • #7
              Can you attach these files?
              custom/Espo/Custom/Resources/metadata/entityDefs/Case.json
              custom/Espo/Custom/Resources/layouts/{allFiles}
              custom/Espo/Custom/Resources/i18n/en_US/Case.json
              It can be really helpful

              Comment


              • #8
                I was just about to look at attaching those files when I got looking at the missing fields again and I have managed to fix the problem. The fields in the database are called 'invoicenumber' and 'invoicedtime' and when I was adding the fields back in entity manager they ended up being called 'invoiceNumber' and invoicedTime'. It suddenly occurred to me that Linux is case sensitive pretty much everywhere so I wonder if that is the issue, so I changed the field names in entity manager to be all lower case and it worked! The fields are displaying data again..

                So problem solved. But I'm still concerned as to why it happened in the first place when all I was doing was adding a new base entity and some linked fields to the cases entity, can you think of any reason why it might have happened?

                Many thanks for all your help.

                Comment


                • #9
                  may be incorrect field name, set in form. The best practice is to use camel case style (firstSecondThird....)
                  You're welcome

                  Comment


                  • #10
                    Ok thanks, I will keep an eye on the field names when making further changes..

                    Comment


                    • #11
                      Hello again, I'm sorry to bring this thread back up but I have had a similar thing happen again and I'm sure I haven't used any conflicting field names.Yesterday I created another new base entity (after upgrading to version 4.3) called Networks, so I now have three customer entities which are Assets, Licenses and Networks. What happened this time was the Many-to-One relationship I had between Account-Assets and Account-License have now disappeared. But the odd thing is that I am still able to add accounts to Assets and Licenses records, and the in both field lists for Assets and Licenses the Account field is still shown as a link type but doesn't show in the respective relationships list. The other odd thing is that Assets and Licenses are still showing the Account Layout in the relationship panels section but they aren't showing up when I actually view an account any more.

                      I can't find any other mentions of anything like this and yet the fact that its happened twice now with varying results shows this is an issue somewhere but I just can't see where the problem is or if its something that I am doing wrong. So please if anyone help track this down I would be very grateful.

                      Many thanks...

                      Comment


                      • #12
                        Hello....very weird and again I can't reproduce it....
                        Could you attach "{ESPO_PATH}/custom/Espo/Custom/Resources/metadata/entityDefs", please? (I need only Account, Asset, License, and Network json files)

                        Comment


                        • #13
                          Hi tanya, sure I have attached a zip file with the files in as the forum wouldn't let me attach them separately.

                          Many thanks.
                          Attached Files

                          Comment


                          • #14
                            No idea, why does the file override.
                            There is a fix (replace /custom/Espo/Custom/Resources/metadata/entityDefs/Account.json). We will try to catch this bug...
                            Attached Files

                            Comment


                            • #15
                              Many thanks tanya, that has fixed the problem. I hope you can find this bug, if you need anything from me to help you catch it then please let me know. In the mean time if I have to create any more entities or relationships I will keep a close eye on it.

                              Thanks again.

                              Comment

                              Working...
                              X