Closed omphteliba closed 2 years ago
Mit der neuesten Version aus Git ändert sich die sql_exception zu:
Error while executing statement "SELECT * FROM `rex_global_settings` WHERE emile_mit_hashtag.png IN(glob_footer_logos)": SQLSTATE[42S22]: Column not found: 1054 Unknown column 'emile_mit_hashtag.png' in 'where clause'
rex_sql_exception: Error while executing statement "SELECT * FROM rex_global_settings
WHERE emile_mit_hashtag.png IN(glob_footer_logos)": SQLSTATE[42S22]: Column not found: 1054 Unknown column 'emile_mit_hashtag.png' in 'where clause'
File: redaxo/src/core/lib/sql/sql.php
Line: 455
Ist mir gerade auch aufgefallen. In der Datei redaxo/src/addons/global_settings/lib/utils/global_settings_helper.php
ist folgende Stelle fehlerhaft:
if( !empty($in) ){
$sql = rex_sql::factory();
$sql->setQuery('SELECT * FROM ' . rex::getTablePrefix() . 'global_settings` WHERE ' . $fileName . ' IN(' . join(',', $in) . ')');
$rows = $sql->getRows();
$columns = $sql->getArray();
}
da $fileName
noch ein paar Hochkommas benötigt.
EDIT: Die Table hat rechts ein schließendes "`", links aber nicht. Auch das wirft einen Syntaxfehler im SQL.
@bitshiftersgmbh probier mal die aktuell github Version aus, da ist es gefixt.
Danke: @bitshiftersgmbh , @omphteliba
@eaCe Ich habe das jetzt mal released, scheint ja wichtig zu sein.
@skerbis danke. Ich habe das gar nicht mitbekommen :| Dachte das hatte @isospin gefixed. Danke auch an @bitshiftersgmbh und @omphteliba
Beim Löschen eines Bildes im Medienpool bekomme ich einen SQL Fehler:
Error while executing statement "SELECT * FROM rex_global_settings` WHERE emile_mit_hashtag.png IN(glob_footer_logos)": SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '` WHERE emile_mit_hashtag.png IN(glob_footer_logos)' at line 1
Da ist hinterrex_global_settings
ein Accent, das da nicht hin gehört, würde ich sagen.Hier das Markdown dazu:
rex_sql_exception:
Error while executing statement "SELECT * FROM rex_global_settings` WHERE emile_mit_hashtag.png IN(glob_footer_logos)": SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '` WHERE emile_mit_hashtag.png IN(glob_footer_logos)' at line 1
File: redaxo/src/core/lib/sql/sql.php Line: 455Stacktrace
| Function | File | Line | | -------------------------------------------- | ---------------------------------------------------------------------- | -------- | | rex_sql->setQuery | redaxo/src/addons/global_settings/lib/utils/global_settings_helper.php | 25 | | rex_global_settings_helper::isMediaInUse | redaxo/src/core/lib/extension.php | 52 | | rex_extension::{closure} | redaxo/src/core/lib/util/timer.php | 63 | | rex_timer::measure | redaxo/src/core/lib/extension.php | 63 | | rex_extension::registerPoint | redaxo/src/addons/mediapool/lib/mediapool.php | 96 | | rex_mediapool::mediaIsInUse | redaxo/src/addons/mediapool/lib/service_media.php | 228 | | rex_media_service::deleteMedia | redaxo/src/addons/mediapool/pages/media.detail.php | 41 | | require | redaxo/src/addons/mediapool/pages/media.php | 71 | | include | redaxo/src/core/lib/packages/package.php | 285 | | rex_package->includeFile | redaxo/src/core/lib/be/controller.php | 485 | | rex_be_controller::{closure} | redaxo/src/core/lib/util/timer.php | 63 | | rex_timer::measure | redaxo/src/core/lib/be/controller.php | 486 | | rex_be_controller::includePath | redaxo/src/core/lib/be/controller.php | 432 | | rex_be_controller::includeCurrentPageSubPath | redaxo/src/addons/mediapool/pages/index.php | 106 | | include | redaxo/src/core/lib/packages/package.php | 285 | | rex_package->includeFile | redaxo/src/core/lib/be/controller.php | 485 | | rex_be_controller::{closure} | redaxo/src/core/lib/util/timer.php | 63 | | rex_timer::measure | redaxo/src/core/lib/be/controller.php | 486 | | rex_be_controller::includePath | redaxo/src/core/lib/be/controller.php | 415 | | rex_be_controller::includeCurrentPage | redaxo/src/core/backend.php | 238 | | require | redaxo/src/core/boot.php | 143 | | require | redaxo/index.php | 9 |System report (REDAXO 5.13.0, PHP 7.4.3, MySQL 8.0.27)
| REDAXO | | | ------------: | :--------- | | Version | 5.13.0 | | PHP | | | ------------: | :--------- | | Version | 7.4.3 | | OPcache | yes | | Xdebug | no | | Database | | | ------------: | :----------- | | Version | MySQL 8.0.27 | | Character set | utf8 | | Database 2 | | | ------------: | :----------- | | Version | MySQL 8.0.27 | | Server | | | ------------: | :------------- | | OS | Linux | | SAPI | apache2handler | | Webserver | Apache/2.4.41 | | Request | | | ------------: | :------------------ | | Browser | Chrome/96.0.4664.45 | | Protocol | HTTP/1.1 | | HTTPS | yes | | Packages | | | -------------------------------: | :---------- | | adminer | 1.9.1 | | backup | 2.8.0 | | be_password | 2.0.0 | | be_style | 3.0.0 | | be_style/customizer | 3.0.0 | | be_style/redaxo | 3.0.0 | | bloecks | 3.1.1 | | bloecks/cutncopy | 3.1.1 | | bloecks/dragndrop | 3.1.1 | | bloecks/status | 3.1.1 | | cronjob | 2.8.1 | | cronjob/article_status | 2.8.1 | | cronjob/optimize_tables | 2.8.1 | | developer | 3.9.0 | | feeds | 3.1 | | global_settings | 2.6.1 | | hyphenator | 1.2.0 | | install | 2.9.3 | | markitup | 3.7.1 | | mblock | 3.4.1 | | media_manager | 2.12.0 | | media_manager_autorewrite | 2.0.1 | | mediapool | 2.11.0 | | metainfo | 2.8.2 | | mf_lastchanges | 0.9 | | mform | 6.1.0 | | mform/docs | 1.1 | | minify | 2.2 | | modulsammlung | 4.15.2 | | modulsammlung/documentation | 1.0 | | multiupload | 2.1.3 | | multiupload/imageoptimizer | 1.0.1 | | multiupload/upload_precompressor | 1.0 | | navigation_factory | 2.0.3 | | omi_citrix | 1.0.0 | | omi_pardot | 1.0.1 | | phpmailer | 2.11.0 | | project | dev | | redactor2 | 4.2.1 | | structure | 2.13.0 | | structure/content | 2.13.0 | | structure/version | 2.13.0 | | theme | 1.3.3 | | url | 1.0.1 | | users | 2.8.1 | | watson | 2.2.0 | | xoutputfilter | 3.0.0-beta1 | | xoutputfilter/abbrev | 3.0.0 | | xoutputfilter/backend | 3.0.0 | | xoutputfilter/documentation | 1.0.0 | | xoutputfilter/frontend | 3.0.0 | | xoutputfilter/import_export | 3.0.0 | | xoutputfilter/languages | 3.0.0 | | yform | 3.4.2 | | yform/docs | 3.3.1 | | yform/email | 3.4.2 | | yform/manager | 3.4.2 | | yform/tools | 3.4.2 | | yrewrite | 2.7 | | yrewrite_scheme | 3.6.1 |