Closed rohnsha0 closed 3 weeks ago
@mauritsvanrees @jensens pleasse check if it breaks anything?
@jenkins-plone-org please run jobs
@jenkins-plone-org please run jobs
Seems to work. Actually, I tried with for example userid maurits+1
and email address maurits+1@example.org
.
I only saw one problem. The author page (/author/maurits+1
) has a link to the search page with all content created by this author. See this line in author.pt.
Locally this links to:
http://localhost:8080/Plone/search?Creator=maurits+2
This gives no search results. Instead it should be:
http://localhost:8080/Plone/search?Creator=maurits%2B2
That is the same as for example the users control panel does. It links to this user information url:
http://localhost:8080/Plone/@@user-information?userid=maurits%2B2
That is done in this line:
So we would need a similar makeQuery
call on the author page.
Note that you can also go to the portal_registration
tool in the ZMI and then the Configure panel:
http://localhost:8080/Plone/portal_registration/manage_editIDPattern
There you can specify an alternative user id pattern:
I tried it and it still works. So if you want this in your own site, you can simply change the pattern in the ZMI.
in below code this_user is groupMember but what to get in case of username previously in author.pt we have view/username... now? https://github.com/plone/Products.CMFPlone/blob/f7a537773cae9c4b56f57e31ac02192a7ce35648/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.pt#L133
In author.pt
it was:
Creator=${username}
So now it should be:
Creator=${view.makeQuery(username)}
makeQuery
is defined here:
So you would need to copy that method (and the import it needs) to the AuthorView class.
I think that should be it.
@mauritsvanrees kindly verify the changes
Yes, now it is fine. Thanks!
@rohnsha0 thanks for creating this Pull Request and helping to improve Plone!
TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.
Happy hacking!