Summary: | Stray "//" appears at bottom of opac-detail.tt | ||
---|---|---|---|
Product: | Koha | Reporter: | Eric Phetteplace <ephetteplace> |
Component: | OPAC | Assignee: | Eric Phetteplace <ephetteplace> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | ephetteplace, hayleypelham, martin.renvoize, nick |
Version: | 18.11 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.05.00, 18.11.05
|
|
Circulation function: | |||
Attachments: |
screenshot of stray characters
patch patch Bug 22551: Stray "//" appears at bottom of opac-detail.tt Bug 22551: Stray "//" appears at bottom of opac-detail.tt |
Description
Eric Phetteplace
2019-03-20 16:33:36 UTC
Created attachment 86824 [details] [review] patch I think you're right to identify that section as obsolete, but I don't think that's what's causing the problem. There is a stray "//]]>" further down in the template. A "//<![CDATA[" marker was removed without cleaning up the ending marker. Please also take a look at our guidelines for commit messages: https://wiki.koha-community.org/wiki/Commit_messages I do see that other stray "//]]>" around line 1720 of opac-detail.tt but it is not what's causing the text to display—inspect an opac-detail page in your web browser, the segment I removed (just above an orphaned closing </script> tag and the Twitter script) falls outside any <script> tags which is why the browser renders it as a text node. That second stray "//]]>" is inside a very long <script> tag with several functions (OpacHighlightedWords, OPACShelfBrowser,IDreamBooksReviews, etc.) and thus not rendered as text. In any case, I can re-submit a patch that removes both since that seems to be the right thing to do. It's not actually clear to me what's wrong with my commit message...I can be more descriptive but I thought I stated the bug number/name in the subject and outlined the testing plan already. Created attachment 87568 [details] [review] patch (In reply to Eric Phetteplace from comment #3) > In any case, I can re-submit a patch that removes both since that seems to > be the right thing to do. It's not actually clear to me what's wrong with my > commit message...I can be more descriptive but I thought I stated the bug > number/name in the subject and outlined the testing plan already. It doesn't look like the bug number or description is in the first line of your patches, it should be. Also the patch should be descriptive, the commit you attached was: 'patch' It should be: 'Bug 22551: Removed stray characters from opac-detail.tt There are stray characters, for the reasons outlined in the bug report. This patch fixes that. Test plan: 1) Note the extra characters on the template 2) Apply the patch 3) Verify the characters have disappeared' or something similar. Not a dig, just trying to make what Owen said clearer :) I will test this patch now (In reply to Hayley Mapley from comment #5) > (In reply to Eric Phetteplace from comment #3) > > > In any case, I can re-submit a patch that removes both since that seems to > > be the right thing to do. It's not actually clear to me what's wrong with my > > commit message...I can be more descriptive but I thought I stated the bug > > number/name in the subject and outlined the testing plan already. > > It doesn't look like the bug number or description is in the first line of > your patches, it should be. Also the patch should be descriptive, the commit > you attached was: > > 'patch' > > It should be: > 'Bug 22551: Removed stray characters from opac-detail.tt > > There are stray characters, for the reasons outlined in the bug report. This > patch fixes that. > > Test plan: > 1) Note the extra characters on the template > 2) Apply the patch > 3) Verify the characters have disappeared' > > or something similar. > > Not a dig, just trying to make what Owen said clearer :) I will test this > patch now (In reply to Eric Phetteplace from comment #3) > I do see that other stray "//]]>" around line 1720 of opac-detail.tt but it > is not what's causing the text to display—inspect an opac-detail page in > your web browser, the segment I removed (just above an orphaned closing > </script> tag and the Twitter script) falls outside any <script> tags which > is why the browser renders it as a text node. That second stray "//]]>" is > inside a very long <script> tag with several functions > (OpacHighlightedWords, OPACShelfBrowser,IDreamBooksReviews, etc.) and thus > not rendered as text. > > In any case, I can re-submit a patch that removes both since that seems to > be the right thing to do. It's not actually clear to me what's wrong with my > commit message...I can be more descriptive but I thought I stated the bug > number/name in the subject and outlined the testing plan already. (In reply to Hayley Mapley from comment #5) > (In reply to Eric Phetteplace from comment #3) > > > In any case, I can re-submit a patch that removes both since that seems to > > be the right thing to do. It's not actually clear to me what's wrong with my > > commit message...I can be more descriptive but I thought I stated the bug > > number/name in the subject and outlined the testing plan already. > > It doesn't look like the bug number or description is in the first line of > your patches, it should be. Also the patch should be descriptive, the commit > you attached was: > > 'patch' > > It should be: > 'Bug 22551: Removed stray characters from opac-detail.tt > > There are stray characters, for the reasons outlined in the bug report. This > patch fixes that. > > Test plan: > 1) Note the extra characters on the template > 2) Apply the patch > 3) Verify the characters have disappeared' > > or something similar. > > Not a dig, just trying to make what Owen said clearer :) I will test this > patch now Ahh I see. Did you remove the description when you attached the commit? I see it now that I am amending to your commit that your commit message is perfect. Created attachment 88041 [details] [review] Bug 22551: Stray "//" appears at bottom of opac-detail.tt Removes a couple stray "//<![CDATA[" like comments which are artifacts of other code that since been removed. One of the comments causes two forward slashes to appear at the bottom of each OPAC detail page. Testing plan: - enable SocialNetworks - visit any OPAC detail page, observe "//" at bottom of page - apply patch - revisit page, slashes should be gone Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Thank you, Hayley, that helps me understand what I did wrong. You're exactly right—I didn't enter a description or "comment" when I selected "add an attachment" in bugzilla because I thought the patch file itself was the only thing that mattered; my patch looks the same as yours it's just I didn't fill out the Bugzilla form correctly. I'll do that next time! Created attachment 88688 [details] [review] Bug 22551: Stray "//" appears at bottom of opac-detail.tt Removes a couple stray "//<![CDATA[" like comments which are artifacts of other code that since been removed. One of the comments causes two forward slashes to appear at the bottom of each OPAC detail page. Testing plan: - enable SocialNetworks - visit any OPAC detail page, observe "//" at bottom of page - apply patch - revisit page, slashes should be gone Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> It's great to see such teamwork going on here guys, well done. Patch works well and causes no regressions.. Passing QA As an addendum to the advice given here, you might find git-bz helpful Eric. https://wiki.koha-community.org/wiki/Git_bz_configuration It's automates the creation and upload of patches to bugzilla (as well as making the application of such patches to your development environment very simple too) Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.05 |