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
SQL Fehler bei Newsletter Versand #4
Comments
@terminal42/pilots I had exactly the same issue in my extension. There are basically two problems with formatting all available model data using
To workaround those problem I have did some dirty tricks, see here: codefog/contao-events_subscriptions@e173111 Maybe we should fix it in the Haste though? |
I guess you correctly identified the problem. However, I don't understand your solution. So I guess that Haste should indeed be fixed :( |
@Xendiadyon likely yes but I am waiting for other contributors to provide some feedback. |
I came across the same problem with the query error, how can I help to get things done? |
Dirty Hack, von dem ich nicht weiß, ob der jetzt zuverlässig funktioniert oder ob er weitere Probleme verursacht (Umsetzung nur auf eigene Gefahr) Es gibt Probleme mit dem übergebenen Objekt in der Erweiterung "haste" (Grundlage für quasi alles). Der Workaround in /www/htdocs/system/modules/haste/library/Haste/Util/Format.php: wenn "varValue" leer ist, setze "0" in der MySQL-Abfrage (Z.152-155). |
Which is not an issue of haste, right?
Yeah, this issue should be fixable by turning this $objOptions = \Database::getInstance()->query("SELECT id, " . $chunks[1] . " AS value FROM " . $chunks[0] . " WHERE id IN (" . implode(',', array_map('intval', (array) $varValue)) . ")"); into this: $ids = 0 === count((array) $varValue) ? [0] : (array) $varValue;
$objOptions = \Database::getInstance()->query("SELECT id, " . $chunks[1] . " AS value FROM " . $chunks[0] . " WHERE id IN (" . implode(',', array_map('intval', $ids)) . ")"); |
Not the Haste issue but since we are providing this utility we should handle that case I think. In most of the cases you need just a |
Imho the |
but haste should not throw an error if the options_callback is not passed? |
Haste doesn't throw an error? The initial error in this issue should be fixed with my piece of code, please test this. |
Used this:
Error: Used this:
Error: |
Try this: $ids = $varValue ? (array) $varValue : [0]; |
Used this:
Same error: |
Ah sorry, did not look at the error message 😄 that line is irrelevant, the error you are getting refers to the |
So @qzminski would you provide a dc wrapper or what's your idea? |
I opt for a workaround from my other project: |
Well, I guess it would work for most cases but at the same time it's also dangerous somehow :) |
It is indeed, yet I can't think of other solution really. This mock would be passed only and only to the |
For further discussion and hotfix please see codefog/contao-haste#101. I will let this task open however to bump the necessary dependencies in the |
seems to be working now! Issue can be closed. |
Beim Versuch, die Nachrichten an bestätigte Abonnenten zu versenden, kommt leider folgender Fehler:
Andere Newsletter ohne News funktionieren weiterhin.
Contao 3.5.24 mit PHP 7.0.16-he.0
The text was updated successfully, but these errors were encountered: