rmbinder / Mitgliedsbeitrag

Plugin Mitgliedsbeitrag für die Online-Mitgliederverwaltung Admidio
GNU General Public License v2.0
7 stars 3 forks source link

create "Fälligkeitsdatum" #123

Closed ebmaManu closed 1 year ago

ebmaManu commented 1 year ago

Hi,

while create "Fälligkeitsdatum", the following page is only white. My server wrote the following error massage.

"AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function fetch() on bool in [...] /admidio/adm_plugins/membership_fee/common_function.php:366 Stack trace:

0 [...] / admidio/adm_plugins/membership_fee/duedates.php(185): list_members()

1 {main}

thrown in [...] /admidio/adm_plugins/membership_fee/common_function.php on line 366', referer: [...] /adm_plugins/membership_fee/membership_fee.php "

I printed the sql query which cause this error:

SELECT DISTINCT mem_usr_id , .usd_value AS '71', .usd_value AS '70', .usd_value AS '68', LAST_NAME.usd_value AS '1', FIRST_NAME.usd_value AS '2', BIRTHDAY.usd_value AS '10' FROM lkt_members LEFT JOIN lkt_user_data AS ON .usd_usr_id = mem_usr_id AND .usd_usf_id = 0 LEFT JOIN lkt_user_data AS ON .usd_usr_id = mem_usr_id AND .usd_usf_id = 0 LEFT JOIN lkt_user_data AS ON .usd_usr_id = mem_usr_id AND .usd_usf_id = 0 LEFT JOIN lkt_user_data AS LAST_NAME ON LAST_NAME.usd_usr_id = mem_usr_id AND LAST_NAME.usd_usf_id = 1 LEFT JOIN lkt_user_data AS FIRST_NAME ON FIRST_NAME.usd_usr_id = mem_usr_id AND FIRST_NAME.usd_usf_id = 2 LEFT JOIN lkt_user_data AS BIRTHDAY ON BIRTHDAY.usd_usr_id = mem_usr_id AND BIRTHDAY.usd_usf_id = 10 WHERE mem_usr_id IN (SELECT DISTINCT mem_usr_id FROM lkt_members, lkt_roles, lkt_categories WHERE mem_begin <= '2023-01-23' AND mem_end >= '2023-01-23' AND mem_rol_id = rol_id AND rol_valid = 1 AND rol_cat_id = cat_id AND ( cat_org_id = 1 OR cat_org_id IS NULL ) ) AND mem_usr_id IN (SELECT DISTINCT usr_id FROM lkt_users LEFT JOIN lkt_user_data AS mandateid ON mandateid.usd_usr_id = usr_id AND mandateid.usd_usf_id = 29 LEFT JOIN lkt_user_data AS mandatedate ON mandatedate.usd_usr_id = usr_id AND mandatedate.usd_usf_id = 30 LEFT JOIN lkt_user_data AS duedate ON duedate.usd_usr_id = usr_id AND duedate.usd_usf_id = 76 LEFT JOIN lkt_user_data AS paid ON paid.usd_usr_id = usr_id AND paid.usd_usf_id = 72 LEFT JOIN lkt_user_data AS fee ON fee.usd_usr_id = usr_id AND fee.usd_usf_id = 73 LEFT JOIN lkt_user_data AS iban ON iban.usd_usr_id = usr_id AND iban.usd_usf_id = 32 LEFT JOIN lkt_members AS mem ON mem.mem_begin <= '2023-01-23' AND mem.mem_end > '2023-01-23' AND mem.mem_usr_id = usr_id WHERE paid.usd_value IS NULL AND fee.usd_value IS NOT NULL AND iban.usd_value IS NOT NULL AND mandatedate.usd_value IS NOT NULL AND mandateid.usd_value IS NOT NULL ) ORDER BY mem_usr_id ASC

With this sql string the my sql server wrotes:

"Statische Analyse: 3 Fehler wurden während der Analyse gefunden. Ein Alias wurde erwartet. (near " " at position 216) Ein Alias wurde erwartet. (near " " at position 291) Ein Alias wurde erwartet. (near " " at position 366) "

My versions are: plugin: 5.1.6 Admidio: 4.1.19. - updated more times from (2.x to 3.x, last from 4.1.5), maybe there is something wrong?

rmbinder commented 1 year ago

This bug should have been fixed a long time ago. Unfortunately, with a new installation, the role IDs of certain profile fields cannot be read out during setup. This leads to the white screen. Please check whether everything is assigned in Preferences - View definitions (Einstellungen - Ansichtsdefinitionen) under Column selection. A content must be specified for each column.

ebmaManu commented 1 year ago

Do you mean "Listenkonfiguration"? "Einstellungen - Ansichtsdefinitionen" I cant find. In every configuration is set a content - but there isn't a config called "Beitragszahlungen". Maybe this cause the error?

rmbinder commented 1 year ago
ebmaManu commented 1 year ago

Thanks a lot. I looked in the right near export and options. My fault.

A added a content for every ansichtsdefinition, but problem is still there.

rmbinder commented 1 year ago

Did you also press "Speichern" in the view definitions?

ebmaManu commented 1 year ago

Yes I did. Now I have installed a new one and replaced all field in my "buggy" installation with the of the new one. Now the fields are equal. And suddenly the "Fälligkeit" works. It seems that the issue was in the wrong order of the required fields.

Thanks for you fast answer.