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

Update fillAttribute to return parent result by default #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikeaag
Copy link

@mikeaag mikeaag commented Jan 30, 2025

After upgrading to v2.0.0 I was getting the following error when trying to save a resource that included a CKEditor field

Waynestate\Nova\CKEditor4Field\CKEditor::fillAttribute(): Return value must be of type ?callable, none returned

It looks like this was caused by the addition of the return type. If there is no pending upload, then the method does not return, which is apparently a type error.

Being completely honest, I am not sure on the ramifications of my suggested change. I initially changed it to just return null, which fixed the error for me. Then I changed it to return the result of parent::fillAttribute(), which also works for me.

Where my uncertainty comes in is when there are uploads to handle. We do not use the upload functionality so I can't easily test to make sure that still works as expected. Would be great if someone who does have it setup to do uploads could give this a test to make sure it works for them still.

@chrispelzer chrispelzer added the bug Something isn't working label Jan 30, 2025
@chrispelzer
Copy link
Member

I have a vanilla nova set up that I can test it on. I'll double check all the draft/uploads/pruning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants