Very strange bug I noticed today:
I created a Table view of all of my site's nodes, with the node type as a field. While editing the table display settings, I set the "Grouping field" to the node type, so that the results would be grouped by type. I also clicked a few of the checkboxes in the "Hide Empty Columns" column of the table column settings, because some of my content types don't use all the fields that I'm displaying, so this feature allows me to display tables grouped by content type, but without a bunch of empty columns in the tables for types without certain fields (phew, hope that made sense).
However, the last item in each of my tables appears to be duplicated...
Well, to be exact, the fields in the last item are overwritten with the data from the second-to-last-item. For example, a table with just two nodes looks like this:
Title | Body | Edit link
title 1 | body 1 | (edit link)
title 1 | body 1 | (edit link)
The curious part is: the edit link actually points to the correct node. So in the above example, the first edit link brings me to node 1, but the second one brings me to node 2... as it should. So it seems that just the field data itself is being duplicated.
Comment | File | Size | Author |
---|---|---|---|
#11 | views_duplicate_table_row_listing-1371252-11.patch | 532 bytes | kleinmp |
Comments
Comment #1
m.stentaAnother detail: I noticed that if I only check off ONE of the columns in "Hide Empty Columns", this doesn't happen.
So it seems to only happen when a grouping field is used, and more than one column is checked off in the "Hide Empty Columns."
Hope that helps.
Comment #2
skyoo8 CreditAttribution: skyoo8 commentedI have got the same problem. Its ok to have a grouping field but as soon as I check more than 4 columns as "Hide Empty Columns", last content would not show, instead the content before last one show twice.
Does any one got a solution?
Comment #3
musicologist1964 CreditAttribution: musicologist1964 commentedHi,
I've encountered the same bug.
My testing has confirmed that if a query is returned that requires more than one column to be hidden (according to the Table Settings), then the last row displayed is partially overwritten by the previous row's details. I can mark as many columns "HIDE EMPTY COLUMN" in Table Settings as I like, and this doesn't affect the output; only the number of columns that actually have to be hidden at the time the query is run seems to affect the last row displayed.
Changing the grouping and/or sorting had no effect on the output.
Cheers,
Garry.
Comment #4
skyoo8 CreditAttribution: skyoo8 commentedanyone come up with any solution?
Comment #5
dawehnerThat's more or less a duplicate of #1235994: When RDF is enabled, grouping can behave incorrectly ... i'm sorry :(
Comment #6
m.stentaHmm, I'm not so sure. I disabled the RDF module, and my View is still duplicating one of the rows.
Comment #7
dawehnerThis doesn't have to do with the rdf module itself, but it's the issue linked there.
Comment #8
furberd CreditAttribution: furberd commentedI have the same problem, and replicated on separate Drupal 7 sites. It has nothing to do with grouping, and everything to do with hiding empty columns.
Comment #9
no2e CreditAttribution: no2e commentedSame here as #8
I don't use grouping but "Hide Empty Column" and I have the same problem: last row is duplicated, one is missing.
Comment #10
musicologist1964 CreditAttribution: musicologist1964 commentedHi,
Since confirming that I was experiencing this bug (please see #3 above), I have updated the Views module twice since 31st December, and am now at version 7.x-3.2. However, I am still experiencing this same problem. Additionally, enabling and disabling the RDF module has no effect on the occurrence of the problem.
Can anyone please tell me if there are any plans to address this bug in a future software release, and if there is any indication of when that might happen. It should come as no surprise that I have a website waiting to go live, but I am waiting for this issue to be resolved.
Cheers,
Garry.
Comment #11
kleinmp CreditAttribution: kleinmp commentedI was having the same behavior as in comment #8 and #9. I'm working off the basic line item view on the order administration page from the commerce module. The only difference is that I added a field to the line items that should be hidden if they're all empty.
The behavior is that the 2nd to last item in the table is shown twice and the last item is not shown. I'm pretty sure that this is a separate issue from #1235994: When RDF is enabled, grouping can behave incorrectly and is still not working for me with the latest dev version.
I dug into it and was able to fix it for my view. It seemed that there was some sort of variable collision that was causing the data in the 2nd to last row to overwrite the data from the last when the table was being rendered.
Comment #12
dawehnerOh i get it, php is really awesome!
Thanks for your patch, it totally make sense.
Committed the patch to 7.x-3.x, let's backport to 6.x-3.x
Comment #13
Dennis82 CreditAttribution: Dennis82 commentedthanks, this did the trick!
Comment #14
musicologist1964 CreditAttribution: musicologist1964 commentedHi,
I've manually applied the patch at #11 and can confirm it works on my web site. Thank you to all involved.
Cheers,
Garry :)
Comment #15
joeebel CreditAttribution: joeebel commentedThank you, kleinmp!! That worked perfectly. You saved the day.
Comment #16
wooody CreditAttribution: wooody commentedHello, I test views 7.x-3.3+84-dev and it's not work, and i checked there is this code in theme.inc
i already checked Hide empty fields in field setting in views ,
so why the empty Td not hide .? it's still exist like this:
any help..
Comment #17
Tara1981 CreditAttribution: Tara1981 commentedI'm having this issue with 7.x-3.3, do I have to manually add this patch? (I don't really know how to do that!?)
Sorry for the noobie question.
Comment #18
merlinofchaos CreditAttribution: merlinofchaos commentedNo, dereine committed this in Feb. Download 7.x-3.x-dev as there hasn't been a new official release since this commit.
Comment #19
timtk CreditAttribution: timtk commentedI am using version 7.x -3.3 and am still having the same problem as the original issue. http://drupal.org/node/1256078#comment-6571422
I thought it was something to do with the view template file I had used but from following this issue I think it maybe related to this.
Not sure if I have implemented the patch correctly in the theme.inc file as there is a similar line of code except it does not have
Am fairly proficient with view but not the coding side of it and rarely use table views so any help would be appreciated.
Comment #20
heatherwoz CreditAttribution: heatherwoz commentedThis was fixed in 7.x-3.5. You should upgrade to that if possible. The fix is still waiting to be applied to 6.x so that is why the issue is still open.
Comment #21
timtk CreditAttribution: timtk commentedTHANK YOU that did the trick.
Comment #22
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue