Download & Extend

"Manual updates required" table broken

Project:Drupal core
Version:7.x-dev
Component:update.module
Category:bug report
Priority:normal
Assigned:keichee
Status:closed (fixed)
Issue tags:needs backport to D7

Issue Summary

The "Manual updates required" in admin/modules/update is generated in the wrong format, and as a consequence has a spurious column:

AttachmentSizeStatusTest resultOperations
manual-updates-required.png29.43 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:active» needs review

It's not really pretty, but there is nothing better we can actually do :(

AttachmentSizeStatusTest resultOperations
1118404-update-manual-table-broken.patch1.13 KBIdlePASSED: [[SimpleTest]]: [MySQL] 29,390 pass(es).View details

#2

Status:needs review» closed (duplicate)

I'm marking this as a duplicate of #1024990: "Manual updates required" table has an extra column, however you solve the problem in a different way. I'll like that other issue to this one.

#3

Status:closed (duplicate)» reviewed & tested by the community

The patch in #1 is likely the simplest fix to this problem. I've tested it out and it works wonders. :) I marked the other issue, referred to in #2, as a duplicate of this one.

#4

Status:reviewed & tested by the community» needs review

Is the following summary correct?

We have a function that builds up an array that is either passed into theme('tableselect') or theme('table').

The problem is that theme('tableselect') and theme('table') take a different array as input.

This hack turns a theme('tableselect') array into theme('table') array.

If it is correct, I think we can better document it in the code. Setting back to 'needs review' as I'd like some extra input.

#5

Priority:normal» critical
Assigned to:Anonymous» keichee
Status:needs review» patch (to be ported)

this is a much simpler way that works..

AttachmentSizeStatusTest resultOperations
1118404-update-manual-table-broken.patch644 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 32,208 pass(es).View details

#6

Priority:critical» normal
Status:patch (to be ported)» needs review

Patch looks good, but this isn't critical, and the patch doesn't look like it needs porting to me, ought to apply straight.

#7

Tested this manually, fixes the problem fine. I think we could still use a comment here though - the code is much simpler but we should explain why we're unsetting attributes.

#8

thats per entry, so core entry attributes have no attributes set, others will have.

thats a simple issue that no one will reuse and free some space.

#9

Dries' hypothesis in #4 is correct.

#10

#5 really looks like a hack.

#11

Status:needs review» needs work

@Damien, without inline docs, both #1 and #5 look like hacks, except #5 is a lot more concise. So if #1 is the correct fix here and #5 is a nasty workaround, the docs should make that obvious. Marking CNW since neither are adding those.

#12

Just needs a comment like

+    // The elements of the projects array are each generally themed as a
+    // tableselect giving checkboxes to chose which updates to install.
+    // To omit these checkboxes for projects where 'Manual updates required',
+    // we instead theme this section as a table. Unfortunately the variables
+    // for theme_tableselect and theme_table are not compatible, so we must
+    // first massage the data into an appropriate format.

#13

look, i just followed the existing code to handle core

existing code is

      unset($entry['#weight']);

but after i traced, weight is not even existing, i think weight is a typo and it must be an attributes.

try to print_r the $entry variable outside that if condition code that handle manual updates and see what i mean.

print_r($entry);

my code is legit as per complying to the existing code how to handle manual updates.

#14

The patch in #1 with a comment similar to #12 should suffice.

#15

#16

Status:needs work» needs review

I've updated the comment patch in #1 to address Dries' concern in #4.

#5 is a hack in the sense that it unnecessarily removes the attributes (i.e., 'class' => 'update-recommended') which may be used by the site's CSS.

AttachmentSizeStatusTest resultOperations
1118404-by-Damien-Tournoud-keichee-bfroehle-Fixed-Ma.patch1.47 KBIdlePASSED: [[SimpleTest]]: [MySQL] 32,783 pass(es).View details

#17

Status:needs review» reviewed & tested by the community

Marking this as RTBC since it is the same code as in #1 (which was marked RTBC in #3) and hopefully addresses Dries concerns with the comments.

#18

Version:8.x-dev» 7.x-dev

The new comment covers this well I think.

Committed to 8.x, moving back to 7.x for webchick to look at.

#19

Status:reviewed & tested by the community» fixed

w00t! Great to see this fixed!

Committed and pushed to 7.x.

#20

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here