Field in custom module doesn't save

Hello community,

My Tech information

Sugar PRO 7.7.1.2 Onsite

PHP Version 5.6.24-0+deb8u1

  1. We create a simple custom package with a normal module inside
  2. We try to add or modifiy a field
  3. We save it
  4. Nothing field is not modify or create.

What we inspect :

  1. Directory 755 and 644 is ok
  2. File /custom/modulebuilder/packages/{package}/modules/{module}/vardefs.php was saved (timestamp change when we save), but no change inside...
  3. When we debug in sugar.log we see what we want to modify (populate with the value)
  4. When we add manually some field in vardefs.php, it's ok in module builder we saw the field.

We don't understand where is the bug. Have you some idea ?

Best regards

Fred

  • Hi Fred, 

    Can you check or share if you see any Fatal errors in the Apache Error log on the server?

    From the symptoms this still sounds like a permission issue, so even with 755 / 644 it could be that the directory and files are not owned by the apache user. You can change that with the chown command, here an example if the user and group is apache and you're in the Sugar directory ( Apache user might be different in your environment):

    sudo chown -R apache:apache *

    Let me know if that was the case. 


    Thanks,

    Dennis

  • Hi Dennis,

    Thank you for answering.

    No error at all in apache_error.log

    We verify this point too the user and group are correct. As we say the vardefs.php was saved (timestamp change when we save).

    The label and relation in custom module are saved and fully functionnal too. Only the field (modify and create don't  work).

    Very strange bug...

    Best regards

    Fred

  • We try to delete vardefs.php, we modifiy a field, we save the module and the file saved with field modification.

    We try to modify again a field and... don't save.

    ...

  • Hi ERIC FOLZER,

    May be it's permission issue? Once you will try folder permission 777 and try it.

  • Hi,

    As i say it's not a permission issue because file was saved (timestamp change after change in sugar) and when you delete it, the file was created.

    Thank you anyway 

  • Answer to myself...

    OPCACHE !!! 

    When i disable OPCACHE (opcache.enable=0) in php.ini (cgi) It work.

    Be carefful with native opc cache in php !!!

  • Hi Eric,

    We have had the same problem, and it has been solved by changing the directive opcache as you say.

    By the way, what is the fact that sugarcrm module builder does not alter the changes with this directive enabled?

    Do you know the reason?

    On the other hand, opcache is functioning to everyone. Is it possible that the error is caused by one of the different settings that opcache allows?

    Does anyone know how we can find an answer to this?

    Thanks!