Comments (5)
@gbdesign2023 ehat he's saying is that the file itself was deleted but the files field still holds the reference to that non-existing file. He's right that the a panel won't show it, but tests like Empty/NotEmpty will say it has content.
from kirby.
I think the easy workaround would be
if ($file = $page->musicmp3()->toFile()) {
$audioMusic[] = $fille->url();
}
from kirby.
Thanks for the super quick workaround, this solves my immediate problem. 🙏
However, I think the issue itself remains, the fields should not appear empty in the panel when they still hold content. 🙂
from kirby.
@trych Is it possible that no file template has been assigned to the file? Is the file still in the content folder? Please upload another file and check the .txt file to see if a template has been assigned.
from kirby.
I guess the question is whether a "File not found" symbol or graphic (like a crossed out filename or something) is really better than simply hiding the link to the non existing file.
I mean would it make the UX really better?
If I think of an example where a page has a pages field with min: 1, multiple: false
, then something deletes the linked file from the server and therefore the user needs to relink a new file: would it really be better to have it show a non existing file first?
That also means the files field would need to store the name of the file (not only the uuid), otherwise, at most it could only display a random identifier which isn't really useful to a user. But storing the filename makes everything more complicated: when someone renames a file, kirby now has to update every reference to it in the whole website.
My 2 cts: I'm fine with having the reference missing in the panel as this reflects the results of a ->toFiles()
, which is what the docs tell us to use
from kirby.
Related Issues (20)
- Trailing link is broken when rendering writer field with `widont()` HOT 1
- Ctrl + S in structure field containing date fields clears content HOT 3
- Impossible to remove date field content HOT 1
- Using the quickstart guide creating a new kirby project with composer leads into a frontpage with missing images HOT 4
- Error deleting page with virtual grandchildren HOT 4
- Adding role-specific `preview` permission to blueprint results in Panel error HOT 2
- [Panel] Email Dialog: Wrong translation key for title field
- Duplicated pages with copy files enabled still links to original files UUID HOT 1
- Page tables load very slow in 4.2 HOT 18
- Date field behaves weird when "display" MM/YYYY is used
- Search in panel shows old results when response times from server vary HOT 1
- Calendar not working with empty date field included in a structure field
- Unsaved changes bubble clipped and wrongly position on active/hovered tab HOT 1
- Files: don't run thumb processing if image smaller than the `create` dimensions HOT 2
- Hide page view options dropdown with no actionable options HOT 3
- Unexpected issue with sorting on setting the num prop when creating pages in code. HOT 4
- Failing Test for DateTest
- Non existing files throw error 500: the thumbnail configuration could not be found
- `k-table`: index column too narrow for high indexes
- File browser doesn't start at current page HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby.