Problem/Motivation
The API page https://api.drupal.org/api/drupal/core%21modules%21field%21field.purge.i... (Field API bulk data deletion) lists the unrelated hook (function) hook_field_type_category_info_alter.
When that hook was added to field.api.php, it was mistakenly placed before the close of the field_purge group.
Steps to reproduce
Look at the list of functions on the API page.
Proposed resolution
Move the function hook_field_type_category_info_alter (and its docblock) after the close of the group:
/**
* @} End of "addtogroup field_purge".
*/
Remaining tasks
User interface changes
I am not sure this counts, but hook_field_type_category_info_alter will no longer be listed on https://api.drupal.org/api/drupal/core%21modules%21field%21field.purge.i....
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|
Issue fork drupal-3544005
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
benjifisherAnother fix would be to move the hook above the opening of the group:
In fact, it would be a good idea to reorganize all the hooks in
field.api.php, but that would not be a Novice task. In the Proposed resolution, I recommend moving the hook after the close of the group for two reasons:Comment #3
nicxvan commentedGood catch thanks! I agree this is novice with the scope in the issue summary.
Comment #6
nicxvan commented@luismagr please create the MR, i left instructive in this comment: https://www.drupal.org/project/drupal/issues/2943436#comment-16253399
Comment #8
luismagr commentedComment #9
luismagr commentedComment #10
luismagr commentedTests passed now. I'd say this is ready for review
Comment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #12
luismagr commentedRight, I'm not able to find how to fix what needs-review-queue-bot says. The txt file indicates that there's a phpstan error on field.api.php however, I'm not able to run it locally. Running phpstan locally scan the src directory, the tests and If I run it with -l 5 I can see field.module and field.purge.inc but not the field.api.php one.
Any advice here would be great.
Thanks
Comment #13
nicxvan commentedSo when there is something like that is usually means a rule changed upstream.
You need to rebase or update the fork to fix that, there are two ways to do this, one in the UI and one locally.
In the UI:
1. click on branch (not the MR) the link is called: 3544005-hookfieldtypecategoryinfoalter-should-not
2. Click update fork on the right
Locally:
1. checkout 11.x from head
2. git fetch
3. git rebase
4. Checkout this branch again
5. git rebase 11.x
Note that you will need to properly resolve conflicts if you rebase and is a bit beyond the scope of this issue so if you're not familiar with rebasing I would try the UI version and do some reading on rebasing.
Comment #14
luismagr commentedI've updated the brach using the UI. We'll see what the bot says now.
Thanks again @nicxvan :)
Comment #15
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #16
luismagr commentedI did it using the UI. I normally merge instead of rebasing but if that's the workflow I'm ok to do it manually. In this case I didn't want toncomplicate things.
I updated the branch with upstream and marked the issue as "needs review" but still got the same result. I can see it failed but there are no logs of what's exactly wrong.
I'll try tomorrow again to see if I can replicate it locally
Comment #18
luismagr commentedComment #19
luismagr commentedPipeline is failing. Needs to be checked
Comment #20
luismagr commentedComment #21
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #24
luismagr commentedComment #26
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #27
luismagr commentedI think I give up. I have no clue about how to fix this issue :(
Any help?
Comment #28
nicxvan commentedHappy to help here!
Here is how I fixed it.
Ensure my local 11.x is up to date
Get this fork
Update this fork
git rebase 11.xRun phpcs on the file
composer phpcs core/modules/field/field.api.phpSafely push with lease
git push drupal-3544005 --force-with-leaseComment #29
nicxvan commentedLet's see if the bot complains about this. The tests should run now.
Comment #30
luismagr commentedOk, I updated my local and rebase as well. I guess I missed some step. Anyway, I'll note down this advise.
Thanks for the info. Let see if it's ok now.
Comment #31
nicxvan commentedI think this is ready!
Normally you can't RTBC when you work on it without peer review, but my contribution here beyond advice was just a rebase and this is a super simple change I think it's fine to RTBC here.
Comment #32
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #33
nicxvan commentedI think this is due to no code changes and just documents.
Comment #34
luismagr commentedIt's really weird bit I'm glad to see that is nothing on my side :)
What you said makes sense so if there's a way to test that the final documentation is correctly generated that would be enough but if not, maybe we can cherry-pick the commit in a branch with some code modification on it
I'm not expert in contributing so I'm not sure how to proceed
Thanks for the help
Comment #35
quietone commented@nicxvan, thanks for providing instructions on this novice issue!
Another think one can do locally is to run the same checks locally that are run before a commit. That is all in the script,
./core/scripts/dev/commit-code-check.sh.Comment #38
quietone commentedCommitted af7c172 and pushed to 11.x and cherry-picked to 11.2.x Thanks!
Comment #39
quietone commentedAlso, the API docs are generated using the API project. One can test changes by
creating a local API site.
Comment #42
benjifisherI just want to add my thanks, too, since I am the one who created the issue.