• I have created a table with three rows and two columns. The cells of the first two rows contain a thumbnail to a NextGen gallery each, so four in total (2×2).

    When I preview the table, the layout is displayed correctly. However, when I view the page, the thumbnails from column 2 are shifted to the left to column 1, and the images that are meant to appear in column 1 have disappeared completely.

    In order to get the correct code for the galleries (as there isn’t an option to automatically insert a gallery into a TablePress table), I added the galleries to a page first, and then I copied the code into a table. These are my four codes:

    <img class="ngg_displayed_gallery mceItem" src="http://yeshar.co.uk/kneif/nextgen-attach_to_post/preview/id--644" data-mce-placeholder="1" />
    
    <img class="ngg_displayed_gallery mceItem" src="http://yeshar.co.uk/kneif/nextgen-attach_to_post/preview/id--645" data-mce-placeholder="1" />
    
    <img class="ngg_displayed_gallery mceItem" src="http://yeshar.co.uk/kneif/nextgen-attach_to_post/preview/id--646" data-mce-placeholder="1" />
    
    <img class="ngg_displayed_gallery mceItem" src="http://yeshar.co.uk/kneif/nextgen-attach_to_post/preview/id--647" data-mce-placeholder="1" />

    (R1/C1, R2/C1, R1/C2, R2/C2)

    Additionally, Chrome won’t apply the CSS selector that I defined for the third row (#smallerText), whereas Firefox displays the text correctly.

    The page is (currently) located at http://yeshar.co.uk/kneif/members/george-kneif/album/past-times/maternal-grandparents-1/

    Other pages with a table containing only one gallery – such as the one at http://yeshar.co.uk/kneif/members/ann-kneif/talks/leeds-castle/ – display everything correctly, including the CSS-styled text.

    Is this something that can be resolved, or is it a bug that is unfixable, so that I have to create a table manually in HTML?

    Thanks for any replies.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter jkneif

    (@jkneif)

    Edit: After refreshing, the CSS is now applied correctly in both browsers. But the problem with the disappearing cell content remains.

    Thread Starter jkneif

    (@jkneif)

    I should have more belief in my own abilities … as column 2 got moved to the left, it made sense to insert an additional column to the left of the other two, and I gave it a width of 0 – voilà, it worked! 🙂

    Now I just need to figure out how to center the thumbnail images in their respective table cells … it seems to work in Firefox, but not in Chrome. But I guess that’s a different topic.

    Thread Starter jkneif

    (@jkneif)

    It appears that my issue with Chrome not displaying the page properly is due to a cache problem. Even after reloading the page several times yesterday, it still showed the old version – but this morning, it suddenly worked. The same thing happened with other issues that I reviously posted about, when everything worked fine in Firefox, but not in Chrome.

    It seems that I’m not the only person with this problem: http://stackoverflow.com/questions/6576468/chrome-caching-like-a-mad-browser

    Thread Starter jkneif

    (@jkneif)

    This is getting weirder and weirder.

    I’ve described my new problem here and attributed it to a problem with the cache – but what I actually did was to delete the old table (table 39), and replace it with table 40 (with the extra column, which had previously been working). Before, I had only inserted table 40 at the bottom of the page, to test it, and I had merely moved its place on the page, but I never actually made any changes to that table (except straight after copying it from table 39 last night, when I added the extra column) – but it is showing exactly the same behaviour that the old table (without the extra column) had, in both Firefox and Chrome!

    I really can’t explain this, and the best thing I can do at this point is to hope that somehow a cached version of the table is displayed (which only existed for a few second until I added an extra column), and that it will be displayed correctly at some point. But even if the problem solves itself after a certain amount of hours, it will still be really annoying if I have to wait for ages each time I make changes to a table, to make sure that it looks the way I intend it to.

    Hi,

    thanks for your post, and sorry for the trouble.

    This is indeed strange. The table on http://yeshar.co.uk/kneif/members/george-kneif/album/past-times/maternal-grandparents-1/ seems to have three cells in row 3, but only two in rows 1 and 2… This should not be possible, especially as I don’t see colspan or rowspan being used…

    Can you post a screenshot of that table’s “Edit” screen?

    Regards,
    Tobias

    Thread Starter jkneif

    (@jkneif)

    Sure, anything that helps with finding a solution. I’m not sure whether the image is too large for this forum, so here’s the link: http://yeshar.co.uk/kneif/images/screenshot.jpg

    I’ve also created a new page by duplicating the old one, and I also copied the table which I added – so that the new page http://yeshar.co.uk/kneif/members/george-kneif/album/past-times/maternal-grandparents-1-2/ now contains both the tables with ID 40 and ID 41. But the new table still shows the same behaviour, even though it worked last night after I had added the extra column.

    Once again, thanks for your help!

    Jennifer

    Thread Starter jkneif

    (@jkneif)

    Here’s the CSS for both tables:

    .tablepress thead th,
    .tablepress tbody td {
    	text-align: center;
    	vertical-align: middle;
    }
    
    .tablepress img {
    	margin: 0 auto !important;
    }
    
    .tablepress a img {
    	margin: 0 auto !important!;
    }
    
    .tablepress-id-40 .column-1,
    .tablepress-id-41 .column-1 {
    	width: 0;
    }
    
    .tablepress-id-40 .ngg-galleryoverview,
    .tablepress-id-41 .ngg-galleryoverview {
    	text-align: center;
    }
    
    .tablepress-id-40 .ngg-gallery-thumbnail-box,
    .tablepress-id-41 .ngg-gallery-thumbnail-box {
    	float: none !important;
    	display: inline-block;
    }

    Hope that helps!

    Thread Starter jkneif

    (@jkneif)

    I realised that I made a mistake by using an id selector for an element that appears several times on the same page, instead of a class (it is over 10 years ago that I last set up a web page and used CSS!), so I wondered whether that could be causing confusion, and I added a new table (42). But the problem persists. Strangely enough, there seems to be a caching problem again, and although the CSS for the new class that I created (.smallrText) is recognised, the CSS for the first table column, which sets its width to 0, isn’t – despite both being defined in the same stylesheet.

    Hi,

    thanks for the screenshot! From what I can see, the column 3 is completely missing for rows 1 and 2. As the HTML content in the page is different to the screenshot, I assume that NGG is doing a text replacement here, e.g. using a regular expression.

    For some testing, could you please add a extra (empty) 4th column to table 40?

    Regards,
    Tobias

    Thread Starter jkneif

    (@jkneif)

    Ok, I hope this is right 🙂

    Screenshot

    Hi,

    thanks for that! This confirms an assumption. NGG is using regular expressions that are too greedy. So basically, the code data-mce-placeholder="1" /> (or similar) of the image in the third column is recognized as the end of the image HTML code in the second column. Thus, the regular expression interprets the HTML code for two images as the HTML code of just one image.
    This then breaks the table HTML code, due to which a cell is missing when the table is rendered.

    Unfortunately, there’s nothing that I can do about this in TablePress. This is a bug in NGG, so that I can only suggest that you contact their support team.

    Regards,
    Tobias

    Thread Starter jkneif

    (@jkneif)

    That is really annoying – I wish I had saved the page last night when it was working after I had added the extra column, instead of overwriting it – unfortunately, I am not able to replicate that particular case anymore. The only difference that I can think of is that I had added the galleries after the table, in addition to the ones inside the table. If that worked, I might be able to find a way to hide the extraneous galleries.

    I’ll be playing around a bit with the page, to see if I can find a workaround – if not, I’ll probably have to get in touch with their support team, as you suggested. Although I haven’t exactly got a lot of hope that their support is going to be anywhere near as good as yours … so maybe a different gallery plugin would be in order, at least for the two pages that I am setting up in that format. All others will have standard thumbnail galleries with the layout determined by NextGen, so that shouldn’t cause any problems.

    Thanks for your time & all the best,

    Jennifer

    Hi Jennifer,

    yes, a different gallery plugin might work better.

    Regards,
    Tobias

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[TablePress] [NextGen] Weird table behaviour’ is closed to new replies.