CRM icon indicating copy to clipboard operation
CRM copied to clipboard

Bug: Editing Family erroneously updates country information

Open DAcodedBEAT opened this issue 1 year ago • 11 comments

Description A clear and concise description of what the bug is.

  • ChurchCRM version: 5.2.0
  • PHP version is the server running: 8.2.11
  • DB Server and Version are you running: mysql

To Reproduce Steps to reproduce the behavior:

  1. Install ChurchCRM
  2. Add new user, and create family from user
  3. Go to Active Family List
  4. Edit Family
  5. Go to Active Family List
  6. See how country has been replaced with country code

Expected behavior A clear and concise description of what you expected to happen.

Always use the Country instead of the Country code.

Screenshots If applicable, add screenshots to help explain your problem.

image

DAcodedBEAT avatar Nov 11 '23 21:11 DAcodedBEAT

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 29 '23 01:12 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 30 '24 02:01 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 01 '24 02:03 github-actions[bot]

Is this still a problem? I was trying to re-create... and when you add a new person, you don't have the option to provide address info, at that time. But when you create the family, the Country (seems to default to first one, Afghanistan - rather than NULL) is populated. The only place I see the Country Code being used is in the Address list in the Active Family List. Are you just talking about where it is displayed there?

And if so, do we really want the full country name in that view, where there is not a lot of width to display a full address? The Code also shows up when viewing an individual family, in the right-hand 'Address' section.

grayeul avatar Mar 25 '24 21:03 grayeul

I've just seen something similar on the Active Family List for me, but in my case it put in the Provinces abbreviation when I manually added an address.

Screenshot 2024-04-22 at 10-51-40 ChurchCRM Active Family List

respencer avatar Apr 22 '24 08:04 respencer

Looking through the DB I see that sometimes the state has its full name, sometimes an abbreviation, and sometimes NULL -- despite a default being set. Same for country.

respencer avatar Apr 23 '24 14:04 respencer

Tried again, still can't reproduce original issue.

respencer avatar Apr 26 '24 15:04 respencer

Interestingly I've found a new bug where the Country for a family can't be changed from the default Country.

respencer avatar Apr 26 '24 15:04 respencer

And now I can't reproduce it again, weird.

respencer avatar Apr 26 '24 15:04 respencer

But now I see that something has change the phone number of one of our international members.

The number is missing the + at the front and the last digit at the end.

respencer avatar Apr 26 '24 15:04 respencer

Well whatever the issue is it appears to have changed. Now ChurchCRM consistently crashes with a 500 for me if I try to change the address from the default.

webserver-1   | 172.16.0.33 - - [03/May/2024:17:05:31 +0000] "POST /FamilyEditor.php?FamilyID=46 HTTP/1.1" 500 210 "http://localhost/FamilyEditor.php?FamilyID=46" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"

respencer avatar May 03 '24 17:05 respencer

Still trying to figure this out, but I still can't recreate it exactly as described.

In my latest attempt I consistently crashed due to a missing date string:

PHP Fatal error:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'nte_DateEntered' cannot be null in /var/www/html/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php:204
Stack trace:
#0 /var/www/html/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php(204): PDOStatement->execute()
#1 /var/www/html/ChurchCRM/model/ChurchCRM/Base/Note.php(1131): Propel\Runtime\Connection\StatementWrapper->execute()
#2 /var/www/html/ChurchCRM/model/ChurchCRM/Base/Note.php(1024): ChurchCRM\model\ChurchCRM\Base\Note->doInsert()
#3 /var/www/html/ChurchCRM/model/ChurchCRM/Base/Note.php(969): ChurchCRM\model\ChurchCRM\Base\Note->doSave()
#4 [internal function]: ChurchCRM\model\ChurchCRM\Base\Note->ChurchCRM\model\ChurchCRM\Base\{closure}()
#5 /var/www/html/vendor/propel/propel/src/Propel/Runtime/Connection/TransactionTrait.php(35): call_user_func()
#6 /var/www/html/ChurchCRM/model/ChurchCRM/Base/Note.php(960): Propel\Runtime\Connection\ConnectionWrapper->transaction()
#7 /var/www/html/ChurchCRM/model/ChurchCRM/Family.php(232): ChurchCRM\model\ChurchCRM\Base\Note->save()
#8 /var/www/html/FamilyEditor.php(420): ChurchCRM\model\ChurchCRM\Family->createTimeLineNote()
#9 {main}

Once I fixed that, I noticed that the time line didn't know who was doing the editing:

Screenshot_20240603_214122

And the address is wrong (NIM is Niger).

Going back to edit it automatically changed too:

Screenshot_20240603_214320

The address I was using to start off with:

Screen Shot 2024-06-03 at 21 45 41

Checking the database, there are multiple failures:

Screenshot_20240603_223902

respencer avatar Jun 03 '24 20:06 respencer

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 10 '24 02:08 github-actions[bot]