Now that drupal 8 is in beta stage, there will be a port of this module to d8?

CommentFileSizeAuthor
#15 ProfileFromURL.zip1.6 KBlaboratory.mike

Comments

huma2000’s picture

Title: Drupal 9 port » Drupal 8 port
francewhoa’s picture

Category: Feature request » Task

Any volunteers to port "Entityreference prepopulate" module from Drupal 7 to 8?

Related pages

We would be happy to contribute testing patch, quality assurance, documentation, and agile project management services if needed

francewhoa’s picture

Title: Drupal 8 port » Port "Entityreference prepopulate" to Drupal 8
Issue tags: +Drupal 8

I updated this ticket title so it's easier to find with aggregators and search engines

mccrodp’s picture

I have made a start on this, but need some extra info re Plugins/ Ctools, etc., so if anybody has any to share, please follow / post on #2615320: [entityreference_prepopulate] Entityreference prepopulate

topplestack’s picture

I'll post the same as the other ticket. What still needs to be done on this issue. Is there any way that I can lend a hand?

RKopacz’s picture

Anything I can do to help with this module?

borisson_’s picture

Issue tags: -Drupal 8

Removed the issue tag for drupal 8, we'll need to start by running the module upgrader and attaching that as a patch to this issue.

If that's done and reviewed, the maintainer can open a new branch and commit that patch to it.

kristofferwiklund’s picture

drupaldope’s picture

kristofferwiklund’s picture

@manarak it worked for me. Setting a default value via the url: /node/add/selector?edit%5Bfield_customer%5D=520

berenddeboer’s picture

People might be interested in a port I just did: https://www.drupal.org/project/referer_to_entity_reference

It uses the HTTP Referer field to set the value.

matt_paz’s picture

Prepopulate seems to be working reasonably well for me.
https://www.drupal.org/project/prepopulate

For other cases, you might checkout out
https://www.drupal.org/project/views_add_button

david.qdoscc’s picture

In D7 I frequently used the action to hide or disable a prepopulated field. Please can anyone suggest how would I achieve the same functionality in D8 using the modules linked above, or by alternative methods?
Thanks in advance.

loze’s picture

@qdoscc Did you ever figure out a way to do this? I can't seem to figure it out either.

thanks

laboratory.mike’s picture

StatusFileSize
new1.6 KB

I have recently had to write something that does this logic, and in particular, either uses a URL parameter, or falls back to showing all options. This is not a port, but with a little cleanup it could be made into a module that handles the core field_x=id logic.

To make it a module, you would only need a .info file, and this file in src/Plugin/EntityReferenceSelection. Given the use case this file used 'profile' by default for the query parameter, so part of the cleanup would be to use the field name by default. This does give you the option to specify the query parameter if the default is not desired. The fallback is to show all items.

I'm thinking we could show expose the sort property of the DefaultSelection plugin, update the field reference, and we would have a candidate for a basic port. If this sounds good, I could roll it into a patch.

@matt_paz Thanks for linking VAB :) Glad that module is becoming useful.

anruether’s picture

Among the modules that do something like this, there is also https://www.drupal.org/project/epp we have in use.

anybody’s picture

I don't have the permission to edit the module page, so it would be nice if the maintainer could add the listed modules as Drupal 8+ alternatives and add a statement that there won't be a Drupal 8+ version for this module.

Should we add an issue for a migration path?

anybody’s picture

Status: Active » Fixed

I was granted permission and added the following to the module page:

No Drupal 8+ versions planned

See #2361419: Port "Entityreference prepopulate" to Drupal 8 - this module will not have any Drupal >=8 releases or development! See "Alternative Modules".

Alternative modules (Drupal 8+)

Helpful modules

Status: Fixed » Closed (fixed)

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