Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use fields of type "files" in settings #2728

Open
lfglopes opened this issue Feb 16, 2025 · 0 comments
Open

Can't use fields of type "files" in settings #2728

lfglopes opened this issue Feb 16, 2025 · 0 comments

Comments

@lfglopes
Copy link
Contributor

Description

Can't use fields of type "files" in settings.

Using the legacy settings fields the field is saved in the database with the setting identifier {$label}_{$file.id}, instead of simply $label.

Using the new system it seems it's not saved in the database at all. Steps below described using the new system:

Steps to reproduce

  1. Follow the steps described here - https://twillcms.com/docs/settings-sections/index.html
  2. Add a files field to site-settings.blade.php
<x-twill::files name="teste" label="Teste" />
  1. Assign a file to the field
  2. Save the form
  3. Reload the page

Expected result

Assigned file is persisted and the field indicates the selected file

Actual result

Form field is empty

Versions

Twill version: 3.4.1
Laravel version: 9
PHP version: 8.0.30
Database engine: MySQL 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant