Problem creating Project from Project Template (HTTP 500 error and Tasks don't appear)

Hi everyone,

I’m struggling with an issue on my CRM where if I use the function to “Create Project” from within a Project Template, the CRM will hang for about 2 minutes then crash with a HTTP 500 error,

When it recovers, the Project has been created, but the Tasks from the template aren’t there.

The last thing I get in the log is:
[WARN] No focus from link when M2MRelationship get query. Focus was: Project

I’m not really sure how I can troubleshoot this… but here’s a few things to note;

  • I think I’m on the latest version of CRM - 7.11.18
  • I don’t have any major customisations to Projects apart from a One-Many relationship I added in Studio between Tasks and a Timesheets module I created myself.
  • A clean install of CRM on my webserver does not show the issue.
  • I think when my CRM was installed I had PHP 5.3 selected on the server, now changed to PHP 7.2. Not sure if this would cause issues?

Any advice anyone can give on troubleshooting would be appreciated.

what you have in perror.log ? default is located in the directory var/log/apache2/

Happy holidays palach, thanks for your reply.

Unsure if I can check that file easily through cPanel? I have found the following;

2020-12-25 19:11:57.739782 [INFO] [2012832] [86.0.39.161:50686-Q:614694F9943573BA-37#APVH_[website].co.uk:443] File not found [/home/[name]/public_html/403.shtml]

I guess I’ll have to ask my webhost providers unless there’s another way.

Right, finally I got around to check this error. I found it in error_log file in the CRM directory.

[16-Jan-2021 10:18:21 Europe/London] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/[name]/public_html/CRM/modules/AM_ProjectTemplates/controller.php on line 201

This line of code is something to do with setting the end date of the project task.

Thanks, Mike

And now it’s fixed.

The affected code basically is to extend Project Tasks by the duration of any closed business days (e.g. weekends). This meant it was getting data from the Business Hours module, which I had accidentally created some junk records in, which was putting this code into an infinite loop.

Moral of the Story: Business Hours module shall remain empty and hidden!

Thanks, Mike