e-spin/form-newsletter-bundle

Column 'pid' in where clause is ambiguous

Closed this issue · 1 comments

JoT2 commented

Contao Version 4.9.20
e-spin/form-newsletter-bundle 1.0.2
terminal42/contao-leads 1.4.20
terminal42/notification_center 1.6.1

Das Abschicken eines NL-Anmelde-Formulars führt zu einem Fehler:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'pid' in where clause is ambiguous

Der Query:

HTTP 500 Internal Server Error
An exception occurred while executing 'SELECT tl_form_field.*, j1.`id` AS newsletter_email__id, j1.`pid` AS newsletter_email__pid, j1.`sorting` AS newsletter_email__sorting, j1.`tstamp` AS newsletter_email__tstamp, j1.`type` AS newsletter_email__type, j1.`label` AS newsletter_email__label, j1.`name` AS newsletter_email__name, j1.`text` AS newsletter_email__text, j1.`html` AS newsletter_email__html, j1.`options` AS newsletter_email__options, j1.`mandatory` AS newsletter_email__mandatory, j1.`rgxp` AS newsletter_email__rgxp, j1.`placeholder` AS newsletter_email__placeholder, j1.`minlength` AS newsletter_email__minlength, j1.`maxlength` AS newsletter_email__maxlength, j1.`minval` AS newsletter_email__minval, j1.`maxval` AS newsletter_email__maxval, j1.`step` AS newsletter_email__step, j1.`size` AS newsletter_email__size, j1.`multiple` AS newsletter_email__multiple, j1.`mSize` AS newsletter_email__mSize, j1.`extensions` AS newsletter_email__extensions, j1.`storeFile` AS newsletter_email__storeFile, j1.`uploadFolder` AS newsletter_email__uploadFolder, j1.`useHomeDir` AS newsletter_email__useHomeDir, j1.`doNotOverwrite` AS newsletter_email__doNotOverwrite, j1.`class` AS newsletter_email__class, j1.`value` AS newsletter_email__value, j1.`accesskey` AS newsletter_email__accesskey, j1.`tabindex` AS newsletter_email__tabindex, j1.`fSize` AS newsletter_email__fSize, j1.`customTpl` AS newsletter_email__customTpl, j1.`slabel` AS newsletter_email__slabel, j1.`imageSubmit` AS newsletter_email__imageSubmit, j1.`singleSRC` AS newsletter_email__singleSRC, j1.`invisible` AS newsletter_email__invisible, j1.`rsce_data` AS newsletter_email__rsce_data, j1.`isConditionalFormField` AS newsletter_email__isConditionalFormField, j1.`conditionalFormFieldCondition` AS newsletter_email__conditionalFormFieldCondition, j1.`isGallery` AS newsletter_email__isGallery, j1.`maxConnections` AS newsletter_email__maxConnections, j1.`chunking` AS newsletter_email__chunking, j1.`chunkSize` AS newsletter_email__chunkSize, j1.`concurrent` AS newsletter_email__concurrent, j1.`addToDbafs` AS newsletter_email__addToDbafs, j1.`uploadButtonLabel` AS newsletter_email__uploadButtonLabel, j1.`maxWidth` AS newsletter_email__maxWidth, j1.`maxHeight` AS newsletter_email__maxHeight, j1.`newsletter_email` AS newsletter_email__newsletter_email, j1.`newsletter_channels` AS newsletter_email__newsletter_channels, j1.`newsletter_hideChannels` AS newsletter_email__newsletter_hideChannels, j1.`newsletter_jumpTo` AS newsletter_email__newsletter_jumpTo, j1.`newsletter_confirmation` AS newsletter_email__newsletter_confirmation, j1.`newsletter_subscribe` AS newsletter_email__newsletter_subscribe, j1.`recipient_subject` AS newsletter_email__recipient_subject, j1.`recipient_defaultEmail` AS newsletter_email__recipient_defaultEmail, j1.`recipient_sendCopy` AS newsletter_email__recipient_sendCopy, j1.`leadStore` AS newsletter_email__leadStore FROM tl_form_field LEFT JOIN tl_form_field j1 ON tl_form_field.`newsletter_email`=j1.id WHERE pid = '20' AND type = 'recipientmenu' LIMIT 0,1':

Kann es sein dass in der Klasse RecipientManager / Funktion prepareRecipients bei
$objFormField = \FormFieldModel::findOneBy(
array('pid = ?', 'type = ?'),
array($objForm->id, 'recipientmenu')
);
einfach die Angabe der entsprechenden Tabelle - vermutl. tl_form_field - fehlt?

ich habe keine Klasse mit "RecipientManager" - hier gibt es sowas https://github.com/kozi/contao-recipientselect/blob/master/contao/classes/RecipientManager.php ...

also dort bitte mal melden ;-)