-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support DC_File/DC_Folder #31
base: main
Are you sure you want to change the base?
Conversation
Hello @m-vo , thank you for your effort, i've installed and tested your new branch: "dev-feature/support-file-dcs". Unfortunately, it still doesn't work as intended. The group widget still doesn't show within DC_File. Here is an example of my DCA field:
|
Did you adjust the default |
Yes, I am using the default palette for it.
|
Ah sorry, I thought you wanted to use this e.g. for additional fields in Nevertheless, you would need another storage adapter as well if you want to store into a file: https://github.com/m-vo/contao-group-widget/blob/main/docs/storage/extending.md |
|
||
private function getRowId(DataContainer $dc): int | ||
{ | ||
if ($dc instanceof DC_File || $dc instanceof DC_Folder) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably return 0
(or any other static value) for DC_File
.
Hey @m-vo , I've found out a few things whist debugging, I hope that following information helps: I do not reach getRowId due to following line:
There is no action in the request (contao?do=config), thus it never gets registered. After removing that part:
I'll test your suggestion with the storage adapter and will get back to you. |
@zoglo I updated the PR. The difference with the file driver is that it doesn't have a the concept of a "row" - there's only one. This PR works around this now. But you'll have to manage records yourself with your own storage. Have a look at the |
see #30
@zoglo Could you test if this works in your setup?