πŸ‡ΊπŸ‡ΈUnited States @rschwab

Account created on 31 August 2009, almost 15 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.
πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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:

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

+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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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).

πŸ‡ΊπŸ‡ΈUnited States rschwab

If anyone wants to test with a patch instead, its attached.

πŸ‡ΊπŸ‡ΈUnited States rschwab

In case anyone wants a patch to test this, the current MR is attached here in patch format.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

The issue branch resolves the issue by restoring the removed code.

πŸ‡ΊπŸ‡ΈUnited States rschwab

rschwab β†’ changed the visibility of the branch 2.0.x to hidden.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

Consolidating this work into πŸ“Œ Drupal 10 compatibility Needs work .

πŸ‡ΊπŸ‡ΈUnited States rschwab

Consolidating the work into πŸ“Œ Drupal 10 compatibility Needs work .

πŸ‡ΊπŸ‡ΈUnited States rschwab

For speed and to keep it simple, I'm merging the work from [#3168858] and πŸ“Œ Replace deprecated SimpleTest assertions Needs review here.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

More work is needed to make the test suite happy.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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

πŸ‡ΊπŸ‡ΈUnited States rschwab

Fixed in 2.0.1 - thanks elaman!

πŸ‡ΊπŸ‡ΈUnited States rschwab

Greg, see πŸ› Convert timestamps is broken Fixed for a fix to this feature. My apologies!

πŸ‡ΊπŸ‡ΈUnited States rschwab

Patch fixes the problem for me.

πŸ‡ΊπŸ‡ΈUnited States rschwab

rschwab β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

rschwab β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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.

πŸ‡ΊπŸ‡ΈUnited States rschwab

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?

πŸ‡ΊπŸ‡ΈUnited States rschwab

Bumping in the hopes this can make the next release for 9.x.

Production build 0.69.0 2024