CRM
CRM copied to clipboard
Bug: Editing Family erroneously updates country information
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:
- Install ChurchCRM
- Add new user, and create family from user
- Go to Active Family List
- Edit Family
- Go to Active Family List
- 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.
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.
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.
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.
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.
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.
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.
Tried again, still can't reproduce original issue.
Interestingly I've found a new bug where the Country for a family can't be changed from the default Country.
And now I can't reproduce it again, weird.
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.
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"
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:
And the address is wrong (NIM is Niger).
Going back to edit it automatically changed too:
The address I was using to start off with:
Checking the database, there are multiple failures:
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.