Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2977 closed defect (fixed)

metanav "unread" link doesn't show up

Reported by: anonymous Owned by: Vladislav Naumov
Priority: normal Component: TracUnreadPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

I'm using 0.11 and installed from source using current revision. The plugin was recognized correctly and forced an environment upgrade. But after this, no link is displayed in the "meta" navigation bar (as the pictures on the plugin page shows).

Attachments (1)

debug_webui.diff (1.4 KB) - added by Vladislav Naumov 17 years ago.
patch adds more debug output in webui class

Download all attachments as: .zip

Change History (10)

comment:1 Changed 17 years ago by Vladislav Naumov

Status: newassigned

One simple thing to check, before we start digging deeper: did you log in into your Trac instance? Plugin only works for authenticated users.

Other things to check:

What http server do you use (apache / tracd)? Did you restart it?

What is your DB backend - mysql? postgres? sqlite?

If it is possible, check

SELECT * FROM trac_unread;

query to see if there are any records in plugin table.

If there are none - please, enable logging and check if plugin loaded properly (plugins that fail to load cause log message when processing first request).

comment:2 Changed 17 years ago by anonymous

Thanks for fast responding!

All my users are authenticated (guest-users has no rights) and I restarted my Apache 2.2.4 server. When I query sqlite, it lists the following output using your statement:

username1|1209829601|ticket|12
username2|1209929244|ticket|10
username2|1209928796|ticket|9
... (40 other)

So it seems to be "just" a viewing issue? I doesn't see the link which is shown on the plugin site. Other plugins (like "discussions", "Math", "NewsFlash", "Page2Pdf") works with no problems.

Here are all lines from trac.log which contains 'unread' during one day:

...
12:40:06,686 Trac[loader] DEBUG: Loading trac_unread from xxx/trac_unread-0.0.1-py2.5.egg
...
12:40:39,972 Trac[web_ui] INFO: Enabling component trac_unread.env_setup.TracUnreadSetupParticipant
12:40:39,976 Trac[web_ui] INFO: Enabling component trac_unread.ticket_webui.TicketWebUiAddon
12:40:39,982 Trac[web_ui] INFO: Enabling component trac_unread.trac_unread.TracUnreadFilter
...
12:40:41,726 Trac[loader] DEBUG: Loading trac_unread from xxx/trac_unread-0.0.1-py2.5.egg
12:45:03,387 Trac[trac_unread] DEBUG: QQ: saving ticket #12 view (1209638703)
12:45:03,394 Trac[trac_unread] DEBUG: UPDATE updated no rows, trying INSERT
...

And just one more information: I'm using trac 0.11rc1

Changed 17 years ago by Vladislav Naumov

Attachment: debug_webui.diff added

patch adds more debug output in webui class

comment:3 Changed 17 years ago by Vladislav Naumov

Thanks for your input!

I still can't figure out what fails to work, but at least now we know problem resides in webui component.

I tried to repeat this, but it worked for:

  • Python 2.4.4 and Python 2.3.4 (check python -V),
  • Apache 2.2.3 and Apache 2.0.52 (httpd -V),
  • SQLite and PostgreSQL database backends,
  • Trac 0.10 and Trac 0.11rc1 (==trunk, I believe)
  • Trac installed as standalone cgi , using mod_python and trac running as a daemon (tracd).

