kirby-deprecated-plugins / kirby-status

With this field, a page can be published, unpublished, private
20 stars 2 forks source link

Installation Issue #4

Open babyPrince opened 6 years ago

babyPrince commented 6 years ago

Hi @jenstornell I'm trying to install the Status plugin, but for some reason it doesn't work.

I've followed the instructions to place the files from your repo in /site/plugins/status/

After that added in my blueprint:

fields:
  status:
    label: Status
    type: status

but I get an error in my panel

Exception The status field is missing. Please add it to your installed fields or remove it from your blueprint


/Users/path/to/website/panel/app/src/panel/form.php
}

public function redirect() { return get('_redirect'); }

public function cancel() { if($redirect = $this->redirect()) { $this->buttons->cancel->href = purl($redirect); } else {
$this->buttons->cancel->href = call('purl', func_get_args()); } }

static public function field($type, $options = array()) {

$class = $type . 'field';

if(!class_exists($class)) {
  throw new Exception('The ' . $type . ' field is missing. Please add it to your installed fields or remove it from your blueprint');      
}

$field = new $class;

foreach($options as $key => $value) {
  $field->$key = $value;
}

return $field;

}



When I added the contents of you Field folder to `/site/fields/status/` the error disappears and the field appears in the panel, but doesn't do anything.

I'm running kirby 2.5.5

Any help would be highly appreciated! 
Thank you
jenstornell commented 6 years ago

It looks like a file is missing. Try to add this code: https://raw.githubusercontent.com/jenstornell/kirby-status/85d34904d732f40719c9ba5b3203698681826436/status.php

Put it into a name that matches your folder which should be status.php or kirby-status.php.

babyPrince commented 6 years ago

@jenstornell the error is gone, the color line was added, but when I change the status to Published, the status on the left hand side in the panel is still invisible (page actual status doesn't change). Is there something I'm missing?