Yes these test failures are fixed elsewhere. Here's the links in error order:
- π Fatal error when trying to use File browser RTBC
- π Dont use curl, use the drupal client instead RTBC
- π Dont use curl, use the drupal client instead RTBC
- π Make sure $callback is_callable. ( TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "FileSizeLimit" not found or invalid function name ) Needs review
- π Dont use curl, use the drupal client instead RTBC
- π Dont use curl, use the drupal client instead RTBC
I only saw this on Drupal 10, not Drupal 9.
Steps were (from memory):
1. install drupal 10 and filefield sources
2. enable filefield sources
3. edit a content type and add a file field
4. configure the file field to use sources: reference autocomplete
5. edit a node of the relevant type, and try to reference a file.
I'm not sure why either. It works for me on a fresh pull:
me@local:~/repos/filefield9/web/modules$ git clone --branch '2.0.x' https://git.drupalcode.org/project/filefield_sources.git
Cloning into 'filefield_sources'...
remote: Enumerating objects: 1797, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 1797 (delta 16), reused 52 (delta 12), pack-reused 1733
Receiving objects: 100% (1797/1797), 376.69 KiB | 2.77 MiB/s, done.
Resolving deltas: 100% (1171/1171), done.
me@local:~/repos/filefield9/web/modules$ cd filefield_sources/
me@local:~/repos/filefield9/web/modules/filefield_sources$ git apply -v --index 3442719-test-love.patch
Checking patch tests/src/Functional/EmptyValuesTest.php...
Checking patch tests/src/Functional/FileFieldSourcesTestBase.php...
Checking patch tests/src/Functional/MultipleValuesTest.php...
Applied patch tests/src/Functional/EmptyValuesTest.php cleanly.
Applied patch tests/src/Functional/FileFieldSourcesTestBase.php cleanly.
Applied patch tests/src/Functional/MultipleValuesTest.php cleanly.
rschwab β created an issue.
The solutions presented in this thread are no longer applicable as of 10.2.x. Closing as a duplicate of π Make sure $callback is_callable. ( TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "FileSizeLimit" not found or invalid function name ) Needs review . There are two solutions there that need community review.
Closing as a duplicate of π Make sure $callback is_callable. ( TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "FileSizeLimit" not found or invalid function name ) Needs review . There are two different solutions there that need community review.
Closing as a duplicate of π Dont use curl, use the drupal client instead RTBC
Here's a patch for anyone who would like to get this module working in D10. It incorporates the work as of today in the following issues:
- π Dont use curl, use the drupal client instead RTBC
- π Restore functions to remote.php Needs review
- π Replace deprecated assertLink() in tests Needs review
- π Test updates for D10 field edit form Needs review
- π Fatal error when trying to use File browser RTBC
- π Make sure $callback is_callable. ( TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "FileSizeLimit" not found or invalid function name ) Needs review
It should apply cleanly against the 2.0.x-dev branch as of today.
rschwab β created an issue.
Attaching a patch that uses the Drupal file validator service and constraints. For more info on this see: https://www.drupal.org/node/3363700 β
I think the problem with the issue branch in this thread is that you won't get the validation errors, because those functions remain invalid callback functions in D10.
The attached patch successfully produced constraint errors like the attached image.
+1 for RTBC. This fixes the error. Also changing to 2.x-dev to target D10, though this issue does still exist on the 8.x branch.
rschwab β created an issue.
I think we still need WidgetInterface when the function is restored in Remote.php:
/**
* Implements hook_filefield_source_settings().
*/
public static function settings(WidgetInterface $plugin) {
I'm not sure how it happened, but when I look at this branch Drupal/Field/WidgetInterface is no longer included at all (there were not doubles somehow).
If anyone wants to test with a patch instead, its attached.
In case anyone wants a patch to test this, the current MR is attached here in patch format.
To try and make this as easy as possible, I've opened π Restore functions to remote.php Needs review as a child of this issue. Once that and π Dont use curl, use the drupal client instead RTBC are reviewed and merged I believe this issue will be fully resolved.
The issue branch resolves the issue by restoring the removed code.
rschwab β changed the visibility of the branch 2.0.x to hidden.
rschwab β created an issue.
The code in #32 and the patch in #35 both include removal of code from src/Plugin/FileFieldSource/Remote.php that should not be removed. Changing this to Needs Work. My (probably biased) opinion is to take the code up to #29 and have the two folks making code standards changes in #32 do that work in a separate ticket.
I think code standards fixes should go into their own issue so as not to confuse the issue at hand. The commits in #32 and the patch in #35 seem to be mistakenly removing needed code in Remote.php.
Applied #9 to an issue fork, then removed the legacy curl functions that are no longer in use. Currently passing all tests, but needs community review.
As of now all tests are passing, except for 4 failures that would be solved by merging π Dont use curl, use the drupal client instead RTBC . Once that is resolved this should be ready as well.
Since php 8 is required for Drupal 10, I'm marking this as a child of π Drupal 10 compatibility Needs work to try and get that ticket completed. This potentially solves the last errors in the D10 test suite.
Consolidating this work into π Drupal 10 compatibility Needs work .
Consolidating the work into π Drupal 10 compatibility Needs work .
For speed and to keep it simple, I'm merging the work from [#3168858] and π Replace deprecated SimpleTest assertions Needs review here.
rschwab β created an issue.
Thanks for all your efforts on getting this module D10 ready, jrglasgow.
Closing this ticket as a duplicate of π Drupal 10 compatibility Needs work , as I see you've already rolled this work into that issue and related MR.
rschwab β created an issue.
More work is needed to make the test suite happy.
I just tested this branch out on a fresh 10.1.7 install and it works just as expected. I tested image, text, and tgz files using upload, remote, reference existing, and attach. The only thing I saw were php warnings that are already noted in #3313074.
+1 for RTBC
Fixed in 2.0.1 - thanks elaman!
Greg, see π Convert timestamps is broken Fixed for a fix to this feature. My apologies!
Patch fixes the problem for me.
rschwab β created an issue.
rschwab β created an issue.
Thank you! I have an interest in getting the test coverage done on this too, so I'll create a ticket for that and will make an attempt if and when time allows.
Elaman: I understand you're not actively developing this module anymore. We've used it at my institution for over a year now without any major issues. I propose its ready for a 2.0 release, and made this issue accordingly. I hope that's not too presumptuous.
I noticed you committed the coding standards changes and so I marked that ticket as fixed. I'll add it as a child to this one.
rschwab β created an issue.
It looks like this was merged into 2.x-dev with this commit: https://git.drupalcode.org/project/webform_googlesheets/-/commit/15c36b3...
Here is a patch made against the current 2.x-dev. The same issues remain as before, we are using it as described in #8.
Is it possible this is still broken in 2023? I'm using what seems to be a pretty straightforward configuration of CKeditor link with the entity embed. Adding a link to a drupal-media tag doesn't work, the link is placed above the media in the html. Am I doing something wrong or is this really still not working?
Bumping in the hopes this can make the next release for 9.x.