Running the Patched PHP 8.3.36 on Ubuntu 20.04 Servers With Docker
PHP fixed the two critical vulnerabilities CVE-2026-109618 and CVE-2026-109619 on October 21, 2026, in PHP 8.3.36 and the matching 8.2.35, 8.4.27 and…
When working with Statamic's Bard fieldtype programmatically, you'll often need to convert its structured data to HTML. The documentation doesn't make this obvious, but here's how to do it properly.
Bard stores content as a structured array based on ProseMirror's document format. When you access it via $entry->get('content'), you get the raw array structure. Using $entry->augmentedValue('content') gives you a Value object, but calling ->value() or casting to string often returns plain text without HTML tags or links.
Use Statamic's CoreModifiers class with the bardHtml method:
use Statamic\Modifiers\CoreModifiers;
$bardValue = $entry->augmentedValue('article_builder');
$modifiers = new CoreModifiers();
$html = $modifiers->bardHtml($bardValue);
This properly renders:
statamic://entry::abc-123)Here's a complete example for rendering Bard content from an entry:
use Statamic\Facades\Entry;
use Statamic\Modifiers\CoreModifiers;
$entry = Entry::find($entryId);
if ($entry->has('content')) {
$augmented = $entry->augmentedValue('content');
if ($augmented) {
$modifiers = new CoreModifiers();
$html = $modifiers->bardHtml($augmented);
// Now $html contains properly formatted HTML
echo $html;
}
}
If you need more control over the rendering process, you can use the Bard Augmentor directly:
use Statamic\Fieldtypes\Bard\Augmentor;
$fieldtype = $entry->blueprint()->field('content')->fieldtype();
$augmentor = (new Augmentor($fieldtype))->withStatamicImageUrls();
$content = $entry->get('content');
$html = $augmentor->augment($content);
But for most use cases, CoreModifiers::bardHtml() is simpler and more reliable.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com