How your trac is configured (I mean, standalone cgi / mod_python / FastCGI / mod_wsgi)? (Check http://trac.edgewall.org/wiki/TracInstall).

Can you apply this patch to see what exactly fails? It gives more debugging output in log file.

I'm so sorry for using you as a crash test dummy, but it seems I really need your help to track down this error.

comment:4 Changed 17 years ago by Vladislav Naumov

Summary: Installation doesn't workmetanav "unread" link doesn't show up

comment:5 Changed 17 years ago by Vladislav Naumov

Keywords: installation removed

comment:6 Changed 17 years ago by Chris Sekszczynska

I like to help you fixing the issue (as it's also in my interest). I'm using Python 2.5.1 and mod_python. My apache is little bit newer, too. I'm using 2.2.4.

Here is the logging-output:

2008-05-07 17:36:57,497 Trac[ticket_webui] DEBUG: trac_unread: Checking auth name
2008-05-07 17:36:57,498 Trac[ticket_webui] DEBUG: trac_unread: auth name is not anonymous, going on
2008-05-07 17:36:57,498 Trac[ticket_webui] DEBUG: trac_unread: Checking request path: '/newticket'
2008-05-07 17:36:57,500 Trac[ticket_webui] DEBUG: trac_unread: Request path '/newticket' skipped
2008-05-07 17:36:58,851 Trac[session] DEBUG: Retrieving session for ID u'user1'
2008-05-07 17:37:00,335 Trac[main] DEBUG: 736 unreachable objects found.
2008-05-07 17:37:00,457 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/css/ticket.css'">
2008-05-07 17:37:00,476 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/edit_toolbar.png'">
2008-05-07 17:37:00,572 Trac[main] DEBUG: 0 unreachable objects found.
2008-05-07 17:37:00,583 Trac[main] DEBUG: 0 unreachable objects found.
2008-05-07 17:37:09,533 Trac[main] DEBUG: Dispatching <Request "GET u''">
2008-05-07 17:37:09,561 Trac[chrome] DEBUG: Prepare chrome data for request
2008-05-07 17:37:09,584 Trac[ticket_webui] DEBUG: trac_unread: Checking auth name
2008-05-07 17:37:09,585 Trac[ticket_webui] DEBUG: trac_unread: auth name is not anonymous, going on
2008-05-07 17:37:09,585 Trac[ticket_webui] DEBUG: trac_unread: Checking request path: ''
2008-05-07 17:37:09,586 Trac[ticket_webui] DEBUG: trac_unread: Request path '' skipped
2008-05-07 17:37:09,592 Trac[api] DEBUG: Updating wiki page index

comment:7 Changed 17 years ago by Vladislav Naumov

Are you sure this piece of log is related to a ticket page?

As far as I can see from log the first request is for 'new ticket' form (/newticket), and second is Request "GET u''" -- request for wiki index page.

Plugin only adds "last unread" to ticket pages (/ticket/xxx), other requests are skipped. You can see this in your log:

DEBUG: trac_unread: Request path '/newticket' skipped
DEBUG: trac_unread: Request path '' skipped

Can you please show the log piece for ticket page?

comment:8 Changed 17 years ago by anonymous

Resolution: fixed
Status: assignedclosed

No I see the problem: I just doesn't expected that the link is just shown on ticket pages (as I doesn't see any advantage of that). I close the ticket because this works in my installation.

But by the way, wouldn't it be useful to offer this unread link on every site to show a list of tickets which have unread actions? On the plugin description page you wrote Similar to one you've probably seen on most forums! This suggests that the link is shown on every page (which is imho the only sensible implementation).

comment:9 Changed 17 years ago by Vladislav Naumov

We probably visit different forums :-) The ones I've seen have "go to first unread" link on each topic page (and that's what I tried to implement with tat link on ticket page). Yes, it's not that useful as in forum topics - after all, Trac is not a forum - there are no "LOL", "me too" and "OMG!!!!111oneoneone" comments - just dull work discussion :-)

And there also are "list of topics" with "go to first unread" links next to a topic - this can be implements with specially-crafted reports (see TracUnreadPlugin#CanIuseitinreports). This is a bit more useful.

Since you use SQLite as DB backend, you probably will be unable to create "first unread comment" link - the best you can do with SQLite2 is "link to a ticket with unread comments". SQLite3 will have the required string manipulation functions, but I haven't seen it yet.

Anyway, sorry for misunderstanding. I'll try to adjust plugin description to avoid confusion.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Vladislav Naumov.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.