Re: [Trac] Re: TracHtmlNotificationPlugin only sends text/plain

Manuel Bilderbeek <[email protected]>
Newsgroups gmane.comp.version-control.subversion.trac.general
Message-ID <[email protected]>
Hi,

I was away for holidays for 3 weeks, hence my delayed response.

I tried to investigate it with Claude, here's its conclusion:

================
I dug into this further and I don't think it's a conflict with another 
plugin's stylesheet — I checked every installed plugin that ships CSS and 
none of them touch table, th, td, or .listing in an unscoped way. I think 
I've found the actual mechanism, and I can see why it wouldn't reproduce in 
a minimal test setup.

Each child ticket renders as its own independent <table class="listing 
ct-table"> (since the Genshi-removal rewrite that moved to per-ticket 
tables). Trac core's own table.listing CSS rule sets width: 100% but does 
not set table-layout: fixed. With the browser's default table-layout: auto, 
each <table> computes its own column widths independently, based solely on 
the content of that one table's own cells — there's no shared column model 
across sibling tables the way there was when everything lived in a single 
Genshi-rendered table.

In practice this means: if two sibling child tickets have different content 
lengths in an early column (e.g. a Component or Owner value that's much 
longer in one ticket than another), every column after it in the table gets 
shifted to a different horizontal offset between the two tables. With only 
a couple of test tickets that happen to have similar-length values, the 
misalignment can easily be invisible — but it shows up clearly once there's 
more real-world variance in the data.

I verified this live via browser devtools: getComputedStyle() on the 
rendered tables confirms table-layout: auto on every .ct-table, and there's 
no table-layout: fixed or explicit shared column widths anywhere in the CSS 
cascade (checked trac.css, ticket.css, and the plugin's own 
childtickets.css).

A fix that wouldn't require touching the per-ticket-table architecture: add 
table-layout: fixed to .ct-table in childtickets.css, plus fixed-width 
rules for the existing column classes (.id, .summary, .owner, etc., which 
are already applied consistently across tables). That would force every 
table to use the same column widths regardless of its own content, which 
should resolve the visual misalignment without changing the underlying 
one-table-per-ticket structure.
================

Does that help?

Op vrijdag 24 juli 2026 om 12:08:28 UTC+2 schreef Jun Omae:

