Closed animaux closed 10 years ago
Das ist die Installation, bei der Du den SSM aktualisiert hast oder?
Ich habe noch eine andere Datenquelle mit dem gleichen Problem und eine die funktioniert. Der Unterschied der beide ist, dass die nicht funktioinierenden eine gruppierte Ausgabe haben. Schätze das liegt der Hase im Pfeffer?
Ist jetzt eine zweite Installation mit SSM-Migration.
Meine Mutmaßung ist, dass da was in der Associationstabelle nicht stimmt.
Ich muss mir das in Ruhe ansehen. Heute klappt das aber leider nicht mehr.
Was einen Versucht wert wäre:
sym_associations
leeren.sym_associations
gibt.Kein Problem. Ist aber wie gesagt nur bei gruppierten Datenquellen der Fall. Ich probier das gleich mal.
Meinst Du sym_fields_associations
oder gar sym_sections_associations
?
sym_associations
gibt’s bei mir nicht.
Sorry, letzteres.
sym_sections_associations
, ja?
ja
sym_sections_associations
wird nach dem neu Speichern der Bereiche wieder gefüllt. (Die Einstellung »display associations in entries table« wird allerdings weiterhin nicht gespeichert siehe hier.)
Dein Riecher scheint aber richtig gewittert zu haben. Nachdem ich die Datenquellen neu gespeichert hatte funktionierte die Ausgabe! Hurra! Danke! :)
Schön :)
Wäre ein weiterer Punkt, den wir hier aufnehmen sollten: https://github.com/symphonists/association_field/issues/3
Hmnja, bei der anderen Installation war das kein Problem scheinbar.
Jetzt habe ich aber bei einer weiteren vorhandenen Datenquelle erst jetzt bilder
hinzugefügt und die entsprechenden Unterfelder ausgewählt. Und leider kommt nun wieder nur Quatsch raus.
Ist die Frage ob er generell beim Erstellen einer DS mit Gruppierung erstmal was verborkt, oder ob das ein Migrationsfolgeproblem ist? (wird ja langsam politisch hier)
Wenn ich die Gruppierung in der DS ausschalte kommt der output korrekt an. Wenn ich Gruppierung dann wieder einschalte ist es wieder kaputt.
Hrmpsfsd. Es ist offensichtlich auch zu spät für mich um noch sinnvoll zu arbeiten. Der Fehler ist nicht durch das Datenbankleeren behoben worden. Die Datenquellen bei denen es funktionierte sind garnicht gruppiert … das hatte ich vorhin übersehen.
Es bleibt also dabei. Gruppierte Datenquellen bekommen nicht den korrekten associated content
. :(
Probier doch mal bitte folgendes aus: Ersetze nachfolgende Funktion – https://github.com/hananils/association_output/blob/master/extension.driver.php#L419-L451 – durch folgendes:
private function findAssociatedEntries(&$xml, $associated_items, $name, $transcriptions)
{
$children = $xml->getIterator();
if (!empty($children)) {
foreach ($children as $child) {
$nodeName = $child->getName();
if ($nodeName !== 'entry') {
$this->findAssociatedEntries($child, $associated_items, $name, $transcriptions);
} else {
$this->includeAssociatedEntries($child, $associated_items, $name, $transcriptions);;
}
}
}
}
private function includeAssociatedEntries(&$entry, $associated_items, $name, $transcriptions)
{
$fields = $entry->getChildren();
if ($entry->getName() === 'entry' && !empty($fields)) {
foreach ($fields as $field) {
$items = $field->getChildren();
if ($field->getName() === $name && !empty($items)) {
foreach ($items as $item) {
$id = $item->getAttribute('id');
if (empty($id)) {
$handle = $item->getAttribute('handle');
$id = $transcriptions[$handle];
}
$association = $associated_items[$id];
if (!empty($association)) {
$item->replaceValue('');
$item->setChildren($associated_items[$id]);
$item->setAttribute('id', $id);
}
}
}
}
}
}
@nilshoerrmann is this (https://github.com/brendo/uniondatasource/issues/41) related?
@nilshoerrmann Will have to try on monday! Thanks.
@moretaste: No.
@nilshoerrmann no change :(
Really? It worked here. Can you please post the XML output of your grouped DS (or send it to me privately)? Thanks!
Side note: the item/@handle
actually reflects the selected content but not the content.
Side note: the item/@handle actually reflects the selected content but not the content.
?!?
E. G. When I select title
for accosciated output the item/@handle
includes the handle of the title
. But the content of the item itself still always shows the reflection field named vorschau
, which is the last field in the associated section. Will send you the XML via E-Mail but it’s still the same as in the screenshot above.
Looking at your screenshot from aboave item/@handle
shows the handle of your refletion field (= the handle of the text content).
Looking at your screenshot from aboave item/@handle shows the handle of your refletion field (= the handle of the text content).
Yes that was done with different fields selected, but when I select a single field for associated output, then this particular field will be reflected in the items @handle but not in it’s actual content.
I can send you the whole installation if you want :)
You can do so, if it's fine for you that I'll look at it tomorrow (I'm alone in the office today – Kitaferien).
OK, will do. Tomorrow will be my last da at the office before my holidays though. Will be back in September.
Alex, probier mal das hier aus: https://github.com/hananils/association_output/releases/tag/1.0.1
Es geht! Wie immer ein großes Danke, Nils! Bitte den Code der Site vernichten :)
Freut mich.
Bitte den Code der Site vernichten :)
Ich hätte ja jetzt erwartet, dass der Code sich in 5 Sekunden selbst zerstört. Da müsst Ihr noch dran arbeiten ;)
Ich hätte ja jetzt erwartet, dass der Code sich in 5 Sekunden selbst zerstört.
Das ging nur in Symphony 2.3!
Haha, na dann heb ich das mal auf. Man weiß ja nie …
Ich habe mich selbst schon wieder über meinen Code gewundert … müsste das mal aufräumen. Wenn mal Zeit ist.
Wenn mal Zeit ist.
Das ist der beste Witz seit langem! Wenn Ihr ne Agentur für Eure Seite sucht … ich kenn da eine ;)
Hehe :) läuft ja …
Sollte es in meinem Urlaub vom 20. – 30. August Symphony-basierte Notfälle geben, kann es sein dass sich jemand von uns bei Dir meldet :)
Ich schreib mal in Deutsch …
Habe eine Datenquelle mit einem Association-Feld, und egal welches Feld daraus ich auswähle, es wird immer nur das Reflection Field ausgegeben (
vorschau
).Ausgewählt ist
beschreibung
:Raus kommt aber der Inhalt von
vorschau
.Egal ob ich eine oder mehrere der Felder unter »Bilder« auswähle.