Bug 39232 - auto_rebase script confusing handling of incorrect HTML structures
Summary: auto_rebase script confusing handling of incorrect HTML structures
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 04:30 UTC by Victor Grousset/tuxayo
Modified: 2025-03-05 07:27 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
auto_rebase-output.txt (4.42 KB, text/plain)
2025-03-05 06:21 UTC, Victor Grousset/tuxayo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2025-03-04 04:30:40 UTC
I tried it on Bug 23732.

See auto_rebase-output attached.

It errored on request.tt. But it still managed to commit. No conflict.
After testing, the basic functionality of the patch still works.
So that looked ok and I moved on with it.

But now looking at the diff there was definitely an issue.
2024-10-28 version of the 1st patch:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173427&action=diff&collapsed=&headers=1&format=raw
Same patch after auto rebase:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178886&action=diff&collapsed=&headers=1&format=raw

33.87 KB => 207.02 KB

Doing a diff between the two diffs shows massive additional changes in request.tt
And they aren't in a part changed by the original patch.
(so I rolled back to the old patch in the ticket)

And the error the script got is in those additional changes
«input class="multi_hold_item_checkbox» and the following </td> This is not in the original patch. I would have expected the error that started it all to be in the actual patch. So maybe it didn't start it all here.


-----------

Looking at other changes on Reserves.pm:
2024-10-28 version of the 1st patch:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173427&action=diff#a/C4/Reserves.pm_sec8
Same patch after auto_rebase:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178886&action=diff#a/C4/Reserves.pm_sec10

So now there are changes to sub _koha_notify_reserve and other subs after that. And they are removing things!
All while they was no error reported in that file.

So this plus the error on the <td> next to multi_hold_item_checkbox that is totally out of the original changes is suspicious.
Comment 1 Victor Grousset/tuxayo 2025-03-05 06:21:40 UTC
Created attachment 178948 [details]
auto_rebase-output.txt
Comment 2 Victor Grousset/tuxayo 2025-03-05 06:26:19 UTC
Bug 23732 introduces stuff removed with bug 38714.

+[% IF reserves_count >= Koha.Preference('maxreserves') %]
+    <span class="text-danger">
+[% ELSE %]
+    <span>
+[% END %]
+    [% tx('{preference_name} preference:', { preference_name = '<em>maxreserves</em>' }) | $raw %]
+    <strong>[% Koha.Preference('maxreserves') | html %]</strong>
+</span>

So the problem is more about that it's not clear.
Comment 3 Victor Grousset/tuxayo 2025-03-05 07:27:14 UTC
Because the error shows stuff not in the patch.