ProBlog

A powerful October CMS Blog plugin. Boost your SEO with robust blogging tools by Radiantweb.

Back to ProBlog Support

zimple
zimple

Would it be possible to add isset() checks to the filterFields() method in Post model?

public function filterFields($fields, $context = null)
    {
        $user = BackendAuth::getUser();

        if (!$user->hasAnyAccess(['radiantweb.problog.access_problog_can_publish'])) {
            if (isset($fields->published)) {
                $fields->published->hidden = true;
            }
            if (isset($fields->published_at)) {
                $fields->published_at->hidden = true;
            }
            if (isset($fields->user)) {
                $fields->user->hidden = true;
            }
        }
        else {
            if (isset($fields->published)) {
                $fields->published->hidden = false;
            }
            if (isset($fields->published_at)) {
                $fields->published_at->hidden = false;
            }
        }
    }

I am extending this model to add repeater fields to the blog content, but errors are appearing when repeater fields are added as the published and published_at dont exist.

ChadStrat
ChadStrat

I don't mind looking into it. But would you mind sharing a video or images of how your using repeater?

1-2 of 2