getgrav / getgrav/grav-plugin-admin

Removing file from "file" input field

Open
#1,619 16 comments 4 reactions 1 assignee Claimed by @mahagr View on GitHub
bug evaluating
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

When trying to remove file from "file" input field i kept getting "Path not valid for this data type" error.

On the line 943 of adminbasecontroller.php file

i replaced
```if (!Utils::startsWith($path, $destination))```
with
```if (!Utils::startsWith($destination, $path))``` and now it works.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.