Giter VIP home page Giter VIP logo

Comments (11)

alxndr-w avatar alxndr-w commented on June 25, 2024 1

Dann bekomme ich

Error while executing statement " SELECT a.id, a.clang_id, CONCAT(a.id, "|", a.clang_id) as bulldog FROM rex_article AS a WHERE (`a.id` LIKE "%Test%") OR (`a.name` LIKE "%Test%") GROUP BY bulldog LIMIT 20"! SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.id' in 'where clause'

ich korrigiere mich: to ist auf jeden Fall vorhanden, ich habe in der falschen Tabelle geschaut.

from redaxo_watson.

staabm avatar staabm commented on June 25, 2024 1

Gerne einen PR machen.

Das issue ist offen weil noch niemand einen Fix bereitgestellt hat (und der fix bisher nicht getestet war - sondern eher geraten).

from redaxo_watson.

tbaddade avatar tbaddade commented on June 25, 2024

Funktioniert nicht unter Subdomains ohne www.

wie genau sieht diese bei dir aus?

Bei uns klappt diese Kombination
https://projekt.arbeitsdomain.de

Du könntest auch mal das hier aufrufen
/redaxo/index.php?page=watson&watson_query=Test

Eventuell erhälst du einen Fehler.

from redaxo_watson.

alxndr-w avatar alxndr-w commented on June 25, 2024
Error while executing statement " SELECT id, name AS name FROM rex_dance_voucher_order WHERE (to LIKE "%Test%") OR (euro LIKE "%Test%") OR (name LIKE "%Test%") OR (street LIKE "%Test%") OR (zip LIKE "%Test%") OR (city LIKE "%Test%") OR (phone LIKE "%Test%") OR (email LIKE "%Test%") OR (kname LIKE "%Test%") OR (iban LIKE "%Test%") OR (blz LIKE "%Test%") OR (message LIKE "%Test%") ORDER BY id LIMIT 20"! 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 'to LIKE "%Test%") OR (euro LIKE "%Test%") OR (name LIKE "%Test%") OR (street LIK' at line 1

Es gibt kein Feld to

Ich habe das Phänomen bisher tatsächlich nur in Seiten, die nicht www. als Subdomain haben. Evtl. funktioniert bei dir / bei euch automatisch www.projekt.arbeitsdomain.de - aber vielleicht hast du recht, und das ist hier ein anderer Fehler.

from redaxo_watson.

tbaddade avatar tbaddade commented on June 25, 2024

Das to Feld müsste in deiner YForm Tabelle existieren, da Watson die Felder von YForm abholt.

Kannst du mal diese Zeile hier anpassen
https://github.com/tbaddade/redaxo_watson/blob/master/lib/Watson/Foundation/Command.php#L126

Alt

$w[] = $field.' LIKE "%'.$command_part.'%"';

Neu

$w[] = '`'.$field.'` LIKE "%'.$command_part.'%"';

Und danach die obige Url direkt aufrufen.

from redaxo_watson.

tbaddade avatar tbaddade commented on June 25, 2024

Ok dann müsste das anders gelöst und Watson umgebaut werden … Aber es liegt an deinem Feld to … Siehe https://dev.mysql.com/doc/refman/5.7/en/keywords.html#keywords-5-7-detailed-T

from redaxo_watson.

staabm avatar staabm commented on June 25, 2024

ich vermute du brauchst sowas

if (strpos($field, '.') !== false) {
  $field = '`' .str_replace('.', '`.`, $field). '`';
} else {
  $field = '`'. $field .'`';
}

ich denke hier in deinem like fehlt noch weiteres escaping
$command_part = str_replace(['_', '%'], ['\_', '\%'], $command_part);

Ungetestet!

from redaxo_watson.

dpf-dd avatar dpf-dd commented on June 25, 2024

Ich habe das Issue heute entdeckt und kann den Fehler exakt wie Alex beschrieben hat bestätigen. Bei mir triggert einer Column "alter" den Fehler...

from redaxo_watson.

staabm avatar staabm commented on June 25, 2024

Funktioniert der vorgeschlagene fix ein Kommentar weiter oben für dich?

from redaxo_watson.

dpf-dd avatar dpf-dd commented on June 25, 2024

Düdüm. Ich hatte vergessen die Backticks unten in der Zeile rauszunehmen, nachdem ich deinen Fix eingebaut hatte. Jetzt haut es hin und Watson funktioniert wieder! :) Danke!
Das passst so und ich verstehe sogar den Fehler und was deine zwei Zeilen dagegen tun. Genial. Warum ist der Issue dann hier eigentlich noch offen? Soll ich eine PR draus machen?

Danke!

from redaxo_watson.

tbaddade avatar tbaddade commented on June 25, 2024

Das issue ist offen weil noch niemand einen Fix bereitgestellt hat (und der fix bisher nicht getestet war - sondern eher geraten).

Hatte den Fix schon seit einer Weile Lokal drin wohl nur vergessen zu committen. Sorry dafür.

from redaxo_watson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.