Field return to "null" after saving

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piedpulse
    Member
    • Oct 2017
    • 60

    Field return to "null" after saving

    it started with changing property field (floorcount field in realestateproperty) to "hidden" (https://forum.espocrm.com/forum/gene...5-hidden-field). After, thanks to tanya, i solved this problem.

    But now the field can't save values. When i try to insert a value, after saving, it returns to null.

    I activated the debug mode and here's the error, if you can help me:

    Code:
    [2018-07-18 08:26:02] Espo.NOTICE: E_NOTICE: Undefined index: customWhere {"code":8,"message":"Undefined index: customWhere","file":"G:\\xampp\\htdocs\\domus\\application\\Espo\\Modules\\RealEstate\\Services\\RealEstateProperty.php","line":84,"context":{"id":"5b49c5adec52ac645","params":{"where":null,"offset":"0","maxSize":"5","asc":false,"sortBy":"createdAt","q":null,"textFilter":null,"select":["name","status","contactId","contactName","fromPrice","toPrice"]},"customOrder":false,"entity":"[object] (Espo\\Modules\\RealEstate\\Entities\\RealEstateProperty: {\"id\":\"5b49c5adec52ac645\",\"fields\":{\"id\":{\"dbType\":\"varchar\",\"len\":24,\"type\":\"id\"},\"name\":{\"type\":\"varchar\",\"len\":255},\"deleted\":{\"type\":\"bool\",\"default\":false},\"description\":{\"type\":\"text\"},\"createdAt\":{\"type\":\"datetime\",\"notNull\":false},\"modifiedAt\":{\"type\":\"datetime\",\"notNull\":false},\"type\":{\"type\":\"varchar\",\"default\":\"Apartment\",\"len\":255},\"addressMap\":{\"type\":\"map\",\"notExportable\":true,\"notStorable\":true},\"status\":{\"type\":\"varchar\",\"default\":\"In Process\",\"len\":255},\"number\":{\"type\":\"int\",\"autoincrement\":true,\"unique\":true,\"len\":11},\"square\":{\"type\":\"float\",\"notNull\":false},\"yearBuilt\":{\"type\":\"int\",\"len\":11},\"requestType\":{\"type\":\"varchar\",\"default\":\"Rent\",\"len\":255},\"price\":{\"type\":\"float\",\"orderBy\":\"priceConverted {direction}\"},\"bedroomCount\":{\"type\":\"int\",\"len\":11},\"bathroomCount\":{\"type\":\"int\",\"len\":11},\"floor\":{\"type\":\"int\",\"len\":11},\"floorCount\":{\"type\":\"int\",\"default\":\"1\",\"len\":11},\"interestDegree\":{\"type\":\"int\",\"notStorable\":true,\"len\":11},\"rifagenzia\":{\"type\":\"varchar\",\"len\":255},\"renditaCatastale\":{\"type\":\"float\",\"orderBy\":\"renditaCatastaleConverted {direction}\"},\"renditaCatastaleBox\":{\"type\":\"float\",\"orderBy\":\"renditaCatastaleBoxConverted {direction}\"},\"renditaCatastalepertinenzadue\":{\"type\":\"float\",\"orderBy\":\"renditaCatastalepertinenzadueConverted {direction}\"},\"balconeTerrazzo\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"mqBalconeTerrazzo\":{\"type\":\"int\",\"len\":11},\"postoAuto\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"descrizionepostoAuto\":{\"type\":\"varchar\",\"default\":\"\",\"len\":255},\"riscaldamento\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"descrizioneRiscaldamento\":{\"type\":\"varchar\",\"default\":\"\",\"len\":255},\"ascensore\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"condizionatore\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"descrizioneCondizionatore\":{\"type\":\"varchar\",\"default\":\"\",\"len\":255},\"acqua\":{\"type\":\"varchar\",\"default\":\"\",\"len\":255},\"speseCondominialiMensili\":{\"type\":\"float\",\"orderBy\":\"speseCondominialiMensiliConverted {direction}\"},\"amministratoreCondominio\":{\"type\":\"text\"},\"statoImpianti\":{\"type\":\"text\"},\"note\":{\"type\":\"text\"},\"classeEnergetica\":{\"type\":\"varchar\",\"default\":\"\",\"len\":255},\"dettaglioClasseEnergetica\":{\"type\":\"text\"},\"speseNotaio\":{\"type\":\"float\",\"default\":\"1600\",\"orderBy\":\"speseNotaioConverted {direction}\"},\"totaleSpesePrimaCasa\":{\"type\":\"float\",\"orderBy\":\"totaleSpesePrimaCasaConverted {direction}\"},\"totaleSpeseSecondaCasa\":{\"type\":\"float\",\"orderBy\":\"totaleSpeseSecondaCasaConverted {direction}\"},\"notaBene\":{\"type\":\"text\",\"default\":\"N.B. Sono escluse tutte le spese relative ad un eventruale mutuo: spese di istruttoria, perizia, atto notarile in quanto dipendono dagli importi richiesti e dalla banca. Per vedere una rata tipica del mutuo e le spese associate (variabili da banca a banca) consultare: www.mutuionline.it\"},\"idDatabase\":{\"type\":\"varchar\",\"len\":36,\"notNull\":false,\"unique\":false},\"impostaRegistroPrimaCasa\":{\"type\":\"float\",\"orderBy\":\"impostaRegistroPrimaCasaConverted {direction}\"},\"impostaRegistroSecondaCasa\":{\"type\":\"float\",\"orderBy\":\"impostaRegistroSecondaCasaConverted {direction}\"},\"giardinoPrivato\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"mqGiardinoPrivato\":{\"type\":\"int\",\"len\":11},\"documentiIdentita\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"totaleRenditaCatastale\":{\"type\":\"float\",\"orderBy\":\"totaleRenditaCatastaleConverted {direction}\"},\"percentualeAgenzia\":{\"type\":\"float\",\"orderBy\":\"percentualeAgenziaConverted {direction}\"},\"annoRistrutt\":{\"type\":\"varchar\",\"len\":255},\"attenzione\":{\"type\":\"text\",\"default\":\"N.B. Sono escluse tutte le spese relative ad un eventruale mutuo: spese di istruttoria, perizia, atto notarile in quanto dipendono dagli importi richiesti e dalla banca. Per vedere una rata tipica del mutuo e le spese associate (variabili da banca a banca) consultare: <a href=\\\"http://www.mutuionline.it\\\" target=\\\"_blank\\\">www.mutuionline.it</a>\"},\"imuInCasoDiSecondaCasa\":{\"type\":\"float\",\"orderBy\":\"imuInCasoDiSecondaCasaConverted {direction}\"},\"tempiCons\":{\"type\":\"varchar\",\"len\":255},\"ok\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"zona\":{\"type\":\"varchar\",\"len\":255},\"notePerVisionarlo\":{\"type\":\"text\"},\"affittoConRiscatto\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"esclusivaDiVendita\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"scadenzaEsclusivaDiVendita\":{\"type\":\"date\",\"notNull\":false},\"cartelloVendesi\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"condizioniImmobile\":{\"type\":\"varchar\",\"default\":\"Nuovo\",\"len\":255},\"dataUltimoContattoProprietario\":{\"type\":\"date\",\"notNull\":false},\"comunicazioniProprietarioEUltimoContatto\":{\"type\":\"text\"},\"aliquotaAgenzia\":{\"type\":\"float\",\"notNull\":false},\"statoDiAvanzamentoRTI\":{\"type\":\"text\"},\"attoAcquisto\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"successioni\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"catastoPlanimetrinaEVisura\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"concessioni\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"condoniESanatorie\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"relazioneTecnicaIntegrata\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"aPE\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"certificazioniImpianti\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"speseCondominialiEDelibere\":{\"type\":\"bool\",\"notNull\":true,\"default\":false},\"documentiMutuo\":{........................................................

    Code is too long, i paste only the first part
  • piedpulse
    Member
    • Oct 2017
    • 60

    #2
    Please, anyone can help me?

    Thanks

    Comment

    • tanya
      Senior Member
      • Jun 2014
      • 4308

      #3
      attach entityDefs of your entity, please

      Comment

      • piedpulse
        Member
        • Oct 2017
        • 60

        #4
        Thanks, here's a zip with the two files espo.zip

        Comment

        • piedpulse
          Member
          • Oct 2017
          • 60

          #5
          Tanya i think is a bug, i tried to install a new local version of Espo 5.34 with Real Estate 1.21 and after 1.24.
          In all situation the field "FloorCount" starts in hidden status, after i set it visible but when i insert a value it returns to none.
          So if this info can be useful for you...

          Comment

          • yuri
            Member
            • Mar 2014
            • 8627

            #6
            It's not a bug! You did a customization making the field visible but you din't customized backend. See application\Espo\Modules\RealEstate\Repositories\R ealEstateProperty.php file. Floor Count is nulled if the type is not appropriate. Customize it in the custom dir.
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • piedpulse
              Member
              • Oct 2017
              • 60

              #7
              Originally posted by yurikuzn
              It's not a bug! You did a customization making the field visible but you din't customized backend. See application\Espo\Modules\RealEstate\Repositories\R ealEstateProperty.php file. Floor Count is nulled if the type is not appropriate. Customize it in the custom dir.
              Ok thank you, is not a bug, but why this field is hidden by default?

              how can i change "none" parameter in RealEstateProperty.php? And the same issue is for floor?

              Anyway can you help me? How i must set custom dir?

              thank you again
              Last edited by piedpulse; 07-20-2018, 06:41 AM.

              Comment

              • yuri
                Member
                • Mar 2014
                • 8627

                #8
                You can find information in documentation or on this forum. Sorry, I'm don't have time.

                It's planned to make a fields matching configurable in a single place in the future.
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • piedpulse
                  Member
                  • Oct 2017
                  • 60

                  #9
                  Originally posted by yurikuzn
                  You can find information in documentation or on this forum. Sorry, I'm don't have time.

                  It's planned to make a fields matching configurable in a single place in the future.
                  Thank you
                  it's very important for me only to know how can change the none parameter in RealEstateProperty.php, only this voice and stop.

                  I understand you have no time but i'm in a big problem for this field

                  thank you

                  Comment

                  Working...