-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group-specific properties does not add a new record to groupprop_xx table #6011
Comments
Hi Any update on a fix for this? |
Hello, Replace this piece of code
}` |
Another great find can you please create a pull request with the changes so that I can test and release |
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 was closed because it has been stalled for 15 days with no activity. |
Hi -- in version 5.3.0 this bug seems to have reappeared, but adding the fix above to the GroupPropsEditor.php file no longer works -- it results in the error: |
Ok Let me check it
…On Thu, Jan 4, 2024 at 10:50 PM djoh2 ***@***.***> wrote:
Hi -- in version 5.3.0 this bug seems to have reappeared, but adding the
fix above to the GroupPropsEditor.php file no longer works -- it results in
the error:
This page isn't working at the moment xxx.xxx can't currently handle this
request. HTTP ERROR 500
Can you advise?
—
Reply to this email directly, view it on GitHub
<#6011 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMXIBYZT7IDNTLU5V5LHAWDYM3TWNAVCNFSM5W3NH7M2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXG42TEMJSGYZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
H.A.S
|
I have fixed the issue
Let me know on which branch do I need to commit my code
…On Sun, Jan 7, 2024 at 2:43 PM Aqib Shafique ***@***.***> wrote:
Ok Let me check it
On Thu, Jan 4, 2024 at 10:50 PM djoh2 ***@***.***> wrote:
> Hi -- in version 5.3.0 this bug seems to have reappeared, but adding the
> fix above to the GroupPropsEditor.php file no longer works -- it results in
> the error:
> This page isn't working at the moment xxx.xxx can't currently handle this
> request. HTTP ERROR 500
> Can you advise?
>
> —
> Reply to this email directly, view it on GitHub
> <#6011 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AMXIBYZT7IDNTLU5V5LHAWDYM3TWNAVCNFSM5W3NH7M2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXG42TEMJSGYZQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
--
H.A.S
--
H.A.S
|
@hafizaqibshafique please submit a pull request against the master branch :) |
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. |
@hafizaqibshafique are you still planning on contributing this fix? |
Yeah sure
Sorry I didn't commit the code as I was busy. I will upload the code
tonight
…On Sun, 11 Feb 2024, 9:28 am Arun Philip, ***@***.***> wrote:
@hafizaqibshafique <https://github.com/hafizaqibshafique> are you still
planning on contributing this fix?
—
Reply to this email directly, view it on GitHub
<#6011 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMXIBY3NMH5K4MNKG342UUDYTBCF7AVCNFSM5W3NH7M2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTG42DEMBXGE4Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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. |
@hafizaqibshafique any update? |
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. |
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. |
ChurchCRM 4.4.5.
Browser doesn't matter.
mysql Ver 15.1 Distrib 10.5.10-MariaDB, for Linux (x86_64).
AWS t2.micro instance with Amazon Linux amzn2-ami-kernel-5.10-hvm-2.0.20220406.1-x86_64-gp2
Apache/2.4.53
PHP 7.4.28
Workflow:
Explanation:
The code in GroupPropsEditor.php only does a DB UPDATE. If you added the group property definition after the person was already in the group, there is no record "automatically" added at that time. Subsequently, if you try to edit (really, add) one, it UI functions as expected for that task, but no data is written to the db because it's only doing an UPDATE. If you manually add an appropriate record to the DB and go try again, the update works fine.
I have done a temporary fix on my installation by adding in the TEMPORARY FIX lines below. This simply checks and if no row has been retrieved, it adds a row, so that the existing logic later on will always find a row to update.
`// First Pass
// we are always editing, because the record for a group member was created when they were added to the group
// Get the existing data for this group member
$sSQL = 'SELECT * FROM groupprop_'.$iGroupID.' WHERE per_ID = '.$iPersonID;
$rsPersonProps = RunQuery($sSQL);
// TEMPORARY FIX I added this "if statement, and put the existing line inside its "else" clause
if (mysqli_num_rows($rsPersonProps) == 0) {
$sSQL = 'INSERT into groupprop_'.$iGroupID.' (per_ID) values ('.$iPersonID .')';
RunQuery($sSQL);
}
else {
$aPersonProps = mysqli_fetch_array($rsPersonProps, MYSQLI_BOTH);
}`
The text was updated successfully, but these errors were encountered: