Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tien.xuan.vo’s picture

Assigned: Unassigned » tien.xuan.vo
Status: Active » Needs work

Currently I'm working on 8.x version of this module. You can checkout it here filefield_sources 8.x

I'm almost done. I'll create a patch when every things are done.

tien.xuan.vo’s picture

Status: Needs work » Needs review
FileSize
178.29 KB

Here is the patch. Currently, Clipboard is not working on firefox. Imce is not working at all because imce module is not ported yet.

tien.xuan.vo’s picture

Here is new patch which includes:

  • Re-roll the patch.
  • Add test cases for all sources except for imce.
  • Fix coding standards warnings and errors using Coder 8.x-2.x-dev

Sorry, I can not create interdiff text file.

tien.xuan.vo’s picture

More coding standards warnings and errors fixed.

rootwork’s picture

Status: Needs review » Needs work

How's progress going on this? Would love to see a new commit in line with recent betas. Currently the most recent version installs cleanly and things can be enabled (took me a minute to find it there on "manage form display" instead of in the field settings themselves, but it's there).

But transferring files doesn't appear to work -- it starts the transfer and then just stops, with no error message or anything written to the log. Reference existing doesn't work either, and in the log I got this message:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.entity_reference.selection". in Symfony\Component\DependencyInjection\Container->get() (line 317 of /var/www/site/docroot/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php).

I didn't try the other options.

Let us know if there's anything we can do in terms of testing or providing feedback. Thanks so much for working on this incredibly useful module!

rootwork’s picture

Sorry, should have specified that I tried this on Drupal 8.0.0-beta9, which is the most recent beta as of this writing.

tien.xuan.vo’s picture

FileSize
219.2 KB

Here is new patch which includes:

  • Re-roll the patch.
  • Refactoring for better readable test cases.
  • Fix coding standards

I wonder if how we can enable automated testing for 8.x branch of this module.

tien.xuan.vo’s picture

Status: Needs work » Needs review

Change issue status.

DamienMcKenna’s picture

Title: Drupal 8.x » Port FileField Sources to Drupal 8
profak’s picture

Status: Needs review » Needs work

Hello @tien.xuan.vo!
What's with your Drupal 8 port? Are you still working on it?

jonathanshaw’s picture

We have it working with beta 14, upating the work of @tien.xuan.vo. I'll ask our developer to make a pull request to his github.

rivimey’s picture

Yes please! even a -dev version would be helpful!

profak’s picture

@jonathanjfshaw

Nice, i will wait for any changes!

jonathanshaw’s picture

OK, our work on D8 Filefield_sourceshas been shared as a PR with tien.xuan.vo's Github repo:
https://github.com/tienvx/filefield_sources/pull/1

It was done in D8 beta 14, I don't know if anything needs doing to make it compatible with RC1. Huge thanks to @tien.xuan.vo!

We've also created a submodule Filefield_sources_flysystem that extends Filefield_sources to have as a source remote filesystems through the Flysystem API. This makes it dead easy to load files from Dropbox, Amazon S3, and many other systems.

Best of all, there's an option "Serve file from current location". This only works when you also have the same Flysystem filesystem as both the source and the storage destination for the file field. What it does is it serves the file to end users from the remote, without storing it on your Drupal server. So you can pick a file on Dropbox, and serve it to visitors, without the file ever touching your site.

If you're interested, pls check it out and help with the review process to get the project upgraded from sandbox:
https://www.drupal.org/node/2604294

You can get the module here:
https://www.drupal.org/sandbox/arit_nath/2604164

Todd Young’s picture

Project page indicates this has been included in D8 core? (scratches head)

akalata’s picture

Category: Feature request » Task
Related issues: +#2608832: [filefield_sources] FileField Sources

@ToddYoung that project page message is generated by contrib_tracker info, which is incorrect.

tien.xuan.vo’s picture

The MR on #14 has been merged. Many thanks to aritnath1990. Currently all sources are working except Imce. We also need to add test cases for Imce too. MRs are welcome.

giorgio79’s picture

Issue summary: View changes

I would love to see additional sources, such as Google Drive, Facebook etc. This D8 module already integrates with remote providers https://www.drupal.org/project/avatars

Or the patch here could be ported to D8 #1798282: Source: Google Drive

giorgio79’s picture

Issue summary: View changes

Changed issue summary by accident.

idflood’s picture

I've enabled this module on a website and it works perfectly except for one error. Here is the error displayed in the log entries:

LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1433 of /.../core/lib/Drupal/Core/Database/Connection.php).

To reproduce this error:
- enable at least 2 languages
- On an unlimited image field enable translation of the "alt" text.
- upload a file on this field, define an alt
- translate the node
- then finally try to remove the image. This will not work, there is no way to remove the image since the exception happen.

Maybe this can be a followup once the module is officially available for drupal 8.

jonathanshaw’s picture

#18 @giorgio79 Regarding Google Drive, consider accessing it via Flysystem using Filefield_sources_Flysystem
https://github.com/thephpleague/flysystem/issues/192
https://packagist.org/packages/ignited/flysystem-google-drive
https://www.drupal.org/sandbox/arit_nath/2604164

tien.xuan.vo’s picture

Status: Needs work » Needs review
FileSize
233.51 KB

What's new in this patch:

  • Imce source works.
  • Include a patch from another issue #2638914-3: Files will not be removed from server directory with attach_mode 'move'.
  • Changes from a MR of aritnath1990
  • @idflood I think I can't reproduce your bug.
    1. I enable 2 languages: english and vietnamese.
    2. Then make image field unlimited and translatable.
    3. Then upload an image to that field, define an alt.
    4. Then translate that node to vietnamese.
    5. Then edit the node and remove the image (in english version). And I can remove the image without any errors.
idflood’s picture

@tien.xuan.vo you are right, my issue was eventually caused by another module (inline entity form). I really should have tested on a clean install : /

charos’s picture

Isn't the source material enough to release at least an alpha version?

arknoll’s picture

I think we should at least push this to an 8.x branch at the very least.

grahl’s picture

+1 for pushing tien.xuan.vo's branch to d.o

I am aware of a bug in the widget though, which I haven't been able to resolve yet. The ajax handler doesn't get attached properly so that regular uploads require a save before the actual uploading happens. Note that this also applies to fields where only the upload source is active, when the module is enabled.

jonathanshaw’s picture

Looks like @profak got maintainer access after @quicksketch focused on Backdrop, but he has not been very active.

Would someone else be up for creating a D8 branch and committing patches, if they were given the necessary permissions?

tien.xuan.vo has been the one really looking after this d8 port.

profak’s picture

Hi @jonathanjfshaw,
i'm here :) ll create 8.x branch.

jonathanshaw’s picture

Awesome! Thanks :)

Fidelix’s picture

@profak, when can we expect that?

Thanks.

profak’s picture

@Fidelix,
branch is available.

I've just started to review code.

gnuget’s picture

I'm working on a project which required this module be at least beta, is there something to I can do to help moving forward this to reach the first beta?

besides #2755707: WSOD: array_slice($element['#array_parents'], 0, -1); is null it seems to there is nothing critical in the queue.

BTW, Awesome work!

Thanks!

hanoii’s picture

What's the status of this? There's not much active development, is there any replacement out there?

jonathanshaw’s picture

There is an 8.x-1.x branch, it's just that it doesn't show up on the project home page.

@profak you can you fix this, and cut an alpha release, even if you've not had time to review the code. People are probably using it in production anyway ...

Shane Birley’s picture

I have been testing out Drupal 8 dev release for the last couple of months and it seems to work without issue. I am able to do everything that I have done on Drupal 7. I will keep pushing it to see if I can break it.

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

In addition to the comments noting it is working, we've been using the 8.x-dev branch on a couple production sites for months. This is ready to be tagged with a release!

rivimey’s picture

@profak you can you fix this, and cut an alpha release, even if you've not had time to review the code. People are probably using it in production anyway ...

@profak / @quicksketch - could you push a release please?

k_zoltan’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Assigned: tien.xuan.vo » Unassigned

Please please please create a release.

k_zoltan’s picture

Priority: Normal » Major
GiorgosK’s picture

Only thing that does not seem to work is
Reference existing: Search all: Yes
but other than that it seems everything else is working as it should

gnuget’s picture

Ideally we could create an issue to fix #40 and create the release, yes?

jonathanshaw’s picture

Someone needs to step up to be a new maintainer it seems

gnuget’s picture

I sent a message to profak to see if he can help us to create an alpha release of this module.

Let's see if he is around before to start looking for new maintainers.

darrenw16’s picture

Hey installed this module and go to Structure ->Content types->Collective Story->Manage fields try to edit an image field so it can take urls bu the file field options to do this are not there. Is this module working correctly for anyone I installed the 8.x-1.x dev branch.

gnuget’s picture

I've been using the module for a while.

The settings are now in the "display field settings"

darrenw16’s picture

@gnuget where do I find the display field settings are they still under the Structure area ? Cheers for the reply mate

Its ok found it under Manage -> Structure -> Content types and click "Manage form display" edit an image field. Then you should see file sources. Thanks for the help

gnuget’s picture

Glad to help!

gnuget’s picture

Status: Reviewed & tested by the community » Fixed

I just created the first alpha release of this module!!! :-D

I'm going to close this issue.

Thanks for all the work!

mlncn’s picture

Whoohoo! Congratulations!

OFF’s picture

Cool!

DamienMcKenna’s picture

@gnuget: thanks for stepping up to comaintain this module!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.