Closed sauerbraten closed 5 years ago
Can you post the value of the field?
value from our datastore:
[
{
"caption": "\u003cp\u003ePhoto Gallery: The Tide Turns in Syria\u003c/p\u003e",
"slideshow": [
{
"reference": {
"collection": "slideshow",
"id": "e7cd6652-0001-0002-0000-000000091514"
}
}
],
"type": "slideshow"
},
{
"text": "\u003cp\u003eNight falls quickly in Syria, as the overloaded pickup [...] fear that had held the country in its grip for 41 years. \u003c/p\u003e",
"type": "text"
},
{
"type": "multipart",
"headline": "Abandonded by the World"
},
{
"text": "\u003cp\u003e\nA few days later, we made our first attempt to reach [...] The system was always corrupt.\" \u003c/p\u003e",
"type": "text"
},
{
"type": "multipart",
"headline": "Friends or Foes?"
},
{
"text": "\u003cp\u003e\nWe also experienced the chaos of this insurgency. Its weakness [...] \"Who else has helped us?\" he asks. \"No one.\"\u003c/p\u003e",
"type": "text"
}
]
value from Vue dev tools:
[
{
"caption": "<p>Photo Gallery: The Tide Turns in Syria</p>",
"slideshow": [
{
"reference": {
"collection": "slideshow",
"id": "e7cd6652-0001-0002-0000-000000091514"
}
}
],
"type": "slideshow"
},
{
"text": "<p>Night falls quickly in Syria, as the overloaded pickup [...] fear that had held the country in its grip for 41 years. </p>",
"type": "text"
},
{
"type": "multipart",
"headline": "Abandonded by the World"
},
{
"text": "<p>\nA few days later, we made our first attempt to reach Homs. [...]",
"type": "text"
}
]
(trimmed at the end by vue devtools and fixed for validity by me)
The translation step where type
should be changed to set
appears to not run.
For comparison, this is the value for an entry with an image:
JSON in datastore:
[
{
"text": "\u003cp\u003eAhmed Mohamed hat immer [...] der Klage nicht genannt.\u003c/p\u003e",
"type": "text"
},
{
"allow_fullscreen": true,
"caption": "\u003cp\u003eAhmeds Uhr: Ein Koffer, eine Platine, Drähte, ein Digitaldisplay\u003c/p\u003e",
"image": [
{
"reference": {
"collection": "image",
"id": "386df08c-0001-0004-0000-000000897858"
}
}
],
"placement": "center",
"type": "image"
},
{
"text": "\u003cp\u003eBis heute habe die Familie [...] wegen Verletzung der Bürgerrechte.\u003c/p\u003e",
"type": "text"
}
]
value in Vue devtools:
[
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Ahmed Mohamed hat immer gern gebastelt und Sachen konstruiert. [...] Nun verklagt Ahmeds Familie die Schule auf Schadensersatz."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Durch das Vorgehen der Schule gegen Ahmed seien dessen [...] Eine Entsch\u00e4digungssumme wird in der Klage nicht genannt."
}
]
},
{
"type": "set",
"attrs": {
"values": {
"allow_fullscreen": true,
"caption":"[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Ahmeds Uhr: Ein Koffer, eine Platine, Dr\\u00e4hte, ein Digitaldisplay\"}]}]",
"image": [
"386df08c-0001-0004-0000-000000897858"
],
"placement": "center",
"type": "image",
"link": null
}
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Bis heute habe die Familie von der MacArthur High School in Irving im Bundesstaat "
},
{
"type": "text",
"text": "Texas",
"marks": [
{
"type": "link",
"attrs": {
"href": "cs:\/\/topic\/670ad725-0001-0010-0000-000000019448"
}
}
]
},
{
"type": "text",
"text": " keine Entschuldigung erhalten, sagte Hutchison. [...] Deshalb klagen wir auf Gerechtigkeit.\""
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Der Fall hatte weltweit f\u00fcr Aufsehen gesorgt:",
"marks": [
{
"type": "link",
"attrs": {
"href": "cs:\/\/article\/9c41fc21-0001-0001-0000-000001053131"
}
}
]
},
{
"type": "text",
"text": " Zun\u00e4chst musste sich Ahmed wegen des [...] Islamfeindlichkeit vorgeworfen."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Nachdem der Vorfall publik geworden war, erhielt Ahmed zahlreiche Einladungen gro\u00dfer Unternehmen - "
},
{
"type": "text",
"text": "auch US-Pr\u00e4sident Barack Obama lud den Jungen ins Wei\u00dfe Haus ein.",
"marks": [
{
"type": "link",
"attrs": {
"href": "cs:\/\/article\/c1a10be0-0001-0001-0000-000001058590"
}
}
]
},
{
"type": "text",
"text": " Ahmed nahm dort an einer Nacht der Astronomie teil."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Dennoch zog er mit seiner Familie nach Katar,",
"marks": [
{
"type": "link",
"attrs": {
"href": "cs:\/\/article\/f6b542d6-0001-0001-0000-000001058802"
}
}
]
},
{
"type": "text",
"text": " wo er ein Stipendium f\u00fcr eine Privatschule und f\u00fcr ein Studium erhielt."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Ahmed sagte, nach dem Vorfall habe er zwar [...] seither verloren gegangen."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Zurzeit besucht Ahmed seine [...] Alle w\u00fcrden gleich behandelt."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Das Schulamt von Irving wies erneut [...] wegen Verletzung der B\u00fcrgerrechte."
}
]
}
]
Are you wrapping Bard with your own custom fieldtype?
Yup!
On Fri, Jun 21, 2019, 20:42 Jack McDade notifications@github.com wrote:
Are you wrapping Bard with your own custom fieldtype?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/statamic/three-cms/issues/454?email_source=notifications&email_token=AANN5DFYDD325GW44KS7WCDP3UOJRA5CNFSM4HSGO3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJIRWI#issuecomment-504531161, or mute the thread https://github.com/notifications/unsubscribe-auth/AANN5DAAWMPMMFYSS3H3BOLP3UOJRANCNFSM4HSGO3YQ .
Ah, that's probably why. I ran into this when i missed passing all the right props and datatypes into a Bard instance.
Pretty sure this is fixed, probably by passing the complete props as you suggested (but not sure).
Somehow, not all of our configured Bard sets are available in the underlying ProseMirror instance as node types, which leads to the following exception:
No content is rendered in the Bard editor field.
Bard config:
The
image
set works fine (when loading an entry with an image but no slideshow in the body field).