Closed (fixed)
Project:
Diff
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2018 at 05:40 UTC
Updated:
14 Jun 2024 at 04:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jim.m commentedAttaching the patch.
Comment #4
jim.m commentedAdd missing newline to the end of patch, seems to fail without it.
Comment #6
jim.m commentedTest failures are irrelevant to the patch and they actually fail without the patch too. Tested locally with both 8.6 and 8.7.x-dev Drupal core and it results in the same failures without the patch.
Comment #7
alan d. commentedJust running the tests against Drupal 8.5, albeit on 11 May 2018 dev past using D8.6 so something fishy could be going on.
Comment #8
alan d. commentedLooks good, even with the unrelated test failures.
UnifiedFieldsDiffLayout & SplitFieldsDiffLayout may have some issues, some of the codes a bit hard to follow and probably best dealt with separately. I guess this was tested manually, so assumable the inconsistency is handled in the code.
i.e. row class attributes are defined with both scalar and array, then copied into other table rows inconsistently.
Comment #9
sasanikolic commentedHere is an improved patch. I looked up for all class definitions in the module and replaced it with the new [] convention.
Comment #10
richardgaunt commentedTested and reviewed - working.
The patch changes look reasonable and bringing the module into the convention that attribute class is an array rather than a string.
Comment #11
phenaproximaI think my only worry here is that this will break custom code which expects the attributes to be strings, rather than arrays...am I overthinking it, or is that a reasonable concern?
Comment #12
richardgaunt commentedI think it's the vice versa, I came looking for and found this patch because it was breaking my custom code.
Comment #13
grimreaperHi,
Encountered a fatal error with #3367502: Fatal error when using the Diff module yesterday due to class attribute not being an array.
I will secure contrib theme but it would be good that this issue is fixed.
Thanks for the patches.
Comment #16
berdirConverted to an MR and rebased, this conflicted pretty heavily with a change that converted to short array syntax.
I slightly changed some of the ternary conditions, so that the fallback is an empty array and not an array with NULL.
Comment #18
acbramley commentedLooks like #2980335: Define CSS classes as an array missed some of these. Rebasing and running fresh pipelines.
Comment #19
acbramley commentedComment #20
acbramley commentedComment #23
acbramley commented