Skip to content

Does not save to DB when template is empty #63

@faloude

Description

@faloude

Found out a strange reproducable error.

When the template which is used to render the shortcodable dataobject is empty, the shortcode will not be saved to the DB. When I type a simple 'Foo' in the template file, the bug vanishes.

public static function parse_shortcode($attributes, $content, $parser, $shortcode) {

    if (isset($attributes['id']) && $map = self::get()->byID($attributes['id'])) {
        return $map->customise($data)->renderWith('Map'); // Map.ss cannot be empty
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions