Block Types not working
Permalink
Hello everybody,
I am trying to install custom Block Types on my website. But as soon as a click on "Block Types" a "ReflectionException (-1) Class does not exist" shows up on my screen. Everything esle works propperly, it's just the Block Types.
The shown code is:
[ */
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface of Abstract Class and there is
// no binding registered for the abstractions so we need to bail out.
if (! $reflector->isInstantiable()) {
if (! empty($this->buildStack)) {
$previous = implode(', ', $this->buildStack);
$message = "Target [$concrete] is not instantiable while building [$previous].";
} else {
$message = "Target [$concrete] is not instantiable.";
}
throw new BindingResolutionException($message);
}
$this->buildStack[] = $concrete;
$constructor = $reflector->getConstructor();
]
I allready reinstalled concrete5 and made a new Database.
Thanks for your Help
Alex
I am trying to install custom Block Types on my website. But as soon as a click on "Block Types" a "ReflectionException (-1) Class does not exist" shows up on my screen. Everything esle works propperly, it's just the Block Types.
The shown code is:
[ */
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface of Abstract Class and there is
// no binding registered for the abstractions so we need to bail out.
if (! $reflector->isInstantiable()) {
if (! empty($this->buildStack)) {
$previous = implode(', ', $this->buildStack);
$message = "Target [$concrete] is not instantiable while building [$previous].";
} else {
$message = "Target [$concrete] is not instantiable.";
}
throw new BindingResolutionException($message);
}
$this->buildStack[] = $concrete;
$constructor = $reflector->getConstructor();
]
I allready reinstalled concrete5 and made a new Database.
Thanks for your Help
Alex
This usually happens when a namespace is incorrect in a block type. Check the block types that you are trying to install and verify that the namespace is correct.
Thanks, that worked, I just had to change one namespace to fix it.
Hi,
if I want to call the block types via the dashboard, I get the same error message. But I don't have custom blocks installed.
I have installed the following blocks:
Background Image and Overlay v.0.9.9
Simple Gallery v.1.0.7
Easy Image Gallery v.1.4.2
Could it also be the namespace?
If yes, how can I change it?
Are there other reasons for the error message?
Many thanks for your help
if I want to call the block types via the dashboard, I get the same error message. But I don't have custom blocks installed.
I have installed the following blocks:
Background Image and Overlay v.0.9.9
Simple Gallery v.1.0.7
Easy Image Gallery v.1.4.2
Could it also be the namespace?
If yes, how can I change it?
Are there other reasons for the error message?
Many thanks for your help