-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow changing entry creator from the edit entry screen #2141
Allow changing entry creator from the edit entry screen #2141
Conversation
- Add Created By (User) field to the edit screen - Renders the field on the entry form - Stores the value when the user has the correct rights - Refactored to get original user from old entry data instead of post value
…from-the-edit-entry-screen
@Mwalek Please take extra time to make sure that editing is only possible if a user has |
@doekenorg there is a fatal error when editing an entry:
Steps to Reproduce
|
…from-the-edit-entry-screen
@doekenorg, was the critical error fixed by merging the |
I mentioned to @Mwalek that I could not reproduce this. I don't understand where that mention is now gone. I feel like some updates are not persisted to Github very well; Or I'm dreaming about these things. So @Mwalek please let me know if the latest version has this problem; and what the specs are. Because I cannot reproduce this scenario. |
…from-the-edit-entry-screen
@doekenorg the fatal error is still there. I set up a new site where I installed db39fd4 along with GravityForms 2.8.17. The site is running on PHP 8.3. You can experience the error if you log in and click the edit button here: https://gv-issue-721.try.gravitykit.com/view/eins/entry/1/ (test:test) |
…from-the-edit-entry-screen
@Mwalek fixed, please update to the last build and try again. |
Thanks @doekenorg, it's not crashing anymore. Will test the rest of the functionality now |
@zackkatz @doekenorg hopefully not missing something obvious, but is it expected that the single entry shows the admin (as author)? (see image) Also, what are all the capabilities for users to edit the "created by" option? I listed the capabilities for the admin role ( The output was as follows:
|
That comes from the single.php template from your theme: https://docs.gravitykit.com/article/64-overriding-gravityview-templates (See the green notice) Also, to your other question, please check: https://docs.gravitykit.com/article/311-gravityview-capabilities |
Thanks @rafaehlers! @zackkatz the permissions are okay. Users can only change the creator if they have the 1. Custom Label Not Applied
2. "Show Label" Checkbox Not Functioning
3. Incorrect Label Name
4. Field Not Displayed When Empty
5. PHP Warning for Authors (map_meta_cap)
6. AF Condition – Restricted View After Editing Entry
I also noticed that it's possible to add more than 1 "Created By" option in the Edit Entry Layout tab. This does not cause any issues because one of them is hidden in the front end, but it might help avoid some confusion for the user if it wasn't possible to add more than one "Created By" field in the first place. Issue Summary
|
@doekenorg, over to you. |
@Mwalek issue 4, For 4 As for 1-3; those are fixed. Please test that. After that I think we can merge and release this @mrcasual . Edit: Fixed 5 on this one. |
Thanks @doekenorg! I can confirm that issues 1, 2, 3, and 5 are resolved. I created a seperate issue #2167 for item number 4 (field not displayed when empty). I guess we can ignore number 6 since it's expected. |
@mrcasual this is ready for release from my pov. |
This PR addresses #721.
💾 Build file (2cf7589).