solspace / craft-freeform

Freeform for Craft: The most reliable form builder that's ready for wherever your project takes you.
https://docs.solspace.com/craft/freeform/v5/
Other
47 stars 60 forks source link

Error Accessing Submissions #1610

Open superflausch opened 15 hours ago

superflausch commented 15 hours ago

What happened?

We have an issue accessing the submissions within freeform in the controlpanel. Opening the submissions returns an empty list (for all forms) and shows the SQL error below.

This happens for different users including an admin. Not sure since when this is the case but it has to be since one of the newer updates fro Craft oder the plugin.

Any Ideas?

Errors and Stack Trace (if available)

`SQLSTATE[42000]: Syntax error
        OR access violation: 1064 You have an errOR IN your SQL syntax; check the manual that corresponds to your MariaDB server versiON fOR the right syntax to use near '[[märtwirtschaft_66]] AS [[form_9__märtwirtschaft_66]],
        `fc9`.[[märtaufbau...' at line 1 The SQL being executed was:SELECT `elements`.`id`,
        `elements`.`canonicalId`,
        `elements`.`fieldLayoutId`,
        `elements`.`uid`,
        `elements`.`enabled`,
        `elements`.`archived`,
        `elements`.`dateLastMerged`,
        `elements`.`dateCreated`,
        `elements`.`dateUpdated`,
        `elements_sites`.`id` AS `siteSettingsId`,
        `elements_sites`.`siteId`,
        `elements_sites`.`title`,
        `elements_sites`.`slug`,
        `elements_sites`.`uri`,
        `elements_sites`.`content`,
        `elements_sites`.`enabled` AS `enabledForSite`,
        freeform_submissions.`formId`,
        freeform_submissions.`userId`,
        freeform_submissions.`statusId`,
        freeform_submissions.`incrementalId`,
        freeform_submissions.`token`,
        freeform_submissions.`isSpam`,
        freeform_submissions.`ip`,
        `fc1`.`name_1` AS `form_1__name_1`,
        `fc1`.`vorname_2` AS `form_1__vorname_2`,
        `fc1`.`company_name_3` AS `form_1__company_name_3`,
        `fc1`.`email_4` AS `form_1__email_4`,
        `fc1`.`strasse_5` AS `form_1__strasse_5`,
        `fc1`.`zipcode_6` AS `form_1__zipcode_6`,
        `fc1`.`ort_7` AS `form_1__ort_7`,
        `fc1`.`telefon_8` AS `form_1__telefon_8`,
        `fc1`.`mobile_9` AS `form_1__mobile_9`,
        `fc1`.`number_10` AS `form_1__number_10`,
        `fc1`.`message_11` AS `form_1__message_11`,
        `fc1`.`verkauf_verpflegung_getrnke_12` AS `form_1__verkauf_verpflegung_getrnke_12`,
        `fc1`.`anzahl_elektrogerte_13` AS `form_1__anzahl_elektrogerte_13`,
        `fc1`.`art_der_elektrogerte_leistung_watt_14` AS `form_1__art_der_elektrogerte_leistung_watt_14`,
        `fc1`.`website_15` AS `form_1__website_15`,
        `fc5`.`name_16` AS `form_5__name_16`,
        `fc5`.`vorname_17` AS `form_5__vorname_17`,
        `fc5`.`email_18` AS `form_5__email_18`,
        `fc5`.`mobile_19` AS `form_5__mobile_19`,
        `fc5`.`name2_20` AS `form_5__name2_20`,
        `fc5`.`vorname2_21` AS `form_5__vorname2_21`,
        `fc5`.`e_mail2_22` AS `form_5__e_mail2_22`,
        `fc5`.`mobile2_23` AS `form_5__mobile2_23`,
        `fc5`.`strasse_24` AS `form_5__strasse_24`,
        `fc5`.`plz_25` AS `form_5__plz_25`,
        `fc5`.`ort_26` AS `form_5__ort_26`,
        `fc5`.`firma_27` AS `form_5__firma_27`,
        `fc5`.`mitteilung_28` AS `form_5__mitteilung_28`,
        `fc6`.`name_29` AS `form_6__name_29`,
        `fc6`.`vorname_30` AS `form_6__vorname_30`,
        `fc6`.`email_31` AS `form_6__email_31`,
        `fc6`.`mobile_32` AS `form_6__mobile_32`,
        `fc6`.`feedback_33` AS `form_6__feedback_33`,
        `fc6`.`mitteilung_34` AS `form_6__mitteilung_34`,
        `fc9`.`name_58` AS `form_9__name_58`,
        `fc9`.`vorname_59` AS `form_9__vorname_59`,
        `fc9`.`email_60` AS `form_9__email_60`,
        `fc9`.`mobile_61` AS `form_9__mobile_61`,
        `fc9`.`vorabend_wirtschaft_62` AS `form_9__vorabend_wirtschaft_62`,
        `fc9`.`vorabend_aufbau30_63` AS `form_9__vorabend_aufbau30_63`,
        `fc9`.`vorabend_aufbau31_64` AS `form_9__vorabend_aufbau31_64`,
        `fc9`.`vorabend_abbau_65` AS `form_9__vorabend_abbau_65`,
        `fc9`.[[märtwirtschaft_66]] AS [[form_9__märtwirtschaft_66]],
        `fc9`.[[märtaufbaufreitag_67]] AS [[form_9__märtaufbaufreitag_67]],
        `fc9`.[[märtaufbausamstag_68]] AS [[form_9__märtaufbausamstag_68]],
        `fc9`.[[märtabbausamstag_69]] AS [[form_9__märtabbausamstag_69]],
        `fc9`.[[märtabbausaonntag_70]] AS [[form_9__märtabbausaonntag_70]],
        `fc9`.`diverse_veranstaltungen_71` AS `form_9__diverse_veranstaltungen_71`,
        `fc9`.`mitteilung_72` AS `form_9__mitteilung_72`
    FROM (SELECT `elements`.`id` AS `elementsId`,
        `elements_sites`.`id` AS `siteSettingsId`
    FROM `elements` `elements`
INNER JOIN `freeform_submissions` `freeform_submissions`
    ON `freeform_submissions`.`id` = `elements`.`id`
INNER JOIN `freeform_statuses` `sub_freeform_statuses`
    ON sub_freeform_statuses.`id` = freeform_submissions.`statusId`
LEFT JOIN `freeform_submissions_anmeldung_advntmrt_1` `fc1`
    ON `fc1`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_anmeldung_mitgliedschaft_5` `fc5`
    ON `fc5`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_feedbackformular_6` `fc6`
    ON `fc6`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_helfer_9` `fc9`
    ON `fc9`.`id` = `freeform_submissions`.`id`
