Defect #5749

ETag on activity page ignores module, theme, project name changes

Added by Holger Winkelmann over 9 years ago. Updated about 9 years ago.

Status:NewStart date:2010-06-24
Priority:HighDue date:
Assignee:-% Done:

0%

Category:UI
Target version:-
Resolution: Affected version:

Description

If you have limited the available modules for a given project and click on the Activity Tab you see ALL Tabs for ALL Modules, even the disabled ones. If you click on such a tab you get a 403. The sidebar also is not filtered.

I'm using Redmine 0.9.4.devel.3797 (PostgreSQL) with the following environment:

About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /var/lib/redmine
Environment               production
Database adapter          postgresql
Database schema version   20100313171051

About your Redmine plugins
Redmine Code Review plugin   0.3.0
Bulk Time Entry              0.4.0
Timesheet Plugin             0.5.0
Redmine iPhone plugin        0.0.1
Stuff To Do Plugin           0.0.2
Screenshot Paste             1.1.0
Rate Plugin                  0.1.0

activity.png (179 KB) Holger Winkelmann, 2010-06-24 17:43

overview.png (145 KB) Holger Winkelmann, 2010-06-24 17:43


Related issues

Related to Redmine - Defect #8889: Activity page not refreshed correctly on updates which ar... New 2011-07-23

History

#1 Updated by Holger Winkelmann over 9 years ago

This only occurs with One Project, another project with the same Module setting behaves correctly. I quickly tried to compare the Projects and the only difference I see so far is that the affected Project has commits of user in a remote SVN repository does not exist in the Redmine instance. This can happen in our setup as we use the Repository adapter in redmine to connect to remote repositories to "just" monitor the changesets and feed them into the Redmine activity line. But I dont know this is the root cause for this behavior.

#2 Updated by Holger Winkelmann over 9 years ago

We found another project (this time with a git repo) but also with users in the git does not match to Redmine users.

Given that, what you think about a way to mark not matched redmine users in the redmine UI with i.e. a different Color ?

#3 Updated by Holger Winkelmann over 9 years ago

BTW: the List of tabs will be corrected by clicking of the sidebar apply button while in the activity view. After that the List in the side bar ist correct as well. Clicking again of the Activity Tab the Menu and List is unfiltered again.

Hope this helps.

#4 Updated by Felix Schäfer over 9 years ago

We need a way to reproduce, meaning here that you will have to try with a blank redmine and reproduce the problem. Seeing the number of plugins younhave, it could be anyone of them or a combination misbehaving.

#5 Updated by Holger Winkelmann over 9 years ago

Would be not so easy, as I'm currently just testing the Redmine provided to me.
But I'll try to manage that. I'm already had a look in the log file, but don't see any issues there.

#6 Updated by Holger Winkelmann over 9 years ago

Hi,

I haven't managed a clean Redmine yet. But I can confirm that the issue only occurs if the Repositry module is enabled.

#7 Updated by Holger Winkelmann over 9 years ago

Holger Winkelmann wrote:

Hi,

I haven't managed a clean Redmine yet. But I can confirm that the issue only occurs if the Repositry module is enabled.

With a user less Repository i.e. Type FileSystem, I have no issues either ...

#8 Updated by Holger Winkelmann over 9 years ago

While aplying different Themes I recogniced annother strage behavior of the activity tab which may leads in the direction for this issue.

Also Theme Changes are not maintained by clicking the activity Tab. The Theme is applied for the whole application, bit clicking the strange behaving projects activity tab shows the previous theme.

see Screenshots attached:

#9 Updated by Holger Winkelmann over 9 years ago

#10 Updated by Holger Winkelmann over 9 years ago

So finally I can report the exact behavior ;-)

The Theme (and tabs) are not maintained because the activity view is somehow cached. A shift+reload of the activity URL fixes the problem of the tabs and Themes. It's reproducable for tabs and Themes.

looking in the logfile the activity controller returns a "304 Not Modified" for the affected projects.

Processing ProjectsController#activity (for 192.168.2.143 at 2010-06-24 18:07:55) [GET]
  Parameters: {"action"=>"activity", "id"=>"gitosis", "controller"=>"projects"}