> The issue doesn't occur with only Trac and ChildTicketsPlugin. Please 
> investigate which stylesheets from other enabled plugin(s) are causing the 
> issue.
>
>
> On Thu, Jul 23, 2026 at 5:25 PM Manuel Bilderbeek <
> [email protected]> wrote:
>
>> Hi all,
>>
>> One more "regression" we found after upgrading to Trac 1.6 (which is 
>> strictly speaking not the topic of this thread, let me know if you prefer 
>> to start me a new one): the list of child tickets from the 
>> childticketsplugin is now all jaggy due to the columns not being aligned 
>> anymore as with Trac 1.2.  As I understand it, with changes in the plugin 
>> to account for the Jinja2 migration, each child ticket now gets its own 
>> table entry, instead of one table where all child tickets are put under, 
>> which seems to explain the visual changes.
>>
>> Is this a known issue, or intended? 
>>
>> I hope this can be solved, because the child ticket overview is a big 
>> jaggy mess because of this... at least on our Trac system. We have tickets 
>> with more than 20 child tickets.
>>
>> Here's a small impression to show what I'm talking about:
>> [image: Screenshot 2026-07-23 102101.png]
>> Note that being able to collapse the children of children in the tree 
>> would also be helpful. But that's more like a feature request on the tree 
>> feature introduced in r18118, I guess.
>>
>> Kind regards,
>> Manuel
>>
>> Op vrijdag 17 juli 2026 om 15:00:05 UTC+2 schreef Manuel Bilderbeek:
>>
>>> Thanks, that seems to work better! If there's anything else on this 
>>> topic, I'll let you know.
>>>
>>> Op vrijdag 17 juli 2026 om 02:20:55 UTC+2 schreef Jun Omae:
>>>
>>>> Great investigation! 
>>>>
>>>> I'm wrong about the recent changes to the plugin in 
>>>> https://trac-hacks.org/changeset/18646 . 
>>>> I just fixed the issue in https://trac-hacks.org/changeset/18735 . 
>>>> Could you please try the latest of the plugin from 
>>>> https://trac-hacks.org/svn/trachtmlnotificationplugin/0.12/ ? 
>>>>
>>>> Thanks. 
>>>>
>>>> On Thu, Jul 16, 2026 at 8:55 PM Manuel Bilderbeek 
>>>> <[email protected]> wrote: 
>>>> > 
>>>> > Dear Jun, 
>>>> > 
>>>> > I did some analysis of the situation with Claude and we came to a 
>>>> possible cause: in my setup I do not have given any access to the anonymous 
>>>> user. It seems that the plugin requires TICKET_VIEW permissions for the 
>>>> anonymous user, in contrast to the old GenShi version, which seems to avoid 
>>>> tihs by using MockPerm (if we understood that code correctly). Do you think 
>>>> this could indeed be the (root) cause of the issue? 
>>>> > 
>>>> > For confidentiality reasons we do not want non-logged in users to 
>>>> view any tickets, hence this configuration. 
>>>> > 
>>>> > Op vrijdag 26 juni 2026 om 06:30:08 UTC+2 schreef Jun Omae: 
>>>> >> 
>>>> >> On Thu, Jun 25, 2026 at 5:31 PM Manuel Bilderbeek 
>>>> >> <[email protected]> wrote: 
>>>> >> > 
>>>> >> > Yes, PYTHON_EGG_CACHE is used and it is set on /srv/trac/eggs in 
>>>> /srv/trac/apache/trac.wsgi: 
>>>> >> > $ cat /srv/trac/apache/trac.wsgi 
>>>> >> > import sys 
>>>> >> > sys.stdout = sys.stderr 
>>>> >> > 
>>>> >> > import site 
>>>> >> > site.addsitedir('/usr/lib/python2.7/dist-packages/') 
>>>> >> > 
>>>> >> > import os 
>>>> >> > os.environ['TRAC_ENV_PARENT_DIR'] = '/srv/trac/projects' 
>>>> >> > os.environ['PYTHON_EGG_CACHE'] = '/srv/trac/eggs' 
>>>> >> > 
>>>> >> > import trac.web.main 
>>>> >> > 
>>>> >> > application = trac.web.main.dispatch_request 
>>>> >> > 
>>>> >> 
>>>> >> It is not probably related with this issue, but the following line 
>>>> >> should be removed because of using Python 3.14. 
>>>> >> 
>>>> >> > site.addsitedir('/usr/lib/python2.7/dist-packages/') 
>>>> >> 
>>>> >> 
>>>> >> > I cleaned this /srv/trac/eggs directory and did an updatedb/locate 
>>>> after restarting apache2: 
>>>> >> > 
>>>> >> > $ locate TracHtmlNotification 
>>>> >> > /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp 
>>>> >> > 
>>>> /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp/trachtmlnotification 
>>>>
>>>> >> > 
>>>> /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp/trachtmlnotification/templates 
>>>>
>>>> >> > 
>>>> /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp/trachtmlnotification/templates/jinja2 
>>>>
>>>> >> > 
>>>> /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp/trachtmlnotification/templates/jinja2/htmlnotification_ticket.html 
>>>>
>>>> >> > 
>>>> /srv/trac/projects/swdev/plugins/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg 
>>>>
>>>> >> > 
>>>> >> > $ locate htmlnotification_ticket 
>>>> >> > 
>>>> /srv/trac/eggs/TracHtmlNotificationPlugin-0.12.0.4-py3.14.egg-tmp/trachtmlnotification/templates/jinja2/htmlnotification_ticket.html 
>>>>
>>>> >> > 
>>>> >> > I guess this looks OK, but I still do not get the proper diffs in 
>>>> the e-mail after all of this. What am I missing here? 
>>>> >> > 
>>>> >> > Should I move the installation of the egg(s)? I'm not sure where 
>>>> exactly it should be moved to. /srv/trac/lib? /srv/trac/projects/lib? 
>>>> >> > 
>>>> >> 
>>>> >> Please try to reproduce it with TracHtmlNotificationPlugin only 
>>>> >> enabled. If it is reproduced, this plugin has something wrong. If 
>>>> not, 
>>>> >> your installation, configuration and/or environment have something 
>>>> >> wrong. At least, it is unable to reproduce it on my environment. I 
>>>> >> cannot fix any issues which are not reproduced. 
>>>> >> 
>>>> >> -- 
>>>> >> Jun Omae <[email protected]> (大前 潤) 
>>>> > 
>>>> > -- 
>>>> > You received this message because you are subscribed to the Google 
>>>> Groups "Trac Users" group. 
>>>> > To unsubscribe from this group and stop receiving emails from it, 
>>>> send an email to trac-users+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected] 
>>>> > To view this discussion visit 
>>>> https://groups.google.com/d/msgid/trac-users/e6849245-d0af-4eec-b121-a30910529349n%40googlegroups.com. 
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Jun Omae <[email protected]> (大前 潤) 
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Trac Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to trac-users+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>>
> To view this discussion visit 
>> https://groups.google.com/d/msgid/trac-users/3cba265e-ef10-45c2-9ed9-ba3157b77293n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/trac-users/3cba265e-ef10-45c2-9ed9-ba3157b77293n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Jun Omae <[email protected]> (大前 潤)
>

-- 
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion visit https://groups.google.com/d/msgid/trac-users/48ad30c8-a987-4a58-a06c-0cd153c19f97n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.