Contract module : Not able to save

For some reasons, we are not able to save changes made in existing contract or new contract anymore. After clicking Save, the system will always go to Home page. Nothing is saved.

I cannot find any error in web server log or fatal error in SuiteCRM System Settings > Logger Settings > view log

I have also done a Quick Repair and Rebuild, but it does not help.

Any suggestion on how to debug?

Hi there,

I would suggest checking your php error log(this is stored in different areas dependent on your environment) and also setting the correct permissions.

If you can detail your environment/set up, we can recommend permissions to set.

Thanks,

Will.

Hi Will,

SuiteCRM is running on a Linux shared server. The php error log is located within the same directory as suitecrm - error_log. But I cannot find any error message for that execution time.

For a directory or file permission issue, I will usually see error messages in the apache web server error log within cPanel. But there is nothing in there after clicking the SAVE button in Contract module.

Where else can I look to for error message?

I don’t think you will find an php / sugar error, maybe a JavaScript error - which you would have to check on your browsers console if available

Have you made any modifications to SuiteCRM, Contracts or install any plug-ins?

One thing to try is to remove the custom editviewdefs.php in Contracts - {suitecrm}/custom/modules/AOS_Contracts/metadata/editviewdefs.php

maybe just rename the file and do a quick repair and rebuild and see if that makes a difference

Hi Matt,

I cannot really remember what has been done to Contract module

Here is the js error in browser console after clicking the SAVE button

Edit: I tried a few more times later, but there is no more error after clicking the SAVE button

I have also tried your suggestion, but it does not work.

We are still not able to save in Contract module. The rest of the functions in SuiteCRM are working properly.

Not sure what to do now. Should we wait for the release of version 7.2 and test again?

I am suspecting this is a bug in version 7.1.4 now.

I have tried installing a completely new 7.1.4 and not able to save in Contracts module too.

Can someone please try it in your 7.1.4 setup and confirm my finding?

Same here, unable to save contracts.

Version 7.1.4
Sugar Version 6.5.18 (Build 1110)

Opz scratch my last post, I was clicking “Create” instead of “SAVE”. Save works for me on my home FreeBSD 10 Server.

Thanks Kostov.

I have also tested at suitecrm.com demo server and another new setup at my local Windows computer running xampp. Yes, there is no problem. I can save new contract and changes made to it.

So the issue is caused by our production shared Linux server. For the production instance, the Contracts module has been used for months without problem. What I do not understand is why only Contract module is affected, even for the newly installed suitecrm test instance.

Any suggestion on how should I continue with the trouble shooting?

Just tested saving a new AOS Contract on Linux shared hosting and it works here.

If you have PHP skills or can find someone who does to help you - you should go into your php.ini on your shared server , set log_errors to on, error_log to your error file pathname, error_reporting to E_ERROR . If that still doesn’t show errors in your php error log, you add a few lines of PHP code to make Suite directly log errors in the , bypassing the built in SugarLogger, because I have found places where it does not load, just to rule out the possibility of non-instantiated SugarLogger being the reason why you’re not seeing any PHP errors (it tries to log, but SugarLogger doesn’t exist, so that fails).

Hi ChrisC,

Thanks for your test.

error_log is available within the same directory as sutiecrm. No relevant error message is found. Error_reporting is set to E_ALL & ~E_NOTICE

I am not familiar with php programming. No idea how to bypass SugarLogger. Any help will be appreciated.

Today, I upgrade our SuiteCRM from 7.1.x to 7.2.1 and re-look into this issue again.

This time, when I try to save, the following error message appears. Can anyone help?

Forbidden

You don’t have permission to access /index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

With the help from our server host, they have found the reason why Contract cannot be saved. It is due to the blocking by ModSecurity. Below is the message.


Premature end of script headers: colourSelector.php, referer: https://www.mydomain.com/suitecrm/index.php?module=AOS_Contracts&offset=2&stamp=1429148644048187900&return_module=AOS_Contracts&action=EditView&record=6fa6a42c-aa50-1c60-8a50-53956089d67c
Potentially Untrusted Web Content Detected"] [severity “CRITICAL”] [hostname “www.mydomain.com”] [uri “/suitecrm/index.php”] [unique_id “VS8T8G4ELewACE6WKfMAAAAg”


Can anyone help on what can we do to the script?