Completed in 112ms (View: 1, DB: 16) | 304 Not Modified [https://redmine.tpip.net/projects/gitosis/activity]

a not affected project i.e. with just a filesystem repo or no repo returns a "200 OK"

Processing ProjectsController#activity (for 192.168.2.143 at 2010-06-24 18:08:21) [GET]
  Parameters: {"action"=>"activity", "id"=>"zandbox-hwinkel", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/activity
Completed in 82ms (View: 36, DB: 19) | 200 OK [https://redmine.tpip.net/projects/zandbox-hwinkel/activity]

#11 Updated by Holger Winkelmann over 9 years ago

Have removed all Plugins now. But I still get the "304 Not Modified" for the activity controller which leads to the described behavior. A shift reload with open activity URL fixes the view because of the client triggered reload.

May somebody can check the controller ?

Many Thanks.

#12 Updated by Felix Schäfer over 9 years ago

Can you confirm if this happens on fresh install? (sorry if this has already been asked/answered) Can you also test this behavior against SQLite or MySQL?

#13 Updated by Holger Winkelmann over 9 years ago

Hi Felix, what ever fresh means ;-) I have removed all plugins from the ../vendor/plugins folder and made a svn update yesterday and run "Redmine 0.9.4.devel.3813 (PostgreSQL)" now. Currently I setup a new VM with Ubuntu 10.04 LTS to test a fresh install from scratch. While this I can tray to check the other databases as well.

#14 Updated by Holger Winkelmann over 9 years ago

Hi, just installed a clean redmine (trunk) with mySQL Database. have not seen the 304 mentioned above yet. Seems Activity tab work as expected. Will link redmine to a PostgresDB now.

#15 Updated by Eric Van Bocxlaer over 9 years ago

Hi, I can confirm the given behaviour by Holger.
I'm using Redmine 0.9.5.devel (MySQL). (did do the checkout yesterday (2010-07-08))

I was testing redmine with several projects and can confirm that the only project that has this problem is the project with a defined repository.

I did only remark the theme changing problem. It's only after reading this bugreport, that I saw also the problem with the tabs.

I looked into the generated html page and independent of which theme was selected, the link tag is always :

<link href="/redmine/themes/alternate/stylesheets/application.css?1278516175" media="all" rel="stylesheet" type="text/css" />

Something hardcoded, putted for testing and forgotten ;-)) ??

Maybe a hint where begin to search...

(I will not be able to respond to questions because my holidays (3 weeks) starts +- now :-) )

#16 Updated by Holger Winkelmann over 9 years ago

I can confirm the issue with a clean install of the latest trunk (mySQL)

It seems the activity controller returns a 304, therefore the browser is using the cached data. You can easilly see that
if you change the Theme. After changing a Theme the new theme is directly applied but if you click the activity tab you see
the page rendered with the previous theme.

If you SHIFT-Reload the activity URL the Theme gets updated.

BTW: the Issue Title does not reflect the behaviour any more. I think the Module settings are maintained but "just" the view
is outdated because of the 304 send to the browser. (can please anybody with the appropriate permission change the Title)

Thanks a lot,

Holger

#17 Updated by Holger Winkelmann over 9 years ago

One more, I still can confirm this only happens with a configured repository.

#18 Updated by Eric Van Bocxlaer about 9 years ago

I installed the new fresh 1.0.0stable version. The fresh database was replaced by a backup of my existing database, database migrations where done.

The theme problem seems to be disappeared, but the tabs problem is still there.
And it only happens with a configured repository.

#19 Updated by Holger Winkelmann about 9 years ago

Hi,

I can confirm this issue with a totally fresh installation as well.

#20 Updated by Felix Schäfer about 9 years ago

  • Subject changed from Project Activity, MenuTabs does not maintain modul settings to ETag on activity page ignores module, theme, project name changes
  • Category changed from Permissions and roles to UI

Ahahaha, I can't believe I notice this the first time… So this is a problem with the ETAG the page has which causes extraneous/erroneous caching client-side (the ETAG gets sent with the page, next request for that page says "I already have that page cached with ETAG so-and-so", and the server checks and says "yupp, that's the right one, no need to fetch the page again"), which you can recognize because of the 304 Not Modified (the webserver's "yupp, right one" answer).

Ok, so basically the ETAG is calculated only from the events present on the activity page, not anything else, which cause clients to cache the page more or less until a new event is generated, and this cached version still has the theme, modules, whatnot from when it was generated.

So, that's the cause of the problem, now to the solution…

@EDavis: I remember you keep statistics on demo.redmine.org, how much does the ETag on the activity page help, or rather: it being the only page with it, is it really worth it? Would maybe rendering the "container page" and the "activity list" separately (with separate ETags or whatnot) be possible/help?

Also available in: Atom PDF