Comments (8)
I think I understand what you're describing, but a screen shot would be really helpful; are you able to attach an example of the unwanted behaviour to this case?
from crm.
Screen shot attached -- This replicates across family and person views. I have updated to latest version and it persists. You can see i added an X to a surname to show replication.
Thanks!
from crm.
Hi. I have done some digging here: Both my dev and live sites and databases are up to date. My dev site works fine, my live site returns some person records twice. When I connected the dev site to the live database the person records are also returned twice... I have checked the database records and there is only one record in person_per. This seems specific to me, but can you advise on a fix -- maybe how to have fresh installation without losing data, or where in database error might be?
from crm.
I've found sometimes, when working with different version of ChurchCRM or different installations, flushing the browser cache can resolve a lot of "weirdness". If you're using any network-side caching for your site (Cloudflare etc) I suggest purging that too after flushing your browser cache. Also double-check your database permissions of both sites - I've seen some hosting providers implement services in odd ways that don't play nice with ChurchCRM.
from crm.
I have resolved the issue with the getPeopleSorted() function. The issue was that the function was merging three different arrays ($familyMembersParents, $familyMembersChildren, and $familyMembersOther) into a single array using array_merge(). However, if any of these arrays contained duplicate entries, they would be preserved in the merged array, resulting in duplicate entries being displayed in the table.
To prevent duplicate entries, I have modified the getPeopleSorted() function to remove any duplicates before returning the sorted array. Here is the updated version of the function, which uses the array_unique() function to remove duplicates:
`public function getPeopleSorted() {
$familyMembersParents = array_merge($this->getHeadPeople(), $this->getSpousePeople());
$familyMembersChildren = $this->getChildPeople();
$familyMembersOther = $this->getOtherPeople();
$allFamilyMembers = array_merge($familyMembersParents, $familyMembersChildren, $familyMembersOther);
$uniqueFamilyMembers = array_unique($allFamilyMembers);
return $uniqueFamilyMembers;
}`
Filelocation: ChurchCRM/model/ChurchCRM/Family.php
from crm.
Good find, can you create a pull request and I'll test and release in the next release
from crm.
Good find, can you create a pull request and I'll test and release in the next release
Sure
from crm.
Ya this code had a bug that is fixed in 5.0.0
from crm.
Related Issues (20)
- Bug: ChurchCRM doesn't play nice with NGINX Cache HOT 1
- Security Bug: SELF XSS - Event Editor
- .
- Security Bug: Reflected XSS - Event Attendance
- Security Bug: SQL Injecton - Event Editor
- 6) Bug: SQL Injection 3
- Security Bug: SQL injections on Financial Reports
- Security Bug: SQL Injection Confirmation Report
- Feature request: Disassociate address fields from language/locale
- Feature request: Option to add "States" in DB HOT 9
- Feature request: Please stop using "language" flags HOT 1
- Bug: Can't make kiosk assignment in KioskManager.php
- Multiple ChurchCRM issues HOT 1
- Bug: Initial setup does not work if ChurchCRM not at root of website
- Feature request: Harmonise icons to make more sense HOT 6
- Bug: CSVImport fails when importing birthdate, if not all records have birthdate.
- Bug: Correct Minor (but annoying) Typo in Photo.php
- Bug: Provide better checks and error reporting if Photo dirs are not writeable HOT 1
- Remove usage of Flot and replace with Chart.js HOT 1
- 5.6.0 Install Comment (Not a bug or issue) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crm.