INNER JOIN `elements_sites` `elements_sites`
    ON `elements_sites`.`elementId` = `elements`.`id`
    WHERE (freeform_submissions.`formId` IN (1, 5, 6, 7, 8, 9))
        AND (freeform_submissions.`isSpam`=FALSE)
        AND (`elements`.`archived`=FALSE)
        AND (`elements`.`dateDeleted` IS NULL)
        AND (`elements`.`draftId` IS NULL)
        AND (`elements`.`revisionId` IS NULL)
ORDER BY  freeform_submissions.`dateCreated` DESC LIMIT 100) `subquery`
INNER JOIN `elements` `elements`
    ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites`
    ON `elements_sites`.`id` = `subquery`.`siteSettingsId`
INNER JOIN `freeform_submissions` `freeform_submissions`
    ON `freeform_submissions`.`id` = `subquery`.`elementsId`
INNER JOIN `freeform_forms` `freeform_forms`
    ON freeform_forms.`id` = freeform_submissions.`formId`
INNER JOIN `freeform_statuses` `freeform_statuses`
    ON freeform_statuses.`id` = freeform_submissions.`statusId`
LEFT JOIN `freeform_submissions_anmeldung_advntmrt_1` `fc1`
    ON `fc1`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_anmeldung_mitgliedschaft_5` `fc5`
    ON `fc5`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_feedbackformular_6` `fc6`
    ON `fc6`.`id` = `freeform_submissions`.`id`
LEFT JOIN `freeform_submissions_helfer_9` `fc9`
    ON `fc9`.`id` = `freeform_submissions`.`id`
ORDER BY  freeform_submissions.`dateCreated` DESC`

How can we reproduce this?

  1. Access the freeform submissions page (all of them)

Environment

When did this issue start?

After upgrading from older Freeform version, After upgrading from older Craft version

kjmartens commented 7 hours ago

Sorry for the trouble you're experiencing @superflausch.

We'll have a developer check into it shortly. In the meantime, are you able to send us a copy of your complete database to support@solspace.com and reference this issue? We will attempt to load your DB locally and investigate what might be causing the issue. 🙂