Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The 'Add forum' and 'Add container' forms refer to term instead of forum:
Proposed resolution
Update the form element descriptions to correctly refer to 'Forum' / 'Container'.
Remaining tasks
- Write a patch
- Review
User interface changes
Form element descriptions on 'Add forum'/'Add container' correctly refer to 'Forum' / 'Container' respectively.
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#82 | 2453495-82.patch | 6.25 KB | sahil.goyal |
#78 | 2453495-78.patch | 6.23 KB | _utsavsharma |
#78 | interdiff_77-78.txt | 1.3 KB | _utsavsharma |
#77 | 2453495-77.patch | 6.25 KB | sahil.goyal |
#75 | reroll_diff_61-75.txt | 5.29 KB | sahil.goyal |
Comments
Comment #1
rosinegrean CreditAttribution: rosinegrean commentedComment #2
larowlanWe already have a form alter here, so just need to expand what it is doing, and the tests
Comment #3
rosinegrean CreditAttribution: rosinegrean commentedAltering the weight description is easy, but for example we already have in ForumForm.php :
which are not working anymore. They all come from the baseFieldDefinition of the taxonomy term entity and I don't know what would be the cleaner way to alter this.
Comment #4
dpopdan CreditAttribution: dpopdan commentedFixed the basefield titles and descriptions.
Comment #5
dpopdan CreditAttribution: dpopdan commentedComment #6
dpopdan CreditAttribution: dpopdan commentedComment #7
rosinegrean CreditAttribution: rosinegrean commentedThanks @dpopdan, if this is the solution, then it must be added in the ContainerForm.php as well
Comment #9
idebr CreditAttribution: idebr commented@prics @dpopdan Thanks for working on this issue! The new form fields look great, just two points left:
The old description was for the 'parent' field and does apply to the container description.
Comment #10
dpopdan CreditAttribution: dpopdan commentedI added some tests and made some refractoring on \Drupal\forum\Tests\ForumTest because it violated the coding standars very bad. I also changed the description for the parent field.
Comment #11
larowlanthis needs to be public. Can you revert the coding standards changes and file a new issue (post the link here). Will make it easier to review this and as a bonus, you'll get an extra commit mention. Put me down to review the other issue.
Comment #12
dpopdan CreditAttribution: dpopdan commentedWrong interdiff, sorry . The good one in the next comment.
Comment #13
dpopdan CreditAttribution: dpopdan commentedComment #14
Shivam Agarwal CreditAttribution: Shivam Agarwal commentedI am uploading two patches one with name contains reproduce which reproduce the problem if already solved and another patch which contains name as solution is patch to resolve that bug.
Comment #16
Shivam Agarwal CreditAttribution: Shivam Agarwal commentedHere is the screenshot of interface after applying patch.
Comment #17
rosinegrean CreditAttribution: rosinegrean commented@Shivam Agarwal, I don't understand what you did in #14
@larowlan the patch in #12 looks good for me
Comment #18
Shivam Agarwal CreditAttribution: Shivam Agarwal commented@prics #17 my first patch which failed in testing was created in order to reproduce the problem in case it is rectified on someone's localhost so as to understand where the actual problem was. Second patch is the solution of the problem i.e. the main motive for which issue was created for. I hope that is meaningful now.
Comment #19
larowlanAny reason why we don't do this one in prepareEntity too?
No need for the default
Comment #20
dpopdan CreditAttribution: dpopdan commented@larowlan the description for the weight is hardcoded from TermForm, it doesn't came from the entity.
The same thing is on $form['parent']. So, I think that is OK.
Comment #21
notmike CreditAttribution: notmike commentedI verified that the patch does what it is supposed to, but it adds a tab instead of a space in ForumTestphp at the start of line 355, and it adds an extra space at the end of line 358.
Comment #22
larowlanBased on last review
Comment #23
mglamanUpdated patch to fix tab, space, and extra +'s (noted in #21)
Comment #24
PinoloTests are failing for the Forums (tested also with clean HEAD).
Failure should be unrelated to the patched code (seems to be about forum topic creation).
Here's the test report.
Comment #27
quietone CreditAttribution: quietone as a volunteer commentedPatch doesn't apply to 8.2.x. Setting to unassigned since this hasn't been touched for about one year.
Comment #28
hussainwebRerolling the patch in #23. Removing 'Needs Review' tag as it was vague.
Done in a live webinar on Drupal contributions.
Comment #29
quietone CreditAttribution: quietone as a volunteer commentedThanks. Applied that patch and found 'Forums are displayed in ascending order by weight.' is duplicated on screen. Screen shots follow.
And found a few things.
Indentation errors/
Blank link needed here, I think.
Indentation
Blank line.
Screenshots after applying patch in #28
Comment #30
quietone CreditAttribution: quietone as a volunteer commentedSettings to NW.
Comment #31
larowlanLooking good - couple of minor observations
nit, indent is wrong
this feels like it should be two different methods, verifyForumForm and verifyContainerForm - thoughts?
Comment #32
MaskyS CreditAttribution: MaskyS at Google Code-In commentedWill try to work on this so assigning this to myself :)
Comment #33
MaskyS CreditAttribution: MaskyS at Google Code-In commentedComment #34
Ketan Harit CreditAttribution: Ketan Harit commentedComment #35
Ketan Harit CreditAttribution: Ketan Harit commentedComment #36
Ketan Harit CreditAttribution: Ketan Harit commentedComment #37
Winthropian CreditAttribution: Winthropian as a volunteer commentedI am looking at this as part of SprintWeekend2017
Comment #38
Winthropian CreditAttribution: Winthropian as a volunteer commentedTested in 8.2 and looks good.
Add Forum before
Add Forum after
Add Container before
Add Container after
Comment #39
tstoecklerThe alignment is wrong here, these should all line up.
This is the first time that we are changing base field definitions in a form and I don't think it's really a good idea. Is there absolutely no way we can do this by actually altering the form array?
Comment #41
rosinegrean CreditAttribution: rosinegrean commentedComment #42
rosinegrean CreditAttribution: rosinegrean commentedHello,
Fixed the alignment.
For the base field definitions, i don't know of another solution.
So we leave it like this ?
Thanks,
Comment #43
larowlan#2861022: ForumForm and ContainerForm forms are rendered using wrong texts
Comment #44
rosinegrean CreditAttribution: rosinegrean commentedSo after 2 yers this issue was created, it was merged in another issue created last week ?
Comment #45
larowlanYeah, that's what I'm trying to ascertain.
What I think has happened, is that issue appears to be 'fixed' based on the commit message, but actually, the commit message refers to the wrong issue, and the patch is for something else.
I'm going to close the other one as a duplicate.
Comment #46
larowlanClosed the other one and left a tell for lauriii to confirm it was just an issue number mismatch
Comment #47
darius.restivan CreditAttribution: darius.restivan commentedThe problem seems to be resolved. Can we change the status into RTBC ?
Comment #48
akashkrishnan01 CreditAttribution: akashkrishnan01 at Google Summer of Code commentedpatch #42 not applying with my core files. So, I have rerolled this patch with my version.
Comment #49
akashkrishnan01 CreditAttribution: akashkrishnan01 commentedComment #51
akashkrishnan01 CreditAttribution: akashkrishnan01 at Google Summer of Code commentedRerolled patch with proper coding standard
Comment #52
akashkrishnan01 CreditAttribution: akashkrishnan01 commentedComment #54
rosinegrean CreditAttribution: rosinegrean at PitechPlus commentedIt looks like you are adding the verifyForumForm() method into the ForumForm class and not the FormFormTest class.
Because the method is not in the test class, the tests fail with "Call to undefined method ..."
I will take a look at it.
Comment #55
Solthun CreditAttribution: Solthun commentedComment #56
Solthun CreditAttribution: Solthun as a volunteer and commentedRe-rolled patch.
Original name field descriptions were not even showing up anymore.
Now all seems to be working fine.
Comment #57
Solthun CreditAttribution: Solthun as a volunteer and commentedComment #58
quietone CreditAttribution: quietone as a volunteer commentedFound two small things.
Needs a blank line after the method.
Remove extra blank line.
Comment #59
quietone CreditAttribution: quietone as a volunteer commentedComment #60
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #61
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedMade changes as per the comment #58. Applying the patch, please review.
Comment #62
akashkrishnan01 CreditAttribution: akashkrishnan01 at Google Summer of Code commentedMunavijayalakshmi, thanks for your patch. I have reviewed this patch and seems working, moreover, the duplicate string issue has also been fixed.
Comment #63
quietone CreditAttribution: quietone as a volunteer commented@akashkrishnan, thanks for review. Can you explain what you mean by 'seems working'? I'm wondering if there is something you are not sure about? Did you install the patch and look at the addforum page? If you did, can you add a screenshot to confirm that this patch fixes the issue?
Comment #64
akashkrishnan01 CreditAttribution: akashkrishnan01 at Google Summer of Code commentedadd_forum_container-2453495-61.patch successfully applied and the issues are fixed now, here I have uploaded a few screenshots showing the fixed areas.
Comment #65
akashkrishnan01 CreditAttribution: akashkrishnan01 at Google Summer of Code commentedComment #66
tstoecklerSo my point 2. in #39 was never addressed as far as I can tell. I am going to take a stronger stance now and say that we definitely should not be altering the property definitions at runtime. Let's just override the form directly where we need to.
Comment #75
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedAs seen that #61 is no longer compatible with the current version so Reroll the patch for the version 9.4.x and attaching the reroll_diff file for the same.
Comment #76
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedRefactoring the CCF erros at above patch
Comment #77
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedSorry, As my PHPCS is not working on my local so i address the fixes manually though
Comment #78
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs commentedFixed CCF for #77.
Please review.
Comment #79
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs commentedComment #82
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #83
quietone CreditAttribution: quietone as a volunteer commentedForum is approved for removal. See #1898812: [policy] Deprecate forum module for removal in Drupal 11
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
It will be moved to the contributed extension once the Drupal 11 branch is open.