My coworker (JensH) has started to port Realname Module to Drupal 8. I reviewed it and fixed a couple of small issues. So the most credit goes to him. There are a few @todos left and there is not upgrade path from D7 atm.
The biggest issue is in NodeFormController. NodeFormController::form uses $node->getAuthor()->getUsername()
which means the users realname is used as default value in the form. Which means the node submit action does not validate anymore.
I think we have to override the form controller or change the values in $form_state somewhere. This is a general problem in all entity forms.
I tried to override the User autocomplete service in RealnameServiceProvider. It is possible but i think it should be configurable.
Please review!
Thanks!
Comment | File | Size | Author |
---|---|---|---|
realname-d8.patch | 27.64 KB | webflo | |
Comments
Comment #1
hass CreditAttribution: hass commentedI made some commits to D7 that fixes bugs. Please re-role with this changes so we do not run into regressions.
Comment #2
hass CreditAttribution: hass commentedCreated 8.x branch for you.
Comment #3
hass CreditAttribution: hass commentedNeeds re-role.
Comment #4
hass CreditAttribution: hass commentedJust a quick review...
That's not correct.
It looks like this patch removes Entity Reference support.
Comment #5
tkuldeep17 CreditAttribution: tkuldeep17 commentedComment #6
id.tarzanych CreditAttribution: id.tarzanych commented@tkulldeep17
Do you have some results for this issue
Can I try to develop porting patch for drupal 8.0.0-beta10?
Comment #7
cassio CreditAttribution: cassio commentedSo I'm reading about Drupal 8 module ports, and some of them say "partial" including media, and some others.
I think this is a wonderful approach to have basic functionality in core. If Token is going to be in core, then real name is an extension of token.
If we are going to hold up this port because of Entity Reference, then I think we should partially port it until we have the entity reference fixed. And I do not deny that entity reference is one of the things that makes Drupal great. As an intermediate Drupal developer, I mostly see it used by Organic Groups and Drupal Commerce, although I am always connecting the dots in new ways.
That goes to show it should be remedied, but it should not be a block. Right now, my one site uses it to send e-mail as a token, and real name's lack of readiness may prevent that port, which is hazardous given Drupal 6's soon to be end of life.
--Sam
Comment #8
tkuldeep17 CreditAttribution: tkuldeep17 at Axelerant commentedComment #17
hass CreditAttribution: hass commentedComment #25
hass CreditAttribution: hass commentedTODO: Test if we really need the recursion protection validation any longer.
Comment #26
hass CreditAttribution: hass commented@webflo: Can you help reroling the missing parts, please? The code in the sandbox is such old... we need to check every line as a lot of things have changed and/or are no longer working because of core changes. The sandbox is also not based on the latest D7 code.
Comment #28
hass CreditAttribution: hass commentedWe may also rethink if we should rename the module to Display name. It does not give us anything real, but we follow the new naming of the
display-name
token.Comment #38
hass CreditAttribution: hass commentedComment #39
hass CreditAttribution: hass commentedComment #40
hass CreditAttribution: hass commentedComment #43
hass CreditAttribution: hass commentedCore has a bug
Comment #44
hass CreditAttribution: hass commentedComment #45
hass CreditAttribution: hass commentedComment #46
Ronald van Belzen CreditAttribution: Ronald van Belzen as a volunteer commentedMy apology when this is not the proper place. But I noticed, what I think is an error in the code of realname.module that seems easy to mend.
The error according to the log was:
TypeError: Argument 1 passed to realname_update() must be an instance of Drupal\user\Entity\User, string given, called in C:\...\wwwroot\modules\realname\realname.module on line 110 in realname_update() (line 289 of C:\...\wwwroot\modules\realname\realname.module).
Comment #47
grahlThe 8.x-1.x branch seems to work relatively well, could this branch be set as supported so installing with composer is easily possible? Thanks!
Comment #48
hass CreditAttribution: hass commentedNo, it is not working properly. Please help getting the core issue RTBC and the open todo's fixed.
Comment #49
grahlWaiting for the core issue to be committed before providing access to the development branch for a minor display issue is unreasonable from my perspective. It might block a stable release or maybe even a beta release but with the fixes now in the issue queue the module is at the very least a usable dev-branch.
Comment #50
hass CreditAttribution: hass commentedThe core issue is not a blocker. The module has errors and I asked for help, but until now, nobody tried to help.
Comment #51
hass CreditAttribution: hass commentedComment #58
hass CreditAttribution: hass commentedComment #59
hass CreditAttribution: hass commentedComment #60
tormi@hass & Co, great work! But there's no tagged release yet, maybe keep this open until that?