Skip to content
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

404 - Not found - wenn Suchbegriff mit / eingegeben wird #15

Closed
mcfausti opened this issue Nov 11, 2015 · 12 comments
Closed

404 - Not found - wenn Suchbegriff mit / eingegeben wird #15

mcfausti opened this issue Nov 11, 2015 · 12 comments
Labels

Comments

@mcfausti
Copy link

Wenn im Suchfeld ein Suchbegriff mit einem / eingegeben wird, dann bekomme ich eine 404 - Not found - Fehlermeldung.

URL schaut dann folgendermaßen aus:
...../textsearch_5/29548%2F6.html

Suchbegriff war: 29548/6

Not Found

The requested URL /objekt-suche/textsearch_5/29548/6.html was not found on this server.

Laut zonky im Contao-Forum sollte ich
../objekt-suche.html?textsearch_5=29548/6
ausprobieren.

Diese Variante funktioniert und liefert Suchergebnisse zurück.

Der passende Thread im Contao-Forum:
https://community.contao.org/de/showthread.php?54128-MetaModels-Filter-Mehrfachauswahl-Sonderzeichen

LG

@discordier discordier added the bug label Nov 11, 2015
@discordier
Copy link
Member

The problem is already in the core.
The removal of the encoding of slash and apos in MetaModels/core@068f79e (see MetaModels/core#814) most likely broke this.
However it was non functional before, as the elements were never translated back to their original representation.

@discordier
Copy link
Member

Ref: MetaModels/core#139

@9teufel
Copy link

9teufel commented Jun 6, 2016

In meiner Mehrfachauswahl stehen Werte die ua. Klammern und Schrägstriche enthalten. Leider wird mir bei Auswahl von Begriffen mit / ( ) eine 404 angezeigt.

Gibt es da eventuell schon eine Lösung?

@discordier
Copy link
Member

When using a proper alias column, this problem should not occur.
This is the only work around currently, sorry.

@9teufel
Copy link

9teufel commented Jun 7, 2016

Leider weiß ich nicht genau wie ich da jetzt weitermache.
Habe ein neues Alias Feld angelegt, das sich automatisch mit dem Filter-Wert befüllt (die Schrägstriche und Klammern sind weg). Aber wie verknüpfe ich diese jetzt damit im Filter der richtige Wert steht und nur die URL aus dem Alias erzeugt wird (URL-Parameter?).

Oder bin ich ganz auf dem Holzweg und kann ich nur das eigentliche Text Attribut zu einem Alias Attribut umwandeln? Dann verliere ich aber auch alle Leerzeichen und die Groß/Kleinschreibung.

@zonky2
Copy link
Contributor

zonky2 commented Jun 7, 2016

hmmm... so als Idee:

  • eigenes Filter-Template bauen
  • Filter auf Alias legen
  • im Template die "Labels" auf das Textfeld umbiegen

@9teufel
Copy link

9teufel commented Jun 7, 2016

Ich denke das Problem wird irgendwann behoben?
In der Zwischenzeit ersetze ich meine / mit | und aus den ( ) werden [ ].

@zonky2
Copy link
Contributor

zonky2 commented Jun 7, 2016

hast Du die Variante mit einem eigenen Filtertemplate probiert?

@9teufel
Copy link

9teufel commented Jun 8, 2016

Habe ich nicht probiert, brauchte eine schnelle Lösung.

@zonky2
Copy link
Contributor

zonky2 commented Jul 3, 2016

folgendes kann probiert werden (1. und 2. ändern)

1:
https://github.com/MetaModels/core/blob/master/src/MetaModels/FrontendIntegration/FrontendFilter.php#L116

                $strFilterAction .= sprintf(
                    $GLOBALS['TL_CONFIG']['disableAlias'] ? '&%s=%s' : '/%s/%s',
                    $strName,
-                   rawurlencode($strValue)
+                   rawurlencode(rawurlencode($strValue))
                );

https://github.com/MetaModels/core/blob/master/src/MetaModels/FrontendIntegration/HybridList.php#L73

            if (is_string($varValue)) {
-                $arrReturn[$strName] = rawurldecode($varValue);
+                $arrReturn[$strName] = $varValue;
            }

damit können Texte mit / oder + oder %20 bis %FF gesucht werden

s.a. MetaModels/core#910

@zonky2
Copy link
Contributor

zonky2 commented Jul 14, 2016

pls test PR MetaModels/core#1033

@discordier
Copy link
Member

Closed in favor of MetaModels/core#1033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants