Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
336 stars 131 forks source link

Member "change history" generates warning #1516

Closed Rvice closed 1 year ago

Rvice commented 1 year ago

Describe the bug Updating from 4.2.12 to 4.2.13 resulted in an error when reviewing the change history in the members area.

To Reproduce Steps to reproduce the behavior:

  1. Go to "Members"
  2. Click on "Change History" button
  3. Observe header notice (the is the local path on the Linux machine that is hosting the site)

    Notice: Undefined index: on in <serverRoot>/admidio/adm_program/system/classes/ProfileFields.php on line 301
    
    Warning: Cannot modify header information - headers already sent by (output started at 
    <serverRoot>/admidio/adm_program/system/classes/ProfileFields.php:301) in 
    <serverRoot>/admidio/adm_program/system/classes/HtmlPage.php on line 410

Expected behavior I expect not to see this warning/notice

Screenshots

System (please complete the following information):

Additional context

Fasse commented 1 year ago

I could not reproduce that error. This is not because of the update.

Could it be that you have changed or deleted a value of a DropDown or RadioButton field within the profile field configuration?

Fasse commented 1 year ago

We will now show "Deleted entry" if there was an entry assigned that is now deleted.

Rvice commented 1 year ago

That resolved the error. Looks like "Deleted entry" is now showing as the new value of Marital Status and the previous value was blank... I believe in this case, the previous value was Married. Then the person created an account that "wiped out" marital status.

I tried testing this, but couldn't succeed.

Is there a way to see what the value was in the history? Or why it would result in the "deleted entry"?

Rvice commented 1 year ago

I think I found the issue. I've crashed Playground with this user profile:

https://www.admidio.org/playground/adm_program/modules/profile/profile.php?user_uuid=565ca2dd-4618-4cba-9ce2-4865f50abed9

Note, I added "marital status" and there's a value I put in as "N/A"

I then had it set to default to N/A. Note, on initial setup of Marital STatus, it did not allow default of N/A, but editing after it did.

When I registered the user, I did not set a value. As a result, it would default to N/A.

I assume this is an issue of the '/' character in the values.