Closed Paddy0174 closed 5 years ago
Please put your error and log messages in three back ticks, not one.
Presumably, SubSelectPalettesListener::fetchValueFromDatabase
needs to be changed to:
/**
* Fetch value from database.
*
* @param DataContainer $dataContainer Data container driver.
* @param string $strSelector Selector field name.
*
* @return mixed
*/
private function fetchValueFromDatabase($dataContainer, $strSelector)
{
$objRecord = \Database::getInstance()
- ->prepare(sprintf('SELECT %s FROM %s WHERE id=?', $strSelector, $dataContainer->table))
+ ->prepare(sprintf('SELECT `%s` FROM `%s` WHERE id=?', $strSelector, $dataContainer->table))
->limit(1)
->execute($dataContainer->id);
if ($objRecord->next()) {
return $objRecord->$strSelector;
}
return null;
}
@fritzmg Thanks for finding and solving the error, your solution works like a charm! In 4.6.6 and 4.6.8 the error is solved with your change.
And jepp, back ticks and me, we do know, why we hate each other ;)
It should be fixed with 842693de5a5c3535fe3cf50ae505680f11372fe9. Instead of @fritzmg approach I also switched to doctrine/dbal.
@Paddy0174 It would be great if you would check branch hotfix/2.0.5 if it fixes your issue in the mariadb context.
@dmolineus Thanks, works like a charme. Fixes the issue and doesn't seem to disturb anything else, like contao-bootstrap! :)
Thanks for the fast reaction! :)
Thanks for confirming that it works. Shipped with the 2.0.5 release.
I have an error with the correct escaping for the reserved word "rows" in tl_layout. This issue was discovered in contao-core before (see #153 ).
Unfortunately I have now the same issue with meta-palettes. See this thread in the board: click here
@fritzmg found the error in SubSelectPalettesListener.php in line 304
Now all the data you might need, it's an uberspace7 server:
My composer.json
And the stack trace from app_dev:
If you need more information, please